diff options
author | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2016-06-20 10:10:30 -0400 |
---|---|---|
committer | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2016-06-20 10:10:30 -0400 |
commit | 2d2744ec74076d29e94a2a004e308f73a86b9fa5 (patch) | |
tree | 0238d94fc263fd3cc6b2b9e5dc62204e5a985d5a /test | |
parent | 239d7cc07ec54ec7a69805f9a674bfbbbd72f9b1 (diff) | |
download | egawk-2d2744ec74076d29e94a2a004e308f73a86b9fa5.tar.gz egawk-2d2744ec74076d29e94a2a004e308f73a86b9fa5.tar.bz2 egawk-2d2744ec74076d29e94a2a004e308f73a86b9fa5.zip |
Call fixtype in a few more places to make sure we check types properly.
Diffstat (limited to 'test')
-rw-r--r-- | test/ChangeLog | 5 | ||||
-rw-r--r-- | test/Makefile.am | 4 | ||||
-rw-r--r-- | test/strnum2.awk | 10 | ||||
-rw-r--r-- | test/strnum2.ok | 2 |
4 files changed, 20 insertions, 1 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index e667de55..5a575841 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,8 @@ +2016-06-20 Andrew J. Schorr <aschorr@telemetry-investments.com> + + * Makefile.am (strnum2): New test. + * strnum2.awk, strnum2.ok: New files. + 2016-06-14 Arnold D. Robbins <arnold@skeeve.com> * Makefile.am (subback): New test. diff --git a/test/Makefile.am b/test/Makefile.am index 6c893cce..499107c5 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -999,6 +999,8 @@ EXTRA_DIST = \ strftlng.ok \ strnum1.awk \ strnum1.ok \ + strnum2.awk \ + strnum2.ok \ strtod.awk \ strtod.in \ strtod.ok \ @@ -1165,7 +1167,7 @@ BASIC_TESTS = \ reparse resplit rri1 rs rscompat rsnul1nl rsnulbig rsnulbig2 rstest1 rstest2 \ rstest3 rstest4 rstest5 rswhite \ scalar sclforin sclifin sigpipe1 sortempty sortglos splitargv splitarr splitdef \ - splitvar splitwht strcat1 strnum1 strtod subamp subback subi18n \ + splitvar splitwht strcat1 strnum1 strnum2 strtod subamp subback subi18n \ subsepnm subslash substr swaplns synerr1 synerr2 tradanch tweakfld \ uninit2 uninit3 uninit4 uninit5 uninitialized unterm uparrfs \ wideidx wideidx2 widesub widesub2 widesub3 widesub4 wjposer1 \ diff --git a/test/strnum2.awk b/test/strnum2.awk new file mode 100644 index 00000000..16e6f5d0 --- /dev/null +++ b/test/strnum2.awk @@ -0,0 +1,10 @@ +BEGIN { + split("1.234", f) + OFMT = "%.1f" + # check whether strnum is displayed the same way before and + # after force_number is called. Also, should numeric strings + # be formatted with OFMT or show the original string value? + print f[1] + x = f[1]+0 # trigger conversion to NUMBER + print f[1] +} diff --git a/test/strnum2.ok b/test/strnum2.ok new file mode 100644 index 00000000..f5103ca9 --- /dev/null +++ b/test/strnum2.ok @@ -0,0 +1,2 @@ +1.2 +1.2 |