diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ChangeLog | 6 | ||||
-rw-r--r-- | test/Makefile.am | 10 | ||||
-rw-r--r-- | test/Makefile.in | 20 | ||||
-rw-r--r-- | test/Maketests | 10 | ||||
-rw-r--r-- | test/mpfrcase.awk | 4 | ||||
-rw-r--r-- | test/mpfrcase.in | 1 | ||||
-rw-r--r-- | test/mpfrcase.ok | 1 | ||||
-rw-r--r-- | test/mpfrnonum.awk | 1 | ||||
-rw-r--r-- | test/mpfrnonum.in | 3 | ||||
-rw-r--r-- | test/mpfrnonum.ok | 3 |
10 files changed, 55 insertions, 4 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index a85ef93b..d70282a8 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,9 @@ +2020-07-05 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (EXTRA_DIST): New tests, mpfrcase, mpfrnonum. + * mpfrcase.awk, mpfrcase.in, mpfrcase.ok, + mpfrnonum.awk, mpfrnonum.in, mpfrnonum.ok: New files. + 2020-07-02 Arnold D. Robbins <arnold@skeeve.com> * Makefile.am (EXTRA_DIST): New test, posix_compare. diff --git a/test/Makefile.am b/test/Makefile.am index 9be24a4c..7a1b4491 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -700,6 +700,9 @@ EXTRA_DIST = \ mpfrbigint2.awk \ mpfrbigint2.in \ mpfrbigint2.ok \ + mpfrcase.awk \ + mpfrcase.in \ + mpfrcase.ok \ mpfrexprange.awk \ mpfrexprange.ok \ mpfrfield.awk \ @@ -711,6 +714,9 @@ EXTRA_DIST = \ mpfrmemok1.ok \ mpfrnegzero.awk \ mpfrnegzero.ok \ + mpfrnonum.awk \ + mpfrnonum.in \ + mpfrnonum.ok \ mpfrnr.awk \ mpfrnr.in \ mpfrnr.ok \ @@ -1461,8 +1467,8 @@ NEED_LINT = \ NEED_LINT_OLD = lintold # List of tests that must be run with -M -NEED_MPFR = mpfrbigint mpfrbigint2 mpfrexprange mpfrfield mpfrieee mpfrmemok1 \ - mpfrnegzero mpfrnr mpfrrem mpfrrnd mpfrrndeval mpfrsort mpfrsqrt \ +NEED_MPFR = mpfrbigint mpfrbigint2 mpfrcase mpfrexprange mpfrfield mpfrieee mpfrmemok1 \ + mpfrnegzero mpfrnonum mpfrnr mpfrrem mpfrrnd mpfrrndeval mpfrsort mpfrsqrt \ mpfrstrtonum mpgforcenum mpfruplus mpfranswer42 # List of tests that need --non-decimal-data diff --git a/test/Makefile.in b/test/Makefile.in index fae611a4..dc691adb 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -963,6 +963,9 @@ EXTRA_DIST = \ mpfrbigint2.awk \ mpfrbigint2.in \ mpfrbigint2.ok \ + mpfrcase.awk \ + mpfrcase.in \ + mpfrcase.ok \ mpfrexprange.awk \ mpfrexprange.ok \ mpfrfield.awk \ @@ -974,6 +977,9 @@ EXTRA_DIST = \ mpfrmemok1.ok \ mpfrnegzero.awk \ mpfrnegzero.ok \ + mpfrnonum.awk \ + mpfrnonum.in \ + mpfrnonum.ok \ mpfrnr.awk \ mpfrnr.in \ mpfrnr.ok \ @@ -1722,8 +1728,8 @@ NEED_LINT = \ NEED_LINT_OLD = lintold # List of tests that must be run with -M -NEED_MPFR = mpfrbigint mpfrbigint2 mpfrexprange mpfrfield mpfrieee mpfrmemok1 \ - mpfrnegzero mpfrnr mpfrrem mpfrrnd mpfrrndeval mpfrsort mpfrsqrt \ +NEED_MPFR = mpfrbigint mpfrbigint2 mpfrcase mpfrexprange mpfrfield mpfrieee mpfrmemok1 \ + mpfrnegzero mpfrnonum mpfrnr mpfrrem mpfrrnd mpfrrndeval mpfrsort mpfrsqrt \ mpfrstrtonum mpgforcenum mpfruplus mpfranswer42 @@ -5113,6 +5119,11 @@ mpfrbigint2: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk -M --non-decimal-data < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +mpfrcase: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk -M < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + mpfrfield: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk -M < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -5123,6 +5134,11 @@ mpfrnegzero: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk -M >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +mpfrnonum: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk -M < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + mpfrnr: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk -M < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/Maketests b/test/Maketests index f7aaa152..7fb3b3af 100644 --- a/test/Maketests +++ b/test/Maketests @@ -2236,6 +2236,11 @@ mpfrbigint2: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk -M --non-decimal-data < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +mpfrcase: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk -M < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + mpfrfield: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk -M < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -2246,6 +2251,11 @@ mpfrnegzero: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk -M >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +mpfrnonum: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk -M < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + mpfrnr: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk -M < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/mpfrcase.awk b/test/mpfrcase.awk new file mode 100644 index 00000000..4ecd75b6 --- /dev/null +++ b/test/mpfrcase.awk @@ -0,0 +1,4 @@ +{ + switch ($1) { case "A" : arr[1] = $1 } + print "value: " arr[1] +} diff --git a/test/mpfrcase.in b/test/mpfrcase.in new file mode 100644 index 00000000..f70f10e4 --- /dev/null +++ b/test/mpfrcase.in @@ -0,0 +1 @@ +A diff --git a/test/mpfrcase.ok b/test/mpfrcase.ok new file mode 100644 index 00000000..f101f2fd --- /dev/null +++ b/test/mpfrcase.ok @@ -0,0 +1 @@ +value: A diff --git a/test/mpfrnonum.awk b/test/mpfrnonum.awk new file mode 100644 index 00000000..52fc0d21 --- /dev/null +++ b/test/mpfrnonum.awk @@ -0,0 +1 @@ +{ if ($1) print "must print " $1 } diff --git a/test/mpfrnonum.in b/test/mpfrnonum.in new file mode 100644 index 00000000..bc8cd668 --- /dev/null +++ b/test/mpfrnonum.in @@ -0,0 +1,3 @@ ++ +- +1 diff --git a/test/mpfrnonum.ok b/test/mpfrnonum.ok new file mode 100644 index 00000000..ea7201fc --- /dev/null +++ b/test/mpfrnonum.ok @@ -0,0 +1,3 @@ +must print + +must print - +must print 1 |