xref: /freebsd/contrib/one-true-awk/testdir/T.latin1 (revision 1d386b48a555f61cb7325543adbbb5c3f3407a66)
1echo T.latin1: tests of 8-bit input
2
3awk=${awk-../a.out}
4
5$awk '
6{ print $0 }
7' latin1 >foo1
8
9diff latin1 foo1 || echo 'BAD: T.latin1 1'
10
11$awk '{ gsub(/\351/, "\370"); print }' latin1 >foo0
12$awk '{ gsub(/�/, "�"); print }' latin1 >foo1
13diff foo0 foo1 || echo 'BAD: T.latin1 3'
14
15$awk '{ gsub(/[^\300-\370]/, ""); print }' latin1 >foo0
16$awk '{ gsub(/[^�-�]/, ""); print } ' latin1 >foo1
17diff foo0 foo1 || echo 'BAD: T.latin1 4'
18
19echo  '/�/' >foo1
20$awk -f foo1 foo1 >foo2
21
22diff foo1 foo2 || echo 'BAD: T.latin1 5'
23
24
25echo /[��]/ >foo1
26$awk -f foo1 foo1 >foo2
27diff foo1 foo2 || echo 'BAD: T.latin1 6'
28
29
30echo 'This is a line.
31Patterns like /[��]/ do not work yet. Example, run awk /[��]/
32over a file containing just �.
33This is another line.' >foo0
34echo 'Patterns like /[��]/ do not work yet. Example, run awk /[��]/
35over a file containing just �.' >foo1
36$awk '/[��]/' foo0 >foo2
37diff foo1 foo2 || echo 'BAD: T.latin1 7'
38