Added QSE_AWK_TOLERANT
This commit is contained in:
29
qse/regress/awk/lang-047.awk
Normal file
29
qse/regress/awk/lang-047.awk
Normal file
@ -0,0 +1,29 @@
|
||||
BEGIN {
|
||||
print print print print 10;
|
||||
print (print 10 > "/tmp/should/not/be/creatable");
|
||||
if ((print 10 > "/tmp/should/not/be/creatable") <= -1)
|
||||
print "FAILURE";
|
||||
else
|
||||
print "SUCCESS";
|
||||
|
||||
print "------------------------------------";
|
||||
a = 1 (print 10 > "/tmp/should/not/be/creatable");
|
||||
print a;
|
||||
print "------------------------------------";
|
||||
b = ++a print 10;
|
||||
printf "%d\n", b;
|
||||
print "------------------------------------";
|
||||
printf ("%d\n", b + (((print print print 30 + 50)) + 40));
|
||||
print "------------------------------------";
|
||||
printf ("%d\n", b + (((print print print 30 50)) + 40));
|
||||
|
||||
print "------------------------------------";
|
||||
$(print 0 > "/dev/null") = "this is wonderful"; print $0;
|
||||
print "------------------------------------";
|
||||
$(getline dummy > "/dev/zero") = "that"; print $0;
|
||||
|
||||
print "------------------------------------";
|
||||
x[0]=20; abc=(print ("hello", "world", (1, abc=20, abc=45))) in x; print abc
|
||||
}
|
||||
|
||||
|
@ -2361,6 +2361,66 @@ nan
|
||||
2 DDDDDDDDDDDDDDDDDDDDDDDDD
|
||||
1 DDDDDDDDDDDDDDDDDDDDDDDDD
|
||||
--------------------------------------------------------------------------------
|
||||
[CMD] qseawk --newline=on --tolerant=on -d- -f lang-047.awk </dev/stdin 2>&1
|
||||
--------------------------------------------------------------------------------
|
||||
BEGIN {
|
||||
print (print (print (print 10)));
|
||||
print (print 10 > "/tmp/should/not/be/creatable");
|
||||
if (((print 10 > "/tmp/should/not/be/creatable") <= -1))
|
||||
print "FAILURE";
|
||||
else
|
||||
print "SUCCESS";
|
||||
print "------------------------------------";
|
||||
a = (1 (print 10 > "/tmp/should/not/be/creatable"));
|
||||
print a;
|
||||
print "------------------------------------";
|
||||
b = (++(a) (print 10));
|
||||
printf "%d\n",b;
|
||||
print "------------------------------------";
|
||||
printf ("%d\n",(b + ((print (print (print 80))) + 40)));
|
||||
print "------------------------------------";
|
||||
printf ("%d\n",(b + ((print (print (print (30 50)))) + 40)));
|
||||
print "------------------------------------";
|
||||
$(print 0 > "/dev/null") = "this is wonderful";
|
||||
print $0;
|
||||
print "------------------------------------";
|
||||
$((getline dummy) > "/dev/zero") = "that";
|
||||
print $0;
|
||||
print "------------------------------------";
|
||||
x[0] = 20;
|
||||
abc = ((print ("hello","world",(1,abc = 20,abc = 45))) in x);
|
||||
print abc;
|
||||
}
|
||||
|
||||
10
|
||||
0
|
||||
0
|
||||
0
|
||||
-1
|
||||
FAILURE
|
||||
------------------------------------
|
||||
1-1
|
||||
------------------------------------
|
||||
10
|
||||
20
|
||||
------------------------------------
|
||||
80
|
||||
0
|
||||
0
|
||||
60
|
||||
------------------------------------
|
||||
3050
|
||||
0
|
||||
0
|
||||
60
|
||||
------------------------------------
|
||||
this is wonderful
|
||||
------------------------------------
|
||||
that is wonderful
|
||||
------------------------------------
|
||||
hello world 45
|
||||
1
|
||||
--------------------------------------------------------------------------------
|
||||
[CMD] qseawk --newline=on -F: -f columnate.awk passwd.dat </dev/stdin 2>&1
|
||||
--------------------------------------------------------------------------------
|
||||
root x 0 0 root /root /bin/bash
|
||||
|
@ -2361,6 +2361,66 @@ nan
|
||||
2 DDDDDDDDDDDDDDDDDDDDDDDDD
|
||||
1 DDDDDDDDDDDDDDDDDDDDDDDDD
|
||||
--------------------------------------------------------------------------------
|
||||
[CMD] qseawk -m 500000 --newline=on --tolerant=on -d- -f lang-047.awk </dev/stdin 2>&1
|
||||
--------------------------------------------------------------------------------
|
||||
BEGIN {
|
||||
print (print (print (print 10)));
|
||||
print (print 10 > "/tmp/should/not/be/creatable");
|
||||
if (((print 10 > "/tmp/should/not/be/creatable") <= -1))
|
||||
print "FAILURE";
|
||||
else
|
||||
print "SUCCESS";
|
||||
print "------------------------------------";
|
||||
a = (1 (print 10 > "/tmp/should/not/be/creatable"));
|
||||
print a;
|
||||
print "------------------------------------";
|
||||
b = (++(a) (print 10));
|
||||
printf "%d\n",b;
|
||||
print "------------------------------------";
|
||||
printf ("%d\n",(b + ((print (print (print 80))) + 40)));
|
||||
print "------------------------------------";
|
||||
printf ("%d\n",(b + ((print (print (print (30 50)))) + 40)));
|
||||
print "------------------------------------";
|
||||
$(print 0 > "/dev/null") = "this is wonderful";
|
||||
print $0;
|
||||
print "------------------------------------";
|
||||
$((getline dummy) > "/dev/zero") = "that";
|
||||
print $0;
|
||||
print "------------------------------------";
|
||||
x[0] = 20;
|
||||
abc = ((print ("hello","world",(1,abc = 20,abc = 45))) in x);
|
||||
print abc;
|
||||
}
|
||||
|
||||
10
|
||||
0
|
||||
0
|
||||
0
|
||||
-1
|
||||
FAILURE
|
||||
------------------------------------
|
||||
1-1
|
||||
------------------------------------
|
||||
10
|
||||
20
|
||||
------------------------------------
|
||||
80
|
||||
0
|
||||
0
|
||||
60
|
||||
------------------------------------
|
||||
3050
|
||||
0
|
||||
0
|
||||
60
|
||||
------------------------------------
|
||||
this is wonderful
|
||||
------------------------------------
|
||||
that is wonderful
|
||||
------------------------------------
|
||||
hello world 45
|
||||
1
|
||||
--------------------------------------------------------------------------------
|
||||
[CMD] qseawk -m 500000 --newline=on -F: -f columnate.awk passwd.dat </dev/stdin 2>&1
|
||||
--------------------------------------------------------------------------------
|
||||
root x 0 0 root /root /bin/bash
|
||||
|
@ -173,6 +173,7 @@ PROGS="
|
||||
lang-044.awk!lang-044.dat!!--newline=on -d-
|
||||
lang-045.awk!!!--newline=on -d-
|
||||
lang-046.awk!lang-046.dat2!!--newline=on -d- -vdatadir=@abs_srcdir@ -vdatafile=lang-046.dat1
|
||||
lang-047.awk!!!--newline=on --tolerant=on -d-
|
||||
|
||||
columnate.awk!passwd.dat!!--newline=on -F:
|
||||
levenshtein-utests.awk!!!--newline=on --include=on
|
||||
|
Reference in New Issue
Block a user