30
by Arnold D. Robbins
Move to gawk-3.1.2. |
1 |
BEGIN { |
2 |
# 1. Should print aCa
|
|
3 |
IGNORECASE = 1 |
|
4 |
FS = "[c]" |
|
5 |
IGNORECASE = 0 |
|
6 |
$0 = "aCa" |
|
7 |
print $1 |
|
8 |
||
9 |
# 2. Should print a
|
|
10 |
IGNORECASE = 1 |
|
11 |
FS = "[c]" |
|
12 |
$0 = "aCa" |
|
13 |
print $1 |
|
14 |
||
15 |
# 3. Should print a
|
|
16 |
IGNORECASE = 1 |
|
17 |
FS = "C" |
|
18 |
IGNORECASE = 0 |
|
19 |
$0 = "aCa" |
|
20 |
print $1 |
|
21 |
||
22 |
# 4. Should print aCa
|
|
23 |
IGNORECASE = 1 |
|
24 |
FS = "c" |
|
25 |
$0 = "aCa" |
|
26 |
print $1 |
|
27 |
||
28 |
# 5. Should print aCa
|
|
29 |
FS = "xy" |
|
30 |
IGNORECASE = 0 |
|
31 |
FS = "c" |
|
32 |
IGNORECASE = 1 |
|
33 |
$0 = "aCa" |
|
34 |
print $1 |
|
35 |
||
36 |
# 6. Should print aCa
|
|
37 |
FS = "xy" |
|
38 |
IGNORECASE = 0 |
|
39 |
FS = "c" |
|
40 |
IGNORECASE = 1 |
|
41 |
split("aCa",a) |
|
42 |
print a[1] |
|
43 |
}
|