xref: /freebsd/contrib/one-true-awk/testdir/T.exprconv (revision 43a5ec4eb41567cc92586503212743d89686d78f)
1echo T.exprconv:  check conversion of expr to number
2
3awk=${awk-../a.out}
4
5$awk '
6BEGIN {	x = (1 > 0); print x
7	x = (1 < 0); print x
8	x = (1 == 1); print x
9	print ("a" >= "b")
10	print ("b" >= "a")
11	print (0 == 0.0)
12	# x = ((1 == 1e0) && (1 == 10e-1) && (1 == .1e2)); print x
13	exit
14}' >foo1
15echo '1
160
171
180
191
201' >foo2
21cmp foo1 foo2 || echo 'BAD: T.exprconv (1 > 0, etc.)'
22