aboutsummaryrefslogtreecommitdiffstats
path: root/testcases
blob: 1dd1f524a3c8caaf2574328b9fc51c9bb196c329 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
1:
./cppawk 'BEGIN { print "hello" }'
:
hello
--
2:
./cppawk -M 'BEGIN { print 1000000000000000000000000 + 1 }'
:
1000000000000000000000001
--
3:
./cppawk -f
:
ERR
--
4:
./cppawk -f x -f x
:
ERR
--
5:
./cppawk -MM 1
:
ERR
--
6:
./cppawk -F
:
ERR
--
7:
./cppawk -v
:
ERR
--
8:
./cppawk -E
:
ERR
--
9:
./cppawk -i
:
ERR
--
10:
./cppawk -l
:
ERR
--
11:
./cppawk -L
:
ERR
--
12:
./cppawk
:
ERR
--
13:
./cppawk '
#define min(a,b) ((a) < (b) ? (a) : (b))
{ print min($1, $2) }' <<!
1 2
2 1
3 2
:
1
1
2
--
14:
./cppawk -Itestdir '
#include "header.cwh"
BEGIN { print max(42, 73) }'
:
73
--
15:
./cppawk -iquotetestdir '
#include "header.cwh"
BEGIN { print max(42, 73) }'
:
73
--
16:
./cppawk '
BEGIN {
#if __gawk__
   print "gawk"
#endif
}'
:
gawk
--
17:
./cppawk -M 'BEGIN { print __bignum__ }'
:
1
--
18:
./cppawk 'BEGIN { print __bignum__ }'
:
--
19:
./cppawk -P 'BEGIN { print __posix__ }'
:
1
--
20:
./cppawk 'BEGIN { print __posix__ }'
:
--
21:
./cppawk --prepro-only 'BEGIN { }' | grep BEGIN
:
BEGIN { }
--
22:
./cppawk -v foo="'\"" 'BEGIN { print foo }'
:
'"
--
23:
./cppawk -f testdir/program.cwk
:
73
--
22:
./cppawk -v foo="abc def" 'BEGIN { print foo }'
:
abc def
--
23:
./cppawk 'BEGIN { printf("%s:%s:%s\n", ARGC, ARGV[1], ARGV[2]) }' "ab c" "'"
:
3:ab c:'