Skip to content

Commit 5bae076

Browse files
committed
Hmmm, AWK behavior is insane for parsing "0ex" and similar, going to stick with GoAWK's saner behavior
1 parent ff02dbf commit 5bae076

3 files changed

Lines changed: 2 additions & 5 deletions

File tree

goawk_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,6 @@ func TestGAWK(t *testing.T) {
198198
"getline3": true, // getline syntax issues (similar to above)
199199
"getline5": true, // getline syntax issues (similar to above)
200200
"gsubtst7": true, // something wrong with gsub or field split/join
201-
"hex": true, // different parsing of numbers with exponents
202201
"inputred": true, // getInputScanner errors (see closebad)
203202
"membug1": true, // doesn't parse: '{ one != one = $1 }'
204203
"nfldstr": true, // invalid handling of '!$0' when $0="0"

testdata/gawk/hex.awk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ BEGIN {
77

88
print e+0, x+0
99
print 0x
10-
print 0e+x
11-
print 0ex
10+
# print 0e+x # GoAWK behaviour is different (saner!) here
11+
# print 0ex # GoAWK behaviour is different (saner!) here
1212
print 010e2
1313
print 0e9.3
1414
}

testdata/gawk/hex.ok

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
1 600000
22
06e5(x)
3-
0600001
4-
03e2(ex)
53
1000
64
00.3

0 commit comments

Comments
 (0)