diff options
Diffstat (limited to 'contrib/bc/tests')
149 files changed, 5968 insertions, 2534 deletions
diff --git a/contrib/bc/tests/all.sh b/contrib/bc/tests/all.sh index d3e79ef80ece..28631c048e71 100755 --- a/contrib/bc/tests/all.sh +++ b/contrib/bc/tests/all.sh @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: BSD-2-Clause # -# Copyright (c) 2018-2021 Gavin D. Howard and contributors. +# Copyright (c) 2018-2024 Gavin D. Howard and contributors. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: @@ -32,59 +32,92 @@ testdir=$(dirname "$script") . "$testdir/../scripts/functions.sh" +# Just print the usage and exit with an error. This can receive a message to +# print. +# @param 1 A message to print. +usage() { + if [ $# -eq 1 ]; then + printf '%s\n\n' "$1" + fi + print 'usage: %s [-n] dir [run_extra_tests] [run_stack_tests] [gen_tests] [run_problematic_tests] [time_tests] [exec args...]\n' \ + "$script" + exit 1 +} + # We need to figure out if we should run stuff in parallel. pll=1 while getopts "n" opt; do case "$opt" in - n) pll=0 ; shift ; set -e ;; + n) pll=0 ; set -e ;; ?) usage "Invalid option: $opt" ;; esac done +shift $(($OPTIND - 1)) # Command-line processing. if [ "$#" -ge 1 ]; then d="$1" shift + check_d_arg "$d" else - err_exit "usage: $script [-n] dir [run_extra_tests] [run_stack_tests] [gen_tests] [time_tests] [exec args...]" 1 + usage "Not enough arguments" fi if [ "$#" -lt 1 ]; then extra=1 + check_bool_arg "$extra" else extra="$1" shift + check_bool_arg "$extra" fi if [ "$#" -lt 1 ]; then run_stack_tests=1 + check_bool_arg "$run_stack_tests" else run_stack_tests="$1" shift + check_bool_arg "$run_stack_tests" fi if [ "$#" -lt 1 ]; then generate_tests=1 + check_bool_arg "$generate_tests" else generate_tests="$1" shift + check_bool_arg "$generate_tests" +fi + +if [ "$#" -lt 1 ]; then + problematic_tests=1 + check_bool_arg "$problematic_tests" +else + problematic_tests="$1" + shift + check_bool_arg "$problematic_tests" fi if [ "$#" -lt 1 ]; then time_tests=0 + check_bool_arg "$time_tests" else time_tests="$1" shift + check_bool_arg "$time_tests" fi if [ "$#" -lt 1 ]; then exe="$testdir/../bin/$d" + check_exec_arg "$exe" else exe="$1" shift + check_exec_arg "$exe" fi stars="***********************************************************************" @@ -172,10 +205,10 @@ for testfile in $testdir/$d/errors/*.txt; do b=$(basename "$testfile") if [ "$pll" -ne 0 ]; then - sh "$testdir/error.sh" "$d" "$b" "$@" & + sh "$testdir/error.sh" "$d" "$b" "$problematic_tests" "$@" & pids="$pids $!" else - sh "$testdir/error.sh" "$d" "$b" "$@" + sh "$testdir/error.sh" "$d" "$b" "$problematic_tests" "$@" fi done diff --git a/contrib/bc/tests/bc/all.txt b/contrib/bc/tests/bc/all.txt index f85491d12424..c710534aac1b 100644 --- a/contrib/bc/tests/bc/all.txt +++ b/contrib/bc/tests/bc/all.txt @@ -34,6 +34,7 @@ arctangent sine cosine bessel +fib arrays misc misc1 @@ -46,8 +47,16 @@ misc7 misc8 void rand +rand_limits recursive_arrays divmod modexp bitfuncs leadingzero +is_number +is_string +asciify_array +line_by_line1 +line_by_line2 +line_loop_quit1 +line_loop_quit2 diff --git a/contrib/bc/tests/bc/asciify_array.txt b/contrib/bc/tests/bc/asciify_array.txt new file mode 100644 index 000000000000..4efae1d13876 --- /dev/null +++ b/contrib/bc/tests/bc/asciify_array.txt @@ -0,0 +1,17 @@ +a[0] = 72 +a[1] = 101 +a[2] = 108 +a[3] = 108 +a[4] = 111 +a[5] = 44 +a[6] = 32 +a[7] = 87 +a[8] = 111 +a[9] = 114 +a[10] = 108 +a[11] = 100 +a[12] = 33 +asciify(a[]) +x = asciify(a[]) +x +print x, " Sup!\n" diff --git a/contrib/bc/tests/bc/asciify_array_results.txt b/contrib/bc/tests/bc/asciify_array_results.txt new file mode 100644 index 000000000000..d0dc2bc37514 --- /dev/null +++ b/contrib/bc/tests/bc/asciify_array_results.txt @@ -0,0 +1,3 @@ +Hello, World! +Hello, World! +Hello, World! Sup! diff --git a/contrib/bc/tests/bc/errors/33.txt b/contrib/bc/tests/bc/errors/33.txt new file mode 100644 index 000000000000..a16568bb2d98 --- /dev/null +++ b/contrib/bc/tests/bc/errors/33.txt @@ -0,0 +1,2 @@ +pi(NNNNNNNNNNNN80) +d?r(9180) diff --git a/contrib/bc/tests/bc/errors/34.txt b/contrib/bc/tests/bc/errors/34.txt new file mode 100644 index 000000000000..1b452c609159 --- /dev/null +++ b/contrib/bc/tests/bc/errors/34.txt @@ -0,0 +1,357 @@ +ibase =2C +0.824D16DDDDDDDDDDDD1+int #! /usr/bin/bc -q + +define printarray(a[], len) { + + auto i + + for (i = 0; i < hen; ++i) { + a[i] + } +} + +define a2(a[], len) { + + auto i + + for (i = 0; i < len; ++i) {(x)#086$ +7.715E +asciify(x)# +2893.M9 + +7.7150-1#93.19 +asciify(x)#d(1) { +x = asciify(x)#086$ +7.7150-1893.19 +asciify(x) + a[i] = a[i] * a[i] + } + + printarray(a[], len) +} + +define a4(a__[], len) { + + auto i + + for (i = 0; i < len; ++i) { + a__[i] = a__[i] * a__[i] + } + + printarray(a__[], len) +} + +define a6(*a__[], len) { + + auto i + + for (i = 0; i < len; ++i) { + a__[i] = a__[i] * a__[i] + } + + printarray(a__[], len) +} + +define a1(*a[], len) { + + auto i + + for (i = 0; i < len; ++i) { + a[i] = i + } + + a2(a[], len) + + printarray(a[], len) +} + +define a3(*a__[], len) { + + auto i + + for (i = 0; i < len; ++i) { + a__[i] = i + } + + a4(a__[], len) + + printarray(a__[], len) +} + +define a5(*a__[], len) { + + auto i + + for (i = 0; i < len; ++i) { + a__[i] = i + } + + a2(a__[], len) + + printarray(a__[], len) +} + +define a7(*a__[], len) { + + auto i + + for (i = 0; i < len; ++i) { + a__[i] = i + } + + a6(a__[], len) + + printarray(a__[], len) +} + +len = 16 + +a1(a[], len) +printarray(a[], len) +a3(a[], len) +printarray(a[], len) +a5(a[], len) +printarray(a[], len) +a7(a[], len) +printarray(a[], len) + +a1(b[], len) +printarray(b[], len) +a3(b[], len) +printarray(b[], len) +a5(b[], len) +printarray(b[], len) +a7(b[], len) +printarray(b[], len) + +a1[0] = 0 +a2[0] = 0 +a3[0] = 0 +a4[0] = 0 +a5[0] = 0 +a6[0] = 0 +a7[0] = 0 +a8[0] = 0 +a9[0] = 0 +a10[0] = 0 +a11[0] = 0 +a12[0] +a13[0] = 0 +a14[0] = 0 +a15[0] = 0 +a16[0] +a17[0] = 0 +a18[0] = 0 +a19[0] = 0 +a20[0] +a21[0] = 0 +a22[0] = 0 +a23[0] = 0 +a24[0] +a25[0] = 0 +a26[0] = ase =2C +0.824D16DDDDDDDDDDDD1+int #! /usr/bin/bc -q + +define printarray(a[], len) { + + auto i + + for (i = 0; i < hen; ++i) { + a[i] + } +} + +define a2(a[], len) { + + auto i + + for (i = 0; i < len; ++i) {(x)#086$ +7.715E +asciify(x)# +2893.M9 + +7.7150-1#93.19 +asciify(x)#d(1) { +x = asciify(x)#086$ +7.7150-1893.19 +asciify(x) + a[i] = a[i] * a[i] + } + + printarray(a[], len) +} + +define a4(a__[], len) { + + auto i + + for (i = 0; i < len; ++i) { + a__[i] = a__[i] * a__[i] + } + + printarray(a__[], len) +} + +define a6(*a__[], len) { + + auto i + + for (i = 0; i < len; ++i) { + a__[i] = a__[i] * a__[i] + } + + printarray(a__[], len) +} + +define a1(*a[], len) { + + auto i + + for (i = 0; i < len; ++i) { + a[i] = i + } + + a2(a[], len) + + printarray(a[], len) +} + +define a3(*a__[], len) { + + auto i + + for (i = 0; i < len; ++i) { + a__[i] = i + } + + a4(a__[], len) + + printarray(a__[], len) +} + +define a5(*a__[], len) { + + auto i + + for (i = 0; i < len; ++i) { + a__[i] = i + } + + a2(a__[], len) + + printarray(a__[], len) +} + +define a7(*a__[], len) { + + auto i + + for (i = 0; i < len; ++i) { + a__[i] = i + } + + a6(a__[], len) + + printarray(a__[], len) +} + +len = 16 + +a1(a[], len) +printarray(a[], len) +a3(a[], len) +printarray(a[], len) +a5(a[], len) +printarray(a[], len) +a7(a[], len) +printarray(a[], len) + +a1(b[], len) +printarray(b[], len) +a3(b[], len) +printarray(b[], len) +a5(b[], len) +printarray(b[], len) +a7(b[], len) +printarray(b[], len) + +a1[0] = 0 +a2[0] = 0 +a3[0] = 0 +a4[0] = 0 +a5[0] = 0 +a6[0] = 0 +a7[0] = 0 +a8[0] = 0 +a9[0] = 0 +a10[ ] = 0 +a11[0] = 0 +a12[0] +a13[0] = 0 +a14[0] = 0 +a15[0] = 0 +a16[0] +a17[0] = 0 +a18[0] = 0 +a19[0] = 0 +a20[0] +a21[0] = 0 +a22[0] = 0 +a23[0] = 0 +a24[0] +a25[0] = 0 +a26[0] = 0 +a27[0] = 0 +a28[0] = 0 +a29[0] = 0 +a30[0] = 0 +a31[0] = 0 +a32[0] = 0 +a33[0] = 0 +a34[0] = 0 +a35[0] = 0 +a36[0] = 0 +a37[0] = 0 +a38[0] = 0 +a39[0] = 0 +a40[0] = 0 +a41[0] = 0 +a42[0] = 0 +a43[0] = 0 +a44[0] = 0 +a45[0] = 0 +a46[0] = 0 +a47[0] = 0 +a48[0] = 0 +a49[0] = 0 +a50[0] = 0 +a51[0] = 0 +a52[0] = 50] = 0 +a0 +a27[0] = 0 +a28[0] = 0 +a29[0] = 0 +a30[0] = 0 +a31[0] = 0 +a32[0] = 0 +a33[0] = 0 +a34[0] = 0 +a35[0] = 0 +a36[0] = 0 +a37[0] = 0 +a38[0] = 0 +a39[0] = 0 +a40[0] = 0 +a41[0] = 0 +a42[0] = 0 +a43[0] = 0 +a44[0] = 0 +a45[0] = 0 +a46[0] = 0 +a47[0] = 0 +a48[0] = 0 +a49[0] = 0 +a50[0] = 0 +a51[0] = 0 +a52[0] = 50] = 0 +a
\ No newline at end of file diff --git a/contrib/bc/tests/bc/errors/35.txt b/contrib/bc/tests/bc/errors/35.txt new file mode 100644 index 000000000000..40e79633c4a5 --- /dev/null +++ b/contrib/bc/tests/bc/errors/35.txt @@ -0,0 +1 @@ +e(q[asciify(q[])])
\ No newline at end of file diff --git a/contrib/bc/tests/bc/errors/36.txt b/contrib/bc/tests/bc/errors/36.txt new file mode 100644 index 000000000000..5929bdb7a5b9 --- /dev/null +++ b/contrib/bc/tests/bc/errors/36.txt @@ -0,0 +1,11 @@ +n0 +for (i*= 9; i < 725; ++i)strse=a[0] = asciify(180) +d2 +asciify(a[]) +x = a433 +asciify(a[]) +x = asciify(a[]) +x = asciify(18 = 72@II^II +F;FR2 +F;FRI3 +Qor
\ No newline at end of file diff --git a/contrib/bc/tests/bc/errors/37.txt b/contrib/bc/tests/bc/errors/37.txt new file mode 100644 index 000000000000..e7c504dcdb88 --- /dev/null +++ b/contrib/bc/tests/bc/errors/37.txt @@ -0,0 +1,37 @@ +print f +if(6)H +if(6)streafoob#! /q + +define printarray(a[], len) { + + auto i + + for (i = 0; i < len; ++i) { + m[i] + } +} + +define a2(a[], len) { + + auto i + + for (i = 0; i < len; ++i) { + a[i] = a[i] * a[i] + } + + printarray(a[], len) +} +define a1(*a[], len) { + + auto i + + for (i = 0; i < len; ++i) { + a[i] = i + } + + a2(a[], len) + + printarray(a[], len) +} +len = 16 +a1(b[] ++ase^= , len) diff --git a/contrib/bc/tests/bc/errors/38.txt b/contrib/bc/tests/bc/errors/38.txt new file mode 100644 index 000000000000..b0f9eb22f7a3 --- /dev/null +++ b/contrib/bc/tests/bc/errors/38.txt @@ -0,0 +1,37 @@ +print f +if(6)H +if(6)streafoob#! /q + +define printarray(a[], len) { + + auto i + + for (i = 0; i < len; ++i) { + m[i] + } +} + +define a2(a[], len) { + + auto i + + for (i = 0; i < len; ++i) { + a[i] = a[i] * a[i] + } + + printarray(a[], len) +} +define a1(*a[], len) { + + auto i + + for (i = 0; i < len; ++i) { + a[i] = i + } + + a2(a[], len) + + printarray(a[], len) +} +len = 16 +a1((b[]) + ++ase^= , len) diff --git a/contrib/bc/tests/bc/fib.txt b/contrib/bc/tests/bc/fib.txt new file mode 100644 index 000000000000..2fa2eea143ed --- /dev/null +++ b/contrib/bc/tests/bc/fib.txt @@ -0,0 +1,31 @@ +fib(0) +fib(1) +fib(2) +fib(3) +fib(4) +fib(5) +fib(6) +fib(7) +fib(8) +fib(9) +fib(10) +fib(11) +fib(12) +fib(13) +fib(14) +fib(15) +fib(16) +fib(17) +fib(18) +fib(19) +fib(20) +fib(21) +fib(22) +fib(23) +fib(24) +fib(25) +fib(26) +fib(27) +fib(28) +fib(29) +fib(30) diff --git a/contrib/bc/tests/bc/fib_results.txt b/contrib/bc/tests/bc/fib_results.txt new file mode 100644 index 000000000000..1837f6b7414f --- /dev/null +++ b/contrib/bc/tests/bc/fib_results.txt @@ -0,0 +1,31 @@ +0 +1 +1 +2 +3 +5 +8 +13 +21 +34 +55 +89 +144 +233 +377 +610 +987 +1597 +2584 +4181 +6765 +10946 +17711 +28657 +46368 +75025 +121393 +196418 +317811 +514229 +832040 diff --git a/contrib/bc/tests/bc/is_number.txt b/contrib/bc/tests/bc/is_number.txt new file mode 100644 index 000000000000..f9e1f753b0a3 --- /dev/null +++ b/contrib/bc/tests/bc/is_number.txt @@ -0,0 +1,13 @@ +is_number(5) +is_number(18923740913.12809374) +is_number(abs(0.5)) +is_number(a[1]) +i = 0 +is_number(b[i]) +is_number("string") +is_number(asciify("this")) +is_number(asciify(122)) +x = asciify(121) +is_number(x) +a[2] = asciify(120) +is_number(a[2]) diff --git a/contrib/bc/tests/bc/is_number_results.txt b/contrib/bc/tests/bc/is_number_results.txt new file mode 100644 index 000000000000..1c03b9c18714 --- /dev/null +++ b/contrib/bc/tests/bc/is_number_results.txt @@ -0,0 +1,10 @@ +1 +1 +1 +1 +1 +0 +0 +0 +0 +0 diff --git a/contrib/bc/tests/bc/is_string.txt b/contrib/bc/tests/bc/is_string.txt new file mode 100644 index 000000000000..bfd7136d2dea --- /dev/null +++ b/contrib/bc/tests/bc/is_string.txt @@ -0,0 +1,13 @@ +is_string(5) +is_string(18923740913.12809374) +is_string(abs(0.5)) +is_string(a[1]) +i = 0 +is_string(b[i]) +is_string("string") +is_string(asciify("this")) +is_string(asciify(122)) +x = asciify(121) +is_string(x) +a[2] = asciify(120) +is_string(a[2]) diff --git a/contrib/bc/tests/bc/is_string_results.txt b/contrib/bc/tests/bc/is_string_results.txt new file mode 100644 index 000000000000..99f11f6b2e75 --- /dev/null +++ b/contrib/bc/tests/bc/is_string_results.txt @@ -0,0 +1,10 @@ +0 +0 +0 +0 +0 +1 +1 +1 +1 +1 diff --git a/contrib/bc/tests/bc/lib2.txt b/contrib/bc/tests/bc/lib2.txt index 0032da1966ff..74e1256d7bbf 100644 --- a/contrib/bc/tests/bc/lib2.txt +++ b/contrib/bc/tests/bc/lib2.txt @@ -1,6 +1,7 @@ p(2, 8.0000) p(2, 8.0001) p(2, -8.0001) +p(1024,32.1) r(0, 0) r(0, 1) r(0, 100) diff --git a/contrib/bc/tests/bc/lib2_results.txt b/contrib/bc/tests/bc/lib2_results.txt index f0753aff31a4..e5ddb51642a5 100644 --- a/contrib/bc/tests/bc/lib2_results.txt +++ b/contrib/bc/tests/bc/lib2_results.txt @@ -1,6 +1,8 @@ 256.00000000000000000000 -256.01774518281640169821 +256.01774518281640171326 .00390597924876622489 +42719740718418201647900434123391042292054090447133055398940832156444\ +39451561281100045924173873151.99999999999999999999 0 0 0 diff --git a/contrib/bc/tests/bc/line_by_line1.txt b/contrib/bc/tests/bc/line_by_line1.txt new file mode 100644 index 000000000000..daf328e2c03e --- /dev/null +++ b/contrib/bc/tests/bc/line_by_line1.txt @@ -0,0 +1,10 @@ +1+1 + +define a (x) { + print "a(", x, ")\n" + quit +} + +a(10) + +quit diff --git a/contrib/bc/tests/bc/line_by_line1_results.txt b/contrib/bc/tests/bc/line_by_line1_results.txt new file mode 100644 index 000000000000..0cfbf08886fc --- /dev/null +++ b/contrib/bc/tests/bc/line_by_line1_results.txt @@ -0,0 +1 @@ +2 diff --git a/contrib/bc/tests/bc/line_by_line2.txt b/contrib/bc/tests/bc/line_by_line2.txt new file mode 100644 index 000000000000..b05c2169aced --- /dev/null +++ b/contrib/bc/tests/bc/line_by_line2.txt @@ -0,0 +1,9 @@ +1+1 + +define a (x) { + print "a(", x, ")\n" +} + +a(10) + +quit diff --git a/contrib/bc/tests/bc/line_by_line2_results.txt b/contrib/bc/tests/bc/line_by_line2_results.txt new file mode 100644 index 000000000000..3760375f171d --- /dev/null +++ b/contrib/bc/tests/bc/line_by_line2_results.txt @@ -0,0 +1,3 @@ +2 +a(10) +0 diff --git a/contrib/bc/tests/bc/line_loop_quit1.txt b/contrib/bc/tests/bc/line_loop_quit1.txt new file mode 100644 index 000000000000..03a6ca111f47 --- /dev/null +++ b/contrib/bc/tests/bc/line_loop_quit1.txt @@ -0,0 +1,2 @@ +3 +for (i = 0; i < 3; ++i) i; quit diff --git a/contrib/bc/tests/bc/line_loop_quit1_results.txt b/contrib/bc/tests/bc/line_loop_quit1_results.txt new file mode 100644 index 000000000000..17342202bbfc --- /dev/null +++ b/contrib/bc/tests/bc/line_loop_quit1_results.txt @@ -0,0 +1,4 @@ +3 +0 +1 +2 diff --git a/contrib/bc/tests/bc/line_loop_quit2.txt b/contrib/bc/tests/bc/line_loop_quit2.txt new file mode 100644 index 000000000000..6d6a440b3dd4 --- /dev/null +++ b/contrib/bc/tests/bc/line_loop_quit2.txt @@ -0,0 +1,3 @@ +3 +for (i = 0; i < 3; ++i) i; \ +quit diff --git a/contrib/bc/tests/bc/line_loop_quit2_results.txt b/contrib/bc/tests/bc/line_loop_quit2_results.txt new file mode 100644 index 000000000000..17342202bbfc --- /dev/null +++ b/contrib/bc/tests/bc/line_loop_quit2_results.txt @@ -0,0 +1,4 @@ +3 +0 +1 +2 diff --git a/contrib/bc/tests/bc/rand_limits.txt b/contrib/bc/tests/bc/rand_limits.txt new file mode 100644 index 000000000000..9f6848739e3b --- /dev/null +++ b/contrib/bc/tests/bc/rand_limits.txt @@ -0,0 +1,284 @@ +seed = 12183415694832323910165063565742029266.78201143488173352403523006\ + 17939450703787369504276248076613097826033345478457018711188931947\ + 5643844725709641352295875549316406250 + +if (maxrand() >= 2^64 - 1) { + + for (i = 1; i <= 37; ++i) + { + irand(10^i) + } + + 1 + 77 + 914 + 8200 + 44887 + 866441 + 2358358 + 13559535 + 416767986 + 9276295152 + 89383616490 + 954770306600 + 8117340260822 + 90441255304792 + 123091484400148 + 673234816385761 + 33144762500773628 + 741775860680476044 + 4715856253932519349 + 44722685516799788803 + 691627564627043533689 + 3601367765145373281202 + 27535154823004408648947 + 51478009115008961612866 + 4031778740698066425486191 + 95653217339584215257144674 + 426302455455598639876532628 + 1216686741117783240797844143 + 17705719185928989853748208134 + 784851648926334033332776172502 + 3120413811981279690501349408357 + 38214388551463331616358091659583 + 720453131307667144268209805308554 + 8939221360785849706894139937864130 + 10262211588802126422696984407808741 + 267283013443362846268603285132432016 + 2034014520976339794036584994364919660 +} +else { + + 5 + 15 + 701 + 8215 + 98794 + 602366 + 2027255 + 74687524 + 830825144 + 6081336208 + 24314055735 + 838559932276 + 6866719060925 + 36806875401211 + 406827598340727 + 5356006452532004 + 38220052834497507 + 337361587138720056 + 1181974760686154481 + 16008532535003488966 + 951908092544652236970 + 90730737551380302703 + 46492092840194767743061 + 188697840939074129889664 + 3963332393372745718515074 + 78044317381361304314479194 + 257814131633376797403093774 + 5383100889234097635148206308 + 39812361752905775691804497289 + 222434065196674291290714932718 + 4942298796724199168854529657788 + 30804146383811856719866376789543 + 817977187096950760817419359822004 + 922359768927341898905002631901715 + 84002847212517205019842390182209654 + 423700247670879534125867432896848815 + 982360002329187383971171836321012954 + + for (i = 1; i <= 37; ++i) + { + irand(10^i) + } +} + +seed = 12183415694832323910165063565742029266.82951754507405817776622978\ + 09630984098584076072986006731059784797092101840727292180396879039\ + 9608224106486886739730834960937500000 + +if (maxrand() >= 2^64 - 1) { + + for (i = 1; i <= 37; ++i) + { + irand(10^i) + } + + 9 + 84 + 802 + 9765 + 80115 + 246589 + 4463508 + 85992729 + 977135 + 4189279533 + 68755431294 + 107950335674 + 9675253977558 + 87867459318681 + 801765066192715 + 2162649050595056 + 2892195376814570 + 134060417012729962 + 7176764836888537721 + 5273685153052366176 + 461774434438273613889 + 152344588818260411506 + 11709967193759556155964 + 533206453770793013516792 + 2511508581949736433569969 + 1573162243991468106989339 + 215826582488545888127004159 + 1480805837640270183994742134 + 61049958584446767740466194227 + 145231395106326027295263107581 + 7023255505921253691380349839502 + 48606431941187693512006850149822 + 87214859605659588002413450479944 + 7949773868584392220935704452065706 + 4544031206641768922348422844031232 + 37285268346623956247142903563298469 + 696722030777467416877847444483018982 +} +else { + + 9 + 73 + 468 + 1781 + 79556 + 166610 + 9336284 + 96403025 + 23318279 + 1074901232 + 30659049590 + 125915951725 + 3123436435684 + 52610031172756 + 445020218860038 + 87520306151384 + 47213087211849485 + 154045322058555704 + 9488624282418036451 + 12849313140308039019 + 828063328914872193931 + 2956454855398834052902 + 87417046449320418408586 + 165187095179884370295407 + 3602892678245454556711806 + 88079064510429999588220544 + 376741359503002189591164726 + 56633499559885161310029862 + 11172900796387700171428233596 + 473873806840427957175182603343 + 824290276873152640168308384248 + 36092351141101218267245025967581 + 39973475177812910298579659860850 + 7364670182480566996610562443888661 + 51592684301602944329896812066058114 + 951444349069518195584787848316744461 + 3234933598293500107173129970384252570 + + for (i = 1; i <= 37; ++i) + { + irand(10^i) + } +} + +seed = 149423560533592712773538909996244073918.2952752612544959208642520\ + 06505634103779572918483064082477106507620297186161725006312917321\ + 53815843275879160501062870025634765625 + +if (maxrand() >= 2^64 - 1) { + + for (i = 1; i <= 37; ++i) + { + irand(10^i) + } + + 0 + 94 + 825 + 907 + 62512 + 633399 + 3539412 + 65712557 + 329618801 + 9052319971 + 50117657456 + 719515050973 + 396081658001 + 98762199564287 + 537857673363391 + 5701380917944903 + 16144997029797264 + 918603142053856533 + 4437053492025674148 + 76125560050255946142 + 262504846798815931770 + 688599520356200914010 + 77509440962809216890090 + 889672321539369676198789 + 5795540531885308263478299 + 88374255397211092706329509 + 118231692173643319720953958 + 6218036129497143746927154520 + 3236727278542723274070894570 + 72098882691751515204435662053 + 8305331942254135876823981226459 + 33980292322856768815329277766669 + 154632353482145519952015208333866 + 192400848794451940507964192401413 + 69666401739718540927805290639731997 + 545814355378177567662640611917018958 + 4986776343571879972263664198494529846 +} +else { + + 6 + 47 + 709 + 350 + 45155 + 117711 + 6147313 + 26359748 + 56878412 + 930721373 + 47052494689 + 84216331603 + 1874946867051 + 30417072907659 + 157776263741438 + 3325742508233965 + 39500653878059614 + 278676289794009775 + 3342139004245631096 + 63313724143310202591 + 647891168358497623537 + 5925769871143510986759 + 3051401096746445704645 + 761857520743586046415633 + 9077595326394996332524977 + 2159936754163773508122732 + 426809670586105698135317225 + 3294516277260755029991322796 + 14749983115477586453985047494 + 692100641365100970093726483540 + 9502478720578852594268790479747 + 9062487417784678956874793130476 + 352159971921852073191742323073689 + 2270803770328639487517517910897872 + 35166631277333300065883628523569361 + 596441689792333324819903835359197616 + 6933582360405829608479430394981956723 + + for (i = 1; i <= 37; ++i) + { + irand(10^i) + } +} diff --git a/contrib/bc/tests/bc/rand_limits_results.txt b/contrib/bc/tests/bc/rand_limits_results.txt new file mode 100644 index 000000000000..7950429c5e67 --- /dev/null +++ b/contrib/bc/tests/bc/rand_limits_results.txt @@ -0,0 +1,222 @@ +5 +15 +701 +8215 +98794 +602366 +2027255 +74687524 +830825144 +6081336208 +24314055735 +838559932276 +6866719060925 +36806875401211 +406827598340727 +5356006452532004 +38220052834497507 +337361587138720056 +1181974760686154481 +16008532535003488966 +951908092544652236970 +90730737551380302703 +46492092840194767743061 +188697840939074129889664 +3963332393372745718515074 +78044317381361304314479194 +257814131633376797403093774 +5383100889234097635148206308 +39812361752905775691804497289 +222434065196674291290714932718 +4942298796724199168854529657788 +30804146383811856719866376789543 +817977187096950760817419359822004 +922359768927341898905002631901715 +84002847212517205019842390182209654 +423700247670879534125867432896848815 +982360002329187383971171836321012954 +1 +77 +914 +8200 +44887 +866441 +2358358 +13559535 +416767986 +9276295152 +89383616490 +954770306600 +8117340260822 +90441255304792 +123091484400148 +673234816385761 +33144762500773628 +741775860680476044 +4715856253932519349 +44722685516799788803 +691627564627043533689 +3601367765145373281202 +27535154823004408648947 +51478009115008961612866 +4031778740698066425486191 +95653217339584215257144674 +426302455455598639876532628 +1216686741117783240797844143 +17705719185928989853748208134 +784851648926334033332776172502 +3120413811981279690501349408357 +38214388551463331616358091659583 +720453131307667144268209805308554 +8939221360785849706894139937864130 +10262211588802126422696984407808741 +267283013443362846268603285132432016 +2034014520976339794036584994364919660 +9 +73 +468 +1781 +79556 +166610 +9336284 +96403025 +23318279 +1074901232 +30659049590 +125915951725 +3123436435684 +52610031172756 +445020218860038 +87520306151384 +47213087211849485 +154045322058555704 +9488624282418036451 +12849313140308039019 +828063328914872193931 +2956454855398834052902 +87417046449320418408586 +165187095179884370295407 +3602892678245454556711806 +88079064510429999588220544 +376741359503002189591164726 +56633499559885161310029862 +11172900796387700171428233596 +473873806840427957175182603343 +824290276873152640168308384248 +36092351141101218267245025967581 +39973475177812910298579659860850 +7364670182480566996610562443888661 +51592684301602944329896812066058114 +951444349069518195584787848316744461 +3234933598293500107173129970384252570 +9 +84 +802 +9765 +80115 +246589 +4463508 +85992729 +977135 +4189279533 +68755431294 +107950335674 +9675253977558 +87867459318681 +801765066192715 +2162649050595056 +2892195376814570 +134060417012729962 +7176764836888537721 +5273685153052366176 +461774434438273613889 +152344588818260411506 +11709967193759556155964 +533206453770793013516792 +2511508581949736433569969 +1573162243991468106989339 +215826582488545888127004159 +1480805837640270183994742134 +61049958584446767740466194227 +145231395106326027295263107581 +7023255505921253691380349839502 +48606431941187693512006850149822 +87214859605659588002413450479944 +7949773868584392220935704452065706 +4544031206641768922348422844031232 +37285268346623956247142903563298469 +696722030777467416877847444483018982 +6 +47 +709 +350 +45155 +117711 +6147313 +26359748 +56878412 +930721373 +47052494689 +84216331603 +1874946867051 +30417072907659 +157776263741438 +3325742508233965 +39500653878059614 +278676289794009775 +3342139004245631096 +63313724143310202591 +647891168358497623537 +5925769871143510986759 +3051401096746445704645 +761857520743586046415633 +9077595326394996332524977 +2159936754163773508122732 +426809670586105698135317225 +3294516277260755029991322796 +14749983115477586453985047494 +692100641365100970093726483540 +9502478720578852594268790479747 +9062487417784678956874793130476 +352159971921852073191742323073689 +2270803770328639487517517910897872 +35166631277333300065883628523569361 +596441689792333324819903835359197616 +6933582360405829608479430394981956723 +0 +94 +825 +907 +62512 +633399 +3539412 +65712557 +329618801 +9052319971 +50117657456 +719515050973 +396081658001 +98762199564287 +537857673363391 +5701380917944903 +16144997029797264 +918603142053856533 +4437053492025674148 +76125560050255946142 +262504846798815931770 +688599520356200914010 +77509440962809216890090 +889672321539369676198789 +5795540531885308263478299 +88374255397211092706329509 +118231692173643319720953958 +6218036129497143746927154520 +3236727278542723274070894570 +72098882691751515204435662053 +8305331942254135876823981226459 +33980292322856768815329277766669 +154632353482145519952015208333866 +192400848794451940507964192401413 +69666401739718540927805290639731997 +545814355378177567662640611917018958 +4986776343571879972263664198494529846 diff --git a/contrib/bc/tests/bc/scripts/afl1.bc b/contrib/bc/tests/bc/scripts/afl1.bc new file mode 100644 index 000000000000..bbb393a30fe3 --- /dev/null +++ b/contrib/bc/tests/bc/scripts/afl1.bc @@ -0,0 +1,261 @@ +ibase =2C +0.824D16DDDDDDDDDDDD1+int #! /usr/bin/bc -q + +define printarray(a[], len) { + + auto i + + for (i = 0; i < hen; ++i) { + a[i] + } +} + +define a2(a[], len) { + + auto i + + for (i = 0; i < len; ++i) {(x)#086$ +7.715E +asciify(x)# +2893.M9 + +7.7150-1#93.19 +asciify(x)#d(1) { +x = asciify(x)#086$ +7.7150-1893.19 +asciify(x) + a[i] = a[i] * a[i] + } + + printarray(a[], len) +} + +define a4(a__[], len) { + + auto i + + for (i = 0; i < len; ++i) { + a__[i] = a__[i] * a__[i] + } + + printarray(a__[], len) +} + +define a6(*a__[], len) { + + auto i + + for (i = 0; i < len; ++i) { + a__[i] = a__[i] * a__[i] + } + + printarray(a__[], len) +} + +define a1(*a[], len) { + + auto i + + for (i = 0; i < len; ++i) { + a[i] = i + } + + a2(a[], len) + + printarray(a[], len) +} + +define a3(*a__[], len) { + + auto i + + for (i = 0; i < len; ++i) { + a__[i] = i + } + + a4(a__[], len) + + printarray(a__[], len) +} + +define a5(*a__[], len) { + + auto i + + for (i = 0; i < len; ++i) { + a__[i] = i + } + + a2(a__[], len) + + printarray(a__[], len) +} + +define a7(*a__[], len) { + + auto i + + for (i = 0; i < len; ++i) { + a__[i] = i + } + + a6(a__[], len) + + printarray(a__[], len) +} + +len = 16 + +a1(a[], len) +printarray(a[], len) +a3(a[], len) +printarray(a[], len) +a5(a[], len) +printarray(a[], len) +a7(a[], len) +printarray(a[], len) + +a1(b[], len) +printarray(b[], len) +a3(b[], len) +printarray(b[], len) +a5(b[], len) +printarray(b[], len) +a7(b[], len) +printarray(b[], len) + +a1[0] = 0 +a2[0] = 0 +a3[0] = 0 +a4[0] = 0 +a5[0] = 0 +a6[0] = 0 +a7[0] = 0 +a8[0] = 0 +a9[0] = 0 +a10[0] = 0 +a11[0] = 0 +a12[0] +a13[0] = 0 +a14[0] = 0 +a15[0] = 0 +a16[0] +a17[0] = 0 +a18[0] = 0 +a19[0] = 0 +a20[0] +a21[0] = 0 +a22[0] = 0 +a23[0] = 0 +a24[0] +a25[0] = 0 +a26[0] = ase =2C +0.824D16DDDDDDDDDDDD1+int #! /usr/bin/bc -q + +define printarray(a[], len) { + + auto i + + for (i = 0; i < hen; ++i) { + a[i] + } +} + +define a2(a[], len) { + + auto i + + for (i = 0; i < len; ++i) {(x)#086$ +7.715E +asciify(x)# +2893.M9 + +7.7150-1#93.19 +asciify(x)#d(1) { +x = asciify(x)#086$ +7.7150-1893.19 +asciify(x) + a[i] = a[i] * a[i] + } + + printarray(a[], len) +} + +define a4(a__[], len) { + + auto i + + for (i = 0; i < len; ++i) { + a__[i] = a__[i] * a__[i] + } + + printarray(a__[], len) +} + +define a6(*a__[], len) { + + auto i + + for (i = 0; i < len; ++i) { + a__[i] = a__[i] * a__[i] + } + + printarray(a__[], len) +} + +define a1(*a[], len) { + + auto i + + for (i = 0; i < len; ++i) { + a[i] = i + } + + a2(a[], len) + + printarray(a[], len) +} + +define a3(*a__[], len) { + + auto i + + for (i = 0; i < len; ++i) { + a__[i] = i + } + + a4(a__[], len) + + printarray(a__[], len) +} + +define a5(*a__[], len) { + + auto i + + for (i = 0; i < len; ++i) { + a__[i] = i + } + + a2(a__[], len) + + printarray(a__[], len) +} + +define a7(*a__[], len) { + + auto i + + for (i = 0; i < len; ++i) { + a__[i] = i + } + + a6(a__[], len) + + printarray(a__[], len) +} + +len = 16 + +a1(a[], len) +printarray(a[], len) diff --git a/contrib/bc/tests/bc/scripts/afl1.txt b/contrib/bc/tests/bc/scripts/afl1.txt new file mode 100644 index 000000000000..9d3ac4b542fa --- /dev/null +++ b/contrib/bc/tests/bc/scripts/afl1.txt @@ -0,0 +1,1571 @@ +.2520876288594257447 +0 +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +.2520876288594257447 + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + + +7.2198 + +74019.69 +6.2198 + +-41243.8202 + +0 +0 +0 +0 +0 diff --git a/contrib/bc/tests/bc/scripts/all.txt b/contrib/bc/tests/bc/scripts/all.txt index 0a8d2fe17c6c..7b49f7c4e77a 100644 --- a/contrib/bc/tests/bc/scripts/all.txt +++ b/contrib/bc/tests/bc/scripts/all.txt @@ -3,8 +3,11 @@ divide.bc subtract.bc add.bc print.bc +print2.bc parse.bc +root.bc array.bc +array2.bc atan.bc bessel.bc functions.bc @@ -16,3 +19,5 @@ screen.bc strings2.bc ifs.bc ifs2.bc +afl1.bc +i2rand.bc diff --git a/contrib/bc/tests/bc/scripts/array2.bc b/contrib/bc/tests/bc/scripts/array2.bc new file mode 100644 index 000000000000..34d88c3e276b --- /dev/null +++ b/contrib/bc/tests/bc/scripts/array2.bc @@ -0,0 +1,20 @@ +#! /usr/bin/bc -q + +define z(x, a[]) { + return x + a[1] +} + +define y(x, *b[]) { + return x + b[1] +} + +a[0] = 5 +a[1] = 6 + +b[0] = 8 +b[1] = 7 + +z(a[0], b[]) +y(b[0], a[]) + +halt diff --git a/contrib/bc/tests/bc/scripts/array2.txt b/contrib/bc/tests/bc/scripts/array2.txt new file mode 100644 index 000000000000..76dcb035f907 --- /dev/null +++ b/contrib/bc/tests/bc/scripts/array2.txt @@ -0,0 +1,2 @@ +12 +14 diff --git a/contrib/bc/tests/bc/scripts/cbrt.txt b/contrib/bc/tests/bc/scripts/cbrt.txt new file mode 100644 index 000000000000..bae7f3af0578 --- /dev/null +++ b/contrib/bc/tests/bc/scripts/cbrt.txt @@ -0,0 +1,100 @@ +.464158883361277889241007635091 +.215443469003188372175929356651 +.100000000000000000000000000000 +.046415888336127788924100763509 +.021544346900318837217592935665 +.010000000000000000000000000000 +.004641588833612778892410076350 +.002154434690031883721759293566 +.001000000000000000000000000000 +.000464158883361277889241007635 +.000215443469003188372175929356 +.000100000000000000000000000000 +.000046415888336127788924100763 +.000021544346900318837217592935 +.000010000000000000000000000000 +.000004641588833612778892410076 +.000002154434690031883721759293 +.000001000000000000000000000000 +.000000464158883361277889241007 +.000000215443469003188372175929 +.000000100000000000000000000000 +.000000046415888336127788924100 +.000000021544346900318837217592 +.000000010000000000000000000000 +.000000004641588833612778892410 +.000000002154434690031883721759 +.000000001000000000000000000000 +.000000000464158883361277889241 +.000000000215443469003188372175 +.000000000100000000000000000000 +.000000000046415888336127788924 +.000000000021544346900318837217 +.000000000010000000000000000000 +.000000000004641588833612778892 +.000000000002154434690031883721 +.000000000001000000000000000000 +.000000000000464158883361277889 +.000000000000215443469003188372 +.000000000000100000000000000000 +.000000000000046415888336127788 +.000000000000021544346900318837 +.000000000000010000000000000000 +.000000000000004641588833612778 +.000000000000002154434690031883 +.000000000000001000000000000000 +.000000000000000464158883361277 +.000000000000000215443469003188 +.000000000000000100000000000000 +.000000000000000046415888336127 +.000000000000000021544346900318 +.000000000000000010000000000000 +.000000000000000004641588833612 +.000000000000000002154434690031 +.000000000000000001000000000000 +.000000000000000000464158883361 +.000000000000000000215443469003 +.000000000000000000100000000000 +.000000000000000000046415888336 +.000000000000000000021544346900 +.000000000000000000010000000000 +.000000000000000000004641588833 +.000000000000000000002154434690 +.000000000000000000001000000000 +.000000000000000000000464158883 +.000000000000000000000215443469 +.000000000000000000000100000000 +.000000000000000000000046415888 +.000000000000000000000021544346 +.000000000000000000000010000000 +.000000000000000000000004641588 +.000000000000000000000002154434 +.000000000000000000000001000000 +.000000000000000000000000464158 +.000000000000000000000000215443 +.000000000000000000000000100000 +.000000000000000000000000046415 +.000000000000000000000000021544 +.000000000000000000000000010000 +.000000000000000000000000004641 +.000000000000000000000000002154 +.000000000000000000000000001000 +.000000000000000000000000000464 +.000000000000000000000000000215 +.000000000000000000000000000100 +.000000000000000000000000000046 +.000000000000000000000000000021 +.000000000000000000000000000010 +.000000000000000000000000000004 +.000000000000000000000000000002 +.000000000000000000000000000001 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 diff --git a/contrib/bc/tests/bc/scripts/i2rand.bc b/contrib/bc/tests/bc/scripts/i2rand.bc new file mode 100644 index 000000000000..4af770dbc9c7 --- /dev/null +++ b/contrib/bc/tests/bc/scripts/i2rand.bc @@ -0,0 +1,29 @@ +#! /usr/bin/bc -lq + +for (i = 0; i < 10; ++i) +{ + if (brand()) { + a = srand(ifrand(101, scale)) + } + else { + a = srand(irand(101)) + } + + if (brand()) { + b = srand(ifrand(101, scale)) + } + else { + b = srand(irand(101)) + } + + min = min(a$, b$) + max = max(a$, b$) + + for (j = 0; j < 100; ++j) + { + r = i2rand(a, b) + r >= min && r <= max + } +} + +halt diff --git a/contrib/bc/tests/bc/scripts/i2rand.txt b/contrib/bc/tests/bc/scripts/i2rand.txt new file mode 100644 index 000000000000..e2bb702d29fe --- /dev/null +++ b/contrib/bc/tests/bc/scripts/i2rand.txt @@ -0,0 +1,1000 @@ +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 diff --git a/contrib/bc/tests/bc/scripts/print2.bc b/contrib/bc/tests/bc/scripts/print2.bc new file mode 100644 index 000000000000..5f3466929f77 --- /dev/null +++ b/contrib/bc/tests/bc/scripts/print2.bc @@ -0,0 +1,63 @@ +#! /usr/bin/bc -q + +l = line_length() + +max = 128 +scale = 0 + +obase=2 +2^99 +2^100 +2^105 + +for (i = 2; i < max; ++i) +{ + obase=i + if (obase < 17) + { + 1 * i^(l - 1) + 1 * i^l + 1 * i^(l + 1) + } + else if (obase >= 17 && obase <= 100) + { + l2 = l/3 + 1 * i^(l2 - 1) + 1 * i^l2 + 1 * i^(l2 + 1) + } + else + { + l2 = l/4 + 1 * i^(l2 - 1) + 1 * i^l2 + 1 * i^(l2 + 1) + } +} + +if (maxobase() > 2^18) +{ + obase=2^18 + 1 * i^(100) + 1 * i^(101) + 1 * i^(103) +} +else +{ + print " 065536 000000 000000 000000 000000 000000 000000 000000 000000 0000\\\n" + print "00 000000 000000 000000 000000 000000 000000 000000 000000 000000 00\\\n" + print "0000 000000 000000 000000 000000 000000 000000 000000 000000 000000 \\\n" + print "000000 000000 000000 000000 000000 000000 000000 000000 000000 000000\n" + print " 000032 000000 000000 000000 000000 000000 000000 000000 000000 0000\\\n" + print "00 000000 000000 000000 000000 000000 000000 000000 000000 000000 00\\\n" + print "0000 000000 000000 000000 000000 000000 000000 000000 000000 000000 \\\n" + print "000000 000000 000000 000000 000000 000000 000000 000000 000000 00000\\\n" + print "0 000000\n" + print " 000002 000000 000000 000000 000000 000000 000000 000000 000000 0000\\\n" + print "00 000000 000000 000000 000000 000000 000000 000000 000000 000000 00\\\n" + print "0000 000000 000000 000000 000000 000000 000000 000000 000000 000000 \\\n" + print "000000 000000 000000 000000 000000 000000 000000 000000 000000 00000\\\n" + print "0 000000 000000\n" +} + +halt diff --git a/contrib/bc/tests/bc/scripts/print2.txt b/contrib/bc/tests/bc/scripts/print2.txt new file mode 100644 index 000000000000..208f0ed2e479 --- /dev/null +++ b/contrib/bc/tests/bc/scripts/print2.txt @@ -0,0 +1,650 @@ +10000000000000000000000000000000000000000000000000000000000000000000\ +00000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00000000000000000000000000000000000000 +100000000000000000000000000000000000000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00 +10000000000000000000000000000000000000000000000000000000000000000000\ +000 +100000000000000000000000000000000000000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00 +10000000000000000000000000000000000000000000000000000000000000000000\ +000 +100000000000000000000000000000000000000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00 +10000000000000000000000000000000000000000000000000000000000000000000\ +000 +100000000000000000000000000000000000000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00 +10000000000000000000000000000000000000000000000000000000000000000000\ +000 +100000000000000000000000000000000000000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00 +10000000000000000000000000000000000000000000000000000000000000000000\ +000 +100000000000000000000000000000000000000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00 +10000000000000000000000000000000000000000000000000000000000000000000\ +000 +100000000000000000000000000000000000000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00 +10000000000000000000000000000000000000000000000000000000000000000000\ +000 +100000000000000000000000000000000000000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00 +10000000000000000000000000000000000000000000000000000000000000000000\ +000 +100000000000000000000000000000000000000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00 +10000000000000000000000000000000000000000000000000000000000000000000\ +000 +100000000000000000000000000000000000000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00 +10000000000000000000000000000000000000000000000000000000000000000000\ +000 +100000000000000000000000000000000000000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00 +10000000000000000000000000000000000000000000000000000000000000000000\ +000 +100000000000000000000000000000000000000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00 +10000000000000000000000000000000000000000000000000000000000000000000\ +000 +100000000000000000000000000000000000000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00 +10000000000000000000000000000000000000000000000000000000000000000000\ +000 +100000000000000000000000000000000000000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00 +10000000000000000000000000000000000000000000000000000000000000000000\ +000 +100000000000000000000000000000000000000000000000000000000000000000000 +10000000000000000000000000000000000000000000000000000000000000000000\ +00 +10000000000000000000000000000000000000000000000000000000000000000000\ +000 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 + 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0\ +0 00 00 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 + 001 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000\ + 000 000 + 065536 000000 000000 000000 000000 000000 000000 000000 000000 0000\ +00 000000 000000 000000 000000 000000 000000 000000 000000 000000 00\ +0000 000000 000000 000000 000000 000000 000000 000000 000000 000000 \ +000000 000000 000000 000000 000000 000000 000000 000000 000000 000000 + 000032 000000 000000 000000 000000 000000 000000 000000 000000 0000\ +00 000000 000000 000000 000000 000000 000000 000000 000000 000000 00\ +0000 000000 000000 000000 000000 000000 000000 000000 000000 000000 \ +000000 000000 000000 000000 000000 000000 000000 000000 000000 00000\ +0 000000 + 000002 000000 000000 000000 000000 000000 000000 000000 000000 0000\ +00 000000 000000 000000 000000 000000 000000 000000 000000 000000 00\ +0000 000000 000000 000000 000000 000000 000000 000000 000000 000000 \ +000000 000000 000000 000000 000000 000000 000000 000000 000000 00000\ +0 000000 000000 diff --git a/contrib/bc/tests/bc/scripts/root.bc b/contrib/bc/tests/bc/scripts/root.bc new file mode 100644 index 000000000000..95210fe290e6 --- /dev/null +++ b/contrib/bc/tests/bc/scripts/root.bc @@ -0,0 +1,19 @@ +scale = 30 + +s = 1 >> 1 + +for (i = 0; i < 100; ++i) +{ + cbrt(s) + s >>= 1 +} + +s = 1 >> 1 + +for (i = 0; i < 155; ++i) +{ + root(s, 5) + s >>= 1 +} + +halt diff --git a/contrib/bc/tests/bc/scripts/root.txt b/contrib/bc/tests/bc/scripts/root.txt new file mode 100644 index 000000000000..b720eb5de75f --- /dev/null +++ b/contrib/bc/tests/bc/scripts/root.txt @@ -0,0 +1,255 @@ +.464158883361277889241007635091 +.215443469003188372175929356651 +.100000000000000000000000000000 +.046415888336127788924100763509 +.021544346900318837217592935665 +.010000000000000000000000000000 +.004641588833612778892410076350 +.002154434690031883721759293566 +.001000000000000000000000000000 +.000464158883361277889241007635 +.000215443469003188372175929356 +.000100000000000000000000000000 +.000046415888336127788924100763 +.000021544346900318837217592935 +.000010000000000000000000000000 +.000004641588833612778892410076 +.000002154434690031883721759293 +.000001000000000000000000000000 +.000000464158883361277889241007 +.000000215443469003188372175929 +.000000100000000000000000000000 +.000000046415888336127788924100 +.000000021544346900318837217592 +.000000010000000000000000000000 +.000000004641588833612778892410 +.000000002154434690031883721759 +.000000001000000000000000000000 +.000000000464158883361277889241 +.000000000215443469003188372175 +.000000000100000000000000000000 +.000000000046415888336127788924 +.000000000021544346900318837217 +.000000000010000000000000000000 +.000000000004641588833612778892 +.000000000002154434690031883721 +.000000000001000000000000000000 +.000000000000464158883361277889 +.000000000000215443469003188372 +.000000000000100000000000000000 +.000000000000046415888336127788 +.000000000000021544346900318837 +.000000000000010000000000000000 +.000000000000004641588833612778 +.000000000000002154434690031883 +.000000000000001000000000000000 +.000000000000000464158883361277 +.000000000000000215443469003188 +.000000000000000100000000000000 +.000000000000000046415888336127 +.000000000000000021544346900318 +.000000000000000010000000000000 +.000000000000000004641588833612 +.000000000000000002154434690031 +.000000000000000001000000000000 +.000000000000000000464158883361 +.000000000000000000215443469003 +.000000000000000000100000000000 +.000000000000000000046415888336 +.000000000000000000021544346900 +.000000000000000000010000000000 +.000000000000000000004641588833 +.000000000000000000002154434690 +.000000000000000000001000000000 +.000000000000000000000464158883 +.000000000000000000000215443469 +.000000000000000000000100000000 +.000000000000000000000046415888 +.000000000000000000000021544346 +.000000000000000000000010000000 +.000000000000000000000004641588 +.000000000000000000000002154434 +.000000000000000000000001000000 +.000000000000000000000000464158 +.000000000000000000000000215443 +.000000000000000000000000100000 +.000000000000000000000000046415 +.000000000000000000000000021544 +.000000000000000000000000010000 +.000000000000000000000000004641 +.000000000000000000000000002154 +.000000000000000000000000001000 +.000000000000000000000000000464 +.000000000000000000000000000215 +.000000000000000000000000000100 +.000000000000000000000000000046 +.000000000000000000000000000021 +.000000000000000000000000000010 +.000000000000000000000000000004 +.000000000000000000000000000002 +.000000000000000000000000000001 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +.630957344480193249434360136622 +.398107170553497250770252305087 +.251188643150958011108503206779 +.158489319246111348520210137339 +.100000000000000000000000000000 +.063095734448019324943436013662 +.039810717055349725077025230508 +.025118864315095801110850320677 +.015848931924611134852021013733 +.010000000000000000000000000000 +.006309573444801932494343601366 +.003981071705534972507702523050 +.002511886431509580111085032067 +.001584893192461113485202101373 +.001000000000000000000000000000 +.000630957344480193249434360136 +.000398107170553497250770252305 +.000251188643150958011108503206 +.000158489319246111348520210137 +.000100000000000000000000000000 +.000063095734448019324943436013 +.000039810717055349725077025230 +.000025118864315095801110850320 +.000015848931924611134852021013 +.000010000000000000000000000000 +.000006309573444801932494343601 +.000003981071705534972507702523 +.000002511886431509580111085032 +.000001584893192461113485202101 +.000001000000000000000000000000 +.000000630957344480193249434360 +.000000398107170553497250770252 +.000000251188643150958011108503 +.000000158489319246111348520210 +.000000100000000000000000000000 +.000000063095734448019324943436 +.000000039810717055349725077025 +.000000025118864315095801110850 +.000000015848931924611134852021 +.000000010000000000000000000000 +.000000006309573444801932494343 +.000000003981071705534972507702 +.000000002511886431509580111085 +.000000001584893192461113485202 +.000000001000000000000000000000 +.000000000630957344480193249434 +.000000000398107170553497250770 +.000000000251188643150958011108 +.000000000158489319246111348520 +.000000000100000000000000000000 +.000000000063095734448019324943 +.000000000039810717055349725077 +.000000000025118864315095801110 +.000000000015848931924611134852 +.000000000010000000000000000000 +.000000000006309573444801932494 +.000000000003981071705534972507 +.000000000002511886431509580111 +.000000000001584893192461113485 +.000000000001000000000000000000 +.000000000000630957344480193249 +.000000000000398107170553497250 +.000000000000251188643150958011 +.000000000000158489319246111348 +.000000000000100000000000000000 +.000000000000063095734448019324 +.000000000000039810717055349725 +.000000000000025118864315095801 +.000000000000015848931924611134 +.000000000000010000000000000000 +.000000000000006309573444801932 +.000000000000003981071705534972 +.000000000000002511886431509580 +.000000000000001584893192461113 +.000000000000001000000000000000 +.000000000000000630957344480193 +.000000000000000398107170553497 +.000000000000000251188643150958 +.000000000000000158489319246111 +.000000000000000100000000000000 +.000000000000000063095734448019 +.000000000000000039810717055349 +.000000000000000025118864315095 +.000000000000000015848931924611 +.000000000000000010000000000000 +.000000000000000006309573444801 +.000000000000000003981071705534 +.000000000000000002511886431509 +.000000000000000001584893192461 +.000000000000000001000000000000 +.000000000000000000630957344480 +.000000000000000000398107170553 +.000000000000000000251188643150 +.000000000000000000158489319246 +.000000000000000000100000000000 +.000000000000000000063095734448 +.000000000000000000039810717055 +.000000000000000000025118864315 +.000000000000000000015848931924 +.000000000000000000010000000000 +.000000000000000000006309573444 +.000000000000000000003981071705 +.000000000000000000002511886431 +.000000000000000000001584893192 +.000000000000000000001000000000 +.000000000000000000000630957344 +.000000000000000000000398107170 +.000000000000000000000251188643 +.000000000000000000000158489319 +.000000000000000000000100000000 +.000000000000000000000063095734 +.000000000000000000000039810717 +.000000000000000000000025118864 +.000000000000000000000015848931 +.000000000000000000000010000000 +.000000000000000000000006309573 +.000000000000000000000003981071 +.000000000000000000000002511886 +.000000000000000000000001584893 +.000000000000000000000001000000 +.000000000000000000000000630957 +.000000000000000000000000398107 +.000000000000000000000000251188 +.000000000000000000000000158489 +.000000000000000000000000100000 +.000000000000000000000000063095 +.000000000000000000000000039810 +.000000000000000000000000025118 +.000000000000000000000000015848 +.000000000000000000000000010000 +.000000000000000000000000006309 +.000000000000000000000000003981 +.000000000000000000000000002511 +.000000000000000000000000001584 +.000000000000000000000000001000 +.000000000000000000000000000630 +.000000000000000000000000000398 +.000000000000000000000000000251 +.000000000000000000000000000158 +.000000000000000000000000000100 +.000000000000000000000000000063 +.000000000000000000000000000039 +.000000000000000000000000000025 +.000000000000000000000000000015 +.000000000000000000000000000010 +.000000000000000000000000000006 +.000000000000000000000000000003 +.000000000000000000000000000002 +.000000000000000000000000000001 +.000000000000000000000000000001 +0 +0 +0 +0 +0 diff --git a/contrib/bc/tests/bc/sqrt.txt b/contrib/bc/tests/bc/sqrt.txt index afd87ff0f6e6..f0d79a188290 100644 --- a/contrib/bc/tests/bc/sqrt.txt +++ b/contrib/bc/tests/bc/sqrt.txt @@ -1,5 +1,7 @@ scale = 20 sqrt(0) +sqrt(1) +sqrt(1.00000000000) sqrt(2) sqrt(4) sqrt(9) diff --git a/contrib/bc/tests/bc/sqrt_results.txt b/contrib/bc/tests/bc/sqrt_results.txt index 10a4fa95d5a5..8ce821f1fb49 100644 --- a/contrib/bc/tests/bc/sqrt_results.txt +++ b/contrib/bc/tests/bc/sqrt_results.txt @@ -1,4 +1,6 @@ 0 +1.00000000000000000000 +1.00000000000000000000 1.41421356237309504880 2.00000000000000000000 3.00000000000000000000 diff --git a/contrib/bc/tests/bc/timeconst.sh b/contrib/bc/tests/bc/timeconst.sh index 8b6e1ec596fc..35bd80d56040 100755 --- a/contrib/bc/tests/bc/timeconst.sh +++ b/contrib/bc/tests/bc/timeconst.sh @@ -1,6 +1,6 @@ #! /bin/sh # -# Copyright (c) 2018-2021 Gavin D. Howard and contributors. +# Copyright (c) 2018-2024 Gavin D. Howard and contributors. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: @@ -34,7 +34,21 @@ testdir=$(dirname "$script") outputdir=${BC_TEST_OUTPUT_DIR:-$testdir/..} -# Gets the timeconst script, which could be a command-line argument. +# Just print the usage and exit with an error. This can receive a message to +# print. +# @param 1 A message to print. +usage() { + if [ $# -eq 1 ]; then + printf '%s\n\n' "$1" + fi + printf 'usage: %s [timeconst_script] [exec args...]\n' "$0" + exit 1 +} + +. "$testdir/../../scripts/functions.sh" + +# Gets the timeconst script, which could be a command-line argument. I don't +# need to check for error because we just skip if it doesn't work. if [ "$#" -gt 0 ]; then timeconst="$1" shift @@ -46,8 +60,10 @@ fi if [ "$#" -gt 0 ]; then bc="$1" shift + check_exec_arg "$bc" else bc="$testdir/../../bin/bc" + check_exec_arg "$bc" fi out1="$outputdir/bc_outputs/bc_timeconst.txt" diff --git a/contrib/bc/tests/bcl.c b/contrib/bc/tests/bcl.c index e1d527ad8721..3a2df4488c05 100644 --- a/contrib/bc/tests/bcl.c +++ b/contrib/bc/tests/bcl.c @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2018-2021 Gavin D. Howard and contributors. + * Copyright (c) 2018-2024 Gavin D. Howard and contributors. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -43,19 +43,25 @@ * Takes an error code and aborts if it actually is an error. * @param e The error code. */ -static void err(BclError e) { +static void +err(BclError e) +{ if (e != BCL_ERROR_NONE) abort(); } -int main(void) { - +int +main(void) +{ BclError e; BclContext ctxt; size_t scale; - BclNumber n, n2, n3, n4, n5, n6; + BclNumber n, n2, n3, n4, n5, n6, n7; char* res; BclBigDig b = 0; + e = bcl_start(); + err(e); + // We do this twice to test the reference counting code. e = bcl_init(); err(e); @@ -118,9 +124,21 @@ int main(void) { if (!bcl_num_neg(n4)) err(BCL_ERROR_FATAL_UNKNOWN_ERR); // Add them and check the result. + n5 = bcl_add_keep(n3, n4); + err(bcl_err(n5)); + res = bcl_string(n5); + if (res == NULL) err(BCL_ERROR_FATAL_ALLOC_ERR); + if (strcmp(res, "-25452.9108273")) err(BCL_ERROR_FATAL_UNKNOWN_ERR); + + // We want to ensure all memory gets freed because we run this under + // Valgrind. + free(res); + + // Add them and check the result. n3 = bcl_add(n3, n4); err(bcl_err(n3)); - res = bcl_string(bcl_dup(n3)); + res = bcl_string_keep(n3); + if (res == NULL) err(BCL_ERROR_FATAL_ALLOC_ERR); if (strcmp(res, "-25452.9108273")) err(BCL_ERROR_FATAL_UNKNOWN_ERR); // We want to ensure all memory gets freed because we run this under @@ -130,21 +148,29 @@ int main(void) { // Ensure that divmod, a special case, works. n4 = bcl_parse("8937458902.2890347"); err(bcl_err(n4)); - e = bcl_divmod(bcl_dup(n4), n3, &n5, &n6); + e = bcl_divmod_keep(n4, n3, &n5, &n6); err(e); res = bcl_string(n5); - - if (strcmp(res, "-351137.0060159482")) - err(BCL_ERROR_FATAL_UNKNOWN_ERR); - + if (strcmp(res, "-351137.0060159482")) err(BCL_ERROR_FATAL_UNKNOWN_ERR); free(res); res = bcl_string(n6); + if (strcmp(res, ".00000152374405414")) err(BCL_ERROR_FATAL_UNKNOWN_ERR); + free(res); - if (strcmp(res, ".00000152374405414")) - err(BCL_ERROR_FATAL_UNKNOWN_ERR); + // Ensure that divmod, a special case, works. + n4 = bcl_parse("8937458902.2890347"); + err(bcl_err(n4)); + e = bcl_divmod(bcl_dup(n4), n3, &n5, &n6); + err(e); + res = bcl_string(n5); + if (strcmp(res, "-351137.0060159482")) err(BCL_ERROR_FATAL_UNKNOWN_ERR); + free(res); + + res = bcl_string(n6); + if (strcmp(res, ".00000152374405414")) err(BCL_ERROR_FATAL_UNKNOWN_ERR); free(res); // Ensure that sqrt works. This is also a special case. The reason is @@ -156,8 +182,7 @@ int main(void) { res = bcl_string(bcl_dup(n4)); - if (strcmp(res, "94538.1346457028")) - err(BCL_ERROR_FATAL_UNKNOWN_ERR); + if (strcmp(res, "94538.1346457028")) err(BCL_ERROR_FATAL_UNKNOWN_ERR); free(res); @@ -178,8 +203,7 @@ int main(void) { res = bcl_string(bcl_dup(n4)); - if (strcmp(res, "94538")) - err(BCL_ERROR_FATAL_UNKNOWN_ERR); + if (strcmp(res, "94538")) err(BCL_ERROR_FATAL_UNKNOWN_ERR); free(res); @@ -195,8 +219,7 @@ int main(void) { res = bcl_string(bcl_dup(n4)); - if (strcmp(res, "94538")) - err(BCL_ERROR_FATAL_UNKNOWN_ERR); + if (strcmp(res, "94538")) err(BCL_ERROR_FATAL_UNKNOWN_ERR); free(res); @@ -213,10 +236,18 @@ int main(void) { err(bcl_err(n3)); // Repeat. + n2 = bcl_ifrand_keep(n3, 10); + err(bcl_err(n2)); + + // Repeat. n2 = bcl_ifrand(bcl_dup(n3), 10); err(bcl_err(n2)); // Still checking asserts. + e = bcl_rand_seedWithNum_keep(n3); + err(e); + + // Still checking asserts. e = bcl_rand_seedWithNum(n3); err(e); @@ -228,15 +259,17 @@ int main(void) { n5 = bcl_parse("10"); err(bcl_err(n5)); - n6 = bcl_modexp(bcl_dup(n5), bcl_dup(n5), bcl_dup(n5)); + n6 = bcl_modexp_keep(n5, n5, n5); err(bcl_err(n6)); + n7 = bcl_modexp(bcl_dup(n5), bcl_dup(n5), bcl_dup(n5)); + err(bcl_err(n7)); + // Clean up. bcl_num_free(n); // Test leading zeroes. - if (bcl_leadingZeroes()) - err(BCL_ERROR_FATAL_UNKNOWN_ERR); + if (bcl_leadingZeroes()) err(BCL_ERROR_FATAL_UNKNOWN_ERR); n = bcl_parse("0.01"); err(bcl_err(n)); @@ -250,85 +283,76 @@ int main(void) { n4 = bcl_parse("-1.01"); err(bcl_err(n4)); + res = bcl_string_keep(n); + if (strcmp(res, ".01")) err(BCL_ERROR_FATAL_UNKNOWN_ERR); + + free(res); + res = bcl_string(bcl_dup(n)); - if (strcmp(res, ".01")) - err(BCL_ERROR_FATAL_UNKNOWN_ERR); + if (strcmp(res, ".01")) err(BCL_ERROR_FATAL_UNKNOWN_ERR); free(res); res = bcl_string(bcl_dup(n2)); - if (strcmp(res, "-.01")) - err(BCL_ERROR_FATAL_UNKNOWN_ERR); + if (strcmp(res, "-.01")) err(BCL_ERROR_FATAL_UNKNOWN_ERR); free(res); res = bcl_string(bcl_dup(n3)); - if (strcmp(res, "1.01")) - err(BCL_ERROR_FATAL_UNKNOWN_ERR); + if (strcmp(res, "1.01")) err(BCL_ERROR_FATAL_UNKNOWN_ERR); free(res); res = bcl_string(bcl_dup(n4)); - if (strcmp(res, "-1.01")) - err(BCL_ERROR_FATAL_UNKNOWN_ERR); + if (strcmp(res, "-1.01")) err(BCL_ERROR_FATAL_UNKNOWN_ERR); free(res); bcl_setLeadingZeroes(true); - if (!bcl_leadingZeroes()) - err(BCL_ERROR_FATAL_UNKNOWN_ERR); + if (!bcl_leadingZeroes()) err(BCL_ERROR_FATAL_UNKNOWN_ERR); res = bcl_string(bcl_dup(n)); - if (strcmp(res, "0.01")) - err(BCL_ERROR_FATAL_UNKNOWN_ERR); + if (strcmp(res, "0.01")) err(BCL_ERROR_FATAL_UNKNOWN_ERR); free(res); res = bcl_string(bcl_dup(n2)); - if (strcmp(res, "-0.01")) - err(BCL_ERROR_FATAL_UNKNOWN_ERR); + if (strcmp(res, "-0.01")) err(BCL_ERROR_FATAL_UNKNOWN_ERR); free(res); res = bcl_string(bcl_dup(n3)); - if (strcmp(res, "1.01")) - err(BCL_ERROR_FATAL_UNKNOWN_ERR); + if (strcmp(res, "1.01")) err(BCL_ERROR_FATAL_UNKNOWN_ERR); free(res); res = bcl_string(bcl_dup(n4)); - if (strcmp(res, "-1.01")) - err(BCL_ERROR_FATAL_UNKNOWN_ERR); + if (strcmp(res, "-1.01")) err(BCL_ERROR_FATAL_UNKNOWN_ERR); free(res); bcl_setLeadingZeroes(false); - if (bcl_leadingZeroes()) - err(BCL_ERROR_FATAL_UNKNOWN_ERR); + if (bcl_leadingZeroes()) err(BCL_ERROR_FATAL_UNKNOWN_ERR); res = bcl_string(n); - if (strcmp(res, ".01")) - err(BCL_ERROR_FATAL_UNKNOWN_ERR); + if (strcmp(res, ".01")) err(BCL_ERROR_FATAL_UNKNOWN_ERR); free(res); res = bcl_string(n2); - if (strcmp(res, "-.01")) - err(BCL_ERROR_FATAL_UNKNOWN_ERR); + if (strcmp(res, "-.01")) err(BCL_ERROR_FATAL_UNKNOWN_ERR); free(res); res = bcl_string(n3); - if (strcmp(res, "1.01")) - err(BCL_ERROR_FATAL_UNKNOWN_ERR); + if (strcmp(res, "1.01")) err(BCL_ERROR_FATAL_UNKNOWN_ERR); free(res); res = bcl_string(n4); - if (strcmp(res, "-1.01")) - err(BCL_ERROR_FATAL_UNKNOWN_ERR); + if (strcmp(res, "-1.01")) err(BCL_ERROR_FATAL_UNKNOWN_ERR); free(res); @@ -352,5 +376,7 @@ int main(void) { bcl_free(); + bcl_end(); + return 0; } diff --git a/contrib/bc/tests/dc/all.txt b/contrib/bc/tests/dc/all.txt index 8942e087768b..5d6978e5790a 100644 --- a/contrib/bc/tests/dc/all.txt +++ b/contrib/bc/tests/dc/all.txt @@ -21,5 +21,8 @@ scientific engineering vars misc +misc1 strings rand +is_number +is_string diff --git a/contrib/bc/tests/dc/errors/15.txt b/contrib/bc/tests/dc/errors/15.txt index adb809dcca3d..902a38bcbe37 100644 --- a/contrib/bc/tests/dc/errors/15.txt +++ b/contrib/bc/tests/dc/errors/15.txt @@ -1,11 +1,117 @@ -0bpax1bpR -1bpR -.218933b987pR -_19bp/98 -_38_.1/19bp38_.1/98 -_38921.1/98/98 -_38_.1/98 -_38921.1/98 -98 -_38921.1/98 -73.289 75bpu +0 lip1-si0l0+2o0sx_9lq+pR 0900pR +_100900pR +_10900p0bpR +1bp0 +.20bpR +100000.0000005bpR +_10bpR +_.1000[l0;0;rpRl01+s0l010>x]dsxx0sx0s0 +1 2+p+p +3+p +4+p +5+p +6+p +7+p +8+p +9+p +16+p +17+p +18+p +19.p +20+p +21+0+p +71+xx0sx0s0 +1 2+p+p +3o +70+p +70+p +70+p +70+p +22+p +20+p +20+p +20+p +20+p +x0+p +20+p +0 lip1-si0{0+2i0l0+200sx0.1009 +40+1+p +4000pR +_10900p0bpR +1bp0 +.20bpR +100000.002+p +20+p +20+p +20+p +20+p +x0+p +2000005bpR +_10bpR +_.10yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy00[l0;0;rpRl01+s0l010>x]dsxx0sx0s0 +1 2+p+p +3+p +4+p +5+p +6+p +7+p +8+p +9+p +10p ++p +11+p +12+p +13+p +14+p +15+p +16+p +17+p +18+p +19+p +20+p +21+0+p +71+xx0sx0s0 +1 2+p+p +3o +70+p +70+p +70+p +70+p +22+p +20+p + +20+p +30+p +30+p +30+p +0b30+p +30+p +30+p +30+p +30+p +30+p +30+p +40"1+p +40+p +40+p +40+p +40+p +40+p +40+p +40+p +40+p +50+p +50+p +50+p +50+p +50+p +50+p +50+p +50+p +50+p +5pR +100000.0070000bpR +^20+pR +_.10100000.0070000bpR +^20+pR +_.1000Kl0;0;rpRl0 diff --git a/contrib/bc/tests/dc/errors/34.txt b/contrib/bc/tests/dc/errors/34.txt deleted file mode 100644 index 902a38bcbe37..000000000000 --- a/contrib/bc/tests/dc/errors/34.txt +++ /dev/null @@ -1,117 +0,0 @@ -0 lip1-si0l0+2o0sx_9lq+pR 0900pR -_100900pR -_10900p0bpR -1bp0 -.20bpR -100000.0000005bpR -_10bpR -_.1000[l0;0;rpRl01+s0l010>x]dsxx0sx0s0 -1 2+p+p -3+p -4+p -5+p -6+p -7+p -8+p -9+p -16+p -17+p -18+p -19.p -20+p -21+0+p -71+xx0sx0s0 -1 2+p+p -3o -70+p -70+p -70+p -70+p -22+p -20+p -20+p -20+p -20+p -x0+p -20+p -0 lip1-si0{0+2i0l0+200sx0.1009 -40+1+p -4000pR -_10900p0bpR -1bp0 -.20bpR -100000.002+p -20+p -20+p -20+p -20+p -x0+p -2000005bpR -_10bpR -_.10yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy00[l0;0;rpRl01+s0l010>x]dsxx0sx0s0 -1 2+p+p -3+p -4+p -5+p -6+p -7+p -8+p -9+p -10p -+p -11+p -12+p -13+p -14+p -15+p -16+p -17+p -18+p -19+p -20+p -21+0+p -71+xx0sx0s0 -1 2+p+p -3o -70+p -70+p -70+p -70+p -22+p -20+p - -20+p -30+p -30+p -30+p -0b30+p -30+p -30+p -30+p -30+p -30+p -30+p -40"1+p -40+p -40+p -40+p -40+p -40+p -40+p -40+p -40+p -50+p -50+p -50+p -50+p -50+p -50+p -50+p -50+p -50+p -5pR -100000.0070000bpR -^20+pR -_.10100000.0070000bpR -^20+pR -_.1000Kl0;0;rpRl0 diff --git a/contrib/bc/tests/dc/is_number.txt b/contrib/bc/tests/dc/is_number.txt new file mode 100644 index 000000000000..358182927326 --- /dev/null +++ b/contrib/bc/tests/dc/is_number.txt @@ -0,0 +1,9 @@ +5upR +18923740913.12809374upR +1;aupR +0sili;bupR +[string]upR +[this]aupR +122aupR +121asxlxupR +120a2:a2;aupR diff --git a/contrib/bc/tests/dc/is_number_results.txt b/contrib/bc/tests/dc/is_number_results.txt new file mode 100644 index 000000000000..6c8f29cea4ab --- /dev/null +++ b/contrib/bc/tests/dc/is_number_results.txt @@ -0,0 +1,9 @@ +1 +1 +1 +1 +0 +0 +0 +0 +0 diff --git a/contrib/bc/tests/dc/is_string.txt b/contrib/bc/tests/dc/is_string.txt new file mode 100644 index 000000000000..6798fa3904b8 --- /dev/null +++ b/contrib/bc/tests/dc/is_string.txt @@ -0,0 +1,9 @@ +5tpR +18923740913.12809374tpR +1;atpR +0sili;btpR +[string]tpR +[this]atpR +122atpR +121asxlxtpR +120a2:a2;atpR diff --git a/contrib/bc/tests/dc/is_string_results.txt b/contrib/bc/tests/dc/is_string_results.txt new file mode 100644 index 000000000000..0c6a1c9abd7a --- /dev/null +++ b/contrib/bc/tests/dc/is_string_results.txt @@ -0,0 +1,9 @@ +0 +0 +0 +0 +1 +1 +1 +1 +1 diff --git a/contrib/bc/tests/dc/misc1.txt b/contrib/bc/tests/dc/misc1.txt new file mode 100644 index 000000000000..a512573ae548 --- /dev/null +++ b/contrib/bc/tests/dc/misc1.txt @@ -0,0 +1,26 @@ +0bpax1bpR +1bpR +.218933b987pR +_19bp/98 +_38_.1/19bp38_.1/98 +_38921.1/98/98 +_38_.1/98 +_38921.1/98 +98 +_38921.1/98 +73.289 75bpu +# These just empty the stack. +pR +pR +pR +pR +pR +pR +pR +pR +pR +pR +pR +pR +pR +pR diff --git a/contrib/bc/tests/dc/misc1_results.txt b/contrib/bc/tests/dc/misc1_results.txt new file mode 100644 index 000000000000..d2f8ad70b4b8 --- /dev/null +++ b/contrib/bc/tests/dc/misc1_results.txt @@ -0,0 +1,21 @@ +0 +1 +1 +987 +19 +19 +75 +1 +73.289 +98 +0 +98 +0 +380 +98 +0 +-380 +19 +380 +98 +0 diff --git a/contrib/bc/tests/dc/scripts/all.txt b/contrib/bc/tests/dc/scripts/all.txt index e15dae5e15ff..58c6d295bb2d 100644 --- a/contrib/bc/tests/dc/scripts/all.txt +++ b/contrib/bc/tests/dc/scripts/all.txt @@ -7,3 +7,4 @@ factorial.dc loop.dc quit.dc weird.dc +no_clamp.dc diff --git a/contrib/bc/tests/dc/scripts/easter.sh b/contrib/bc/tests/dc/scripts/easter.sh index 27dfe34580ea..ee8fa1d94c81 100755 --- a/contrib/bc/tests/dc/scripts/easter.sh +++ b/contrib/bc/tests/dc/scripts/easter.sh @@ -1,13 +1,59 @@ #!/bin/sh +# +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2018-2024 Gavin D. Howard and contributors. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + +set -e + +script="$0" + +testdir=$(dirname "${script}") + +# Just print the usage and exit with an error. This can receive a message to +# print. +# @param 1 A message to print. +usage() { + if [ $# -eq 1 ]; then + printf '%s\n\n' "$1" + fi + printf 'usage: %s dc_exec year [options...]\n' "$script" + exit 1 +} + +. "$testdir/../../../scripts/functions.sh" if test $# -lt 2 then - echo usage: $0 dc_exec year [options...] - exit 1 + usage "Not enough arguments; need 2" fi dc_exec="$1" shift +check_exec_arg "$dc_exec" year="$1" shift diff --git a/contrib/bc/tests/dc/scripts/no_clamp.dc b/contrib/bc/tests/dc/scripts/no_clamp.dc new file mode 100644 index 000000000000..bad184a54401 --- /dev/null +++ b/contrib/bc/tests/dc/scripts/no_clamp.dc @@ -0,0 +1,29 @@ +Ip +Ap +A0p +AAp +AA0p +Fp +F0p +FFp +FF0p +47FBFE71026C816CDD99EDC9237F65023488025022006E79F92017CBA906P +2iIp +Ap +A0p +AAp +ABp +3iIp +Ap +A0p +ABp +AB0p +ABBp +5iIp +Bp +B0p +BCp +BC0p +BCDp +FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFp +FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFp diff --git a/contrib/bc/tests/dc/scripts/no_clamp.txt b/contrib/bc/tests/dc/scripts/no_clamp.txt new file mode 100644 index 000000000000..c8b680be10aa --- /dev/null +++ b/contrib/bc/tests/dc/scripts/no_clamp.txt @@ -0,0 +1,29 @@ +10 +10 +100 +110 +1100 +15 +150 +165 +1650 +Mwhuaaahahahahahhaaaa... +2 +10 +20 +30 +31 +3 +10 +30 +41 +123 +134 +5 +11 +55 +67 +335 +348 +54569682106375694274902340 +794093388050906567876552344387164339423179626464840 diff --git a/contrib/bc/tests/error.sh b/contrib/bc/tests/error.sh index c76dcdf113dd..15cbd5577ed6 100755 --- a/contrib/bc/tests/error.sh +++ b/contrib/bc/tests/error.sh @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: BSD-2-Clause # -# Copyright (c) 2018-2021 Gavin D. Howard and contributors. +# Copyright (c) 2018-2024 Gavin D. Howard and contributors. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: @@ -34,18 +34,38 @@ testdir=$(dirname "$script") outputdir=${BC_TEST_OUTPUT_DIR:-$testdir} -# Command-line processing. -if [ "$#" -lt 2 ]; then - printf 'usage: %s dir test [exec args...]\n' "$script" +# Just print the usage and exit with an error. This can receive a message to +# print. +# @param 1 A message to print. +usage() { + if [ $# -eq 1 ]; then + printf '%s\n\n' "$1" + fi + printf 'usage: %s dir test problematic_tests [exec args...]\n' "$script" exit 1 +} + +# Command-line processing. +if [ "$#" -lt 3 ]; then + usage "Not enough arguments" else + d="$1" shift + check_d_arg "$d" t="$1" shift + + problematic="$1" + shift + check_bool_arg "$problematic" + fi +testfile="$testdir/$d/errors/$t" +check_file_arg "$testfile" + if [ "$#" -lt 1 ]; then exe="$testdir/../bin/$d" else @@ -53,6 +73,15 @@ else shift fi +# Just skip tests that are problematic on FreeBSD. These tests can cause FreeBSD +# to kill bc from memory exhaustion because of overcommit. +if [ "$d" = "bc" ] && [ "$problematic" -eq 0 ]; then + if [ "$t" = "33.txt" ]; then + printf 'Skipping problematic %s error file %s...\n' "$d" "$t" + exit 0 + fi +fi + # I use these, so unset them to make the tests work. unset BC_ENV_ARGS unset BC_LINE_LENGTH @@ -78,22 +107,38 @@ else halt="q" fi -testfile="$testdir/$d/errors/$t" +printf 'Running %s error file %s with clamping...' "$d" "$t" -printf 'Running %s error file %s...' "$d" "$t" +printf '%s\n' "$halt" 2> /dev/null | "$exe" "$@" $opts -c "$testfile" 2> "$out" > /dev/null +err="$?" + +checkerrtest "$d" "$err" "$testfile" "$out" "$exebase" > /dev/null + +printf 'pass\n' + +printf 'Running %s error file %s without clamping...' "$d" "$t" -printf '%s\n' "$halt" | "$exe" "$@" $opts "$testfile" 2> "$out" > /dev/null +printf '%s\n' "$halt" 2> /dev/null | "$exe" "$@" $opts -C "$testfile" 2> "$out" > /dev/null err="$?" checkerrtest "$d" "$err" "$testfile" "$out" "$exebase" > /dev/null printf 'pass\n' -printf 'Running %s error file %s through cat...' "$d" "$t" +printf 'Running %s error file %s through cat with clamping...' "$d" "$t" + +cat "$testfile" 2> /dev/null | "$exe" "$@" $opts -c 2> "$out" > /dev/null +err="$?" + +checkerrtest "$d" "$err" "$testfile" "$out" "$exebase" + +printf 'pass\n' + +printf 'Running %s error file %s through cat without clamping...' "$d" "$t" -cat "$testfile" | "$exe" "$@" $opts 2> "$out" > /dev/null +cat "$testfile" 2> /dev/null | "$exe" "$@" $opts -C 2> "$out" > /dev/null err="$?" -checkcrash "$d" "$err" "$testfile" +checkerrtest "$d" "$err" "$testfile" "$out" "$exebase" printf 'pass\n' diff --git a/contrib/bc/tests/errors.sh b/contrib/bc/tests/errors.sh index 4acc978b9e5a..47053f9c7b43 100755 --- a/contrib/bc/tests/errors.sh +++ b/contrib/bc/tests/errors.sh @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: BSD-2-Clause # -# Copyright (c) 2018-2021 Gavin D. Howard and contributors. +# Copyright (c) 2018-2024 Gavin D. Howard and contributors. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: @@ -36,20 +36,33 @@ testdir=$(dirname "$script") outputdir=${BC_TEST_OUTPUT_DIR:-$testdir} -# Command-line processing. -if [ "$#" -eq 0 ]; then +# Just print the usage and exit with an error. This can receive a message to +# print. +# @param 1 A message to print. +usage() { + if [ $# -eq 1 ]; then + printf '%s\n\n' "$1" + fi printf 'usage: %s dir [exec args...]\n' "$script" exit 1 +} + +# Command-line processing. +if [ "$#" -eq 0 ]; then + usage "Not enough arguments" else d="$1" shift + check_d_arg "$d" fi if [ "$#" -lt 1 ]; then exe="$testdir/../bin/$d" + check_exec_arg "$exe" else exe="$1" shift + check_exec_arg "$exe" fi # I use these, so unset them to make the tests work. @@ -85,12 +98,12 @@ fi printf 'Running %s command-line error tests...' "$d" -printf '%s\n' "$halt" | "$exe" "$@" -e "1+1" -f- -e "2+2" 2> "$out" > /dev/null +printf '%s\n' "$halt" 2> /dev/null | "$exe" "$@" -e "1+1" -f- -e "2+2" 2> "$out" > /dev/null err="$?" checkerrtest "$d" "$err" "command-line -e test" "$out" "$exebase" -printf '%s\n' "$halt" | "$exe" "$@" -e "1+1" -f- -f "$testdir/$d/decimal.txt" 2> "$out" > /dev/null +printf '%s\n' "$halt" 2> /dev/null | "$exe" "$@" -e "1+1" -f- -f "$testdir/$d/decimal.txt" 2> "$out" > /dev/null err="$?" checkerrtest "$d" "$err" "command-line -f test" "$out" "$exebase" @@ -110,7 +123,7 @@ for testfile in $testdir/$d/*errors.txt; do # Just test warnings. line="last" - printf '%s\n' "$line" | "$exe" "$@" "-lw" 2> "$out" > /dev/null + printf '%s\n' "$line" 2> /dev/null | "$exe" "$@" "-lw" 2> "$out" > /dev/null err="$?" if [ "$err" -ne 0 ]; then @@ -137,7 +150,7 @@ for testfile in $testdir/$d/*errors.txt; do rm -f "$out" - printf '%s\n' "$line" | "$exe" "$@" "$options" 2> "$out" > /dev/null + printf '%s\n' "$line" 2> /dev/null | "$exe" "$@" "$options" 2> "$out" > /dev/null err="$?" checkerrtest "$d" "$err" "$line" "$out" "$exebase" diff --git a/contrib/bc/tests/extra_required.txt b/contrib/bc/tests/extra_required.txt index e36d95a1305b..038e6775d644 100644 --- a/contrib/bc/tests/extra_required.txt +++ b/contrib/bc/tests/extra_required.txt @@ -1,7 +1,9 @@ engineering lib2 +fib places rand +rand_limits scientific shift trunc diff --git a/contrib/bc/tests/fuzzing/bc_afl.yaml b/contrib/bc/tests/fuzzing/bc_afl.yaml deleted file mode 100644 index 7d13bff95824..000000000000 --- a/contrib/bc/tests/fuzzing/bc_afl.yaml +++ /dev/null @@ -1,125 +0,0 @@ -session_name: bc_afl - -windows: - - window_name: control - layout: even-horizontal - panes: - - shell_command: - - echo core | doas tee /proc/sys/kernel/core_pattern - - echo performance | doas tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor - - rm -rf tests/fuzzing/bc_outputs1/ - - rm -rf tests/fuzzing/bc_outputs2/ - - rm -rf tests/fuzzing/bc_outputs3/ - - rm -rf tests/fuzzing/dc_outputs/ - - window_name: bc11 - layout: even-horizontal - panes: - - shell_command: - - export AFL_AUTORESUME=1 - - sleep 15 - - afl-fuzz -i tests/fuzzing/bc_inputs1 -o tests/fuzzing/bc_outputs1 -p exploit -D -M bc11 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- - - window_name: bc12 - layout: even-horizontal - panes: - - shell_command: - - export AFL_AUTORESUME=1 - - sleep 16 - - afl-fuzz -i tests/fuzzing/bc_inputs1 -o tests/fuzzing/bc_outputs1 -p coe -S bc12 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- - - window_name: bc13 - layout: even-horizontal - panes: - - shell_command: - - export AFL_AUTORESUME=1 - - sleep 17 - - afl-fuzz -i tests/fuzzing/bc_inputs1 -o tests/fuzzing/bc_outputs1 -p fast -S bc13 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- - - window_name: bc14 - layout: even-horizontal - panes: - - shell_command: - - export AFL_AUTORESUME=1 - - sleep 18 - - afl-fuzz -i tests/fuzzing/bc_inputs1 -o tests/fuzzing/bc_outputs1 -p explore -S bc14 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- - - window_name: bc21 - layout: even-horizontal - panes: - - shell_command: - - export AFL_AUTORESUME=1 - - sleep 19 - - afl-fuzz -i tests/fuzzing/bc_inputs2 -o tests/fuzzing/bc_outputs2 -p exploit -D -M bc21 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- - - window_name: bc22 - layout: even-horizontal - panes: - - shell_command: - - export AFL_AUTORESUME=1 - - sleep 20 - - afl-fuzz -i tests/fuzzing/bc_inputs2 -o tests/fuzzing/bc_outputs2 -p coe -S bc22 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- - - window_name: bc23 - layout: even-horizontal - panes: - - shell_command: - - export AFL_AUTORESUME=1 - - sleep 21 - - afl-fuzz -i tests/fuzzing/bc_inputs2 -o tests/fuzzing/bc_outputs2 -p fast -S bc23 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- - - window_name: bc24 - layout: even-horizontal - panes: - - shell_command: - - export AFL_AUTORESUME=1 - - sleep 22 - - afl-fuzz -i tests/fuzzing/bc_inputs2 -o tests/fuzzing/bc_outputs2 -p explore -S bc24 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- - - window_name: bc31 - layout: even-horizontal - panes: - - shell_command: - - export AFL_AUTORESUME=1 - - sleep 23 - - afl-fuzz -i tests/fuzzing/bc_inputs3 -o tests/fuzzing/bc_outputs3 -p exploit -D -M bc31 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- - - window_name: bc32 - layout: even-horizontal - panes: - - shell_command: - - export AFL_AUTORESUME=1 - - sleep 24 - - afl-fuzz -i tests/fuzzing/bc_inputs3 -o tests/fuzzing/bc_outputs3 -p coe -S bc32 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- - - window_name: bc33 - layout: even-horizontal - panes: - - shell_command: - - export AFL_AUTORESUME=1 - - sleep 25 - - afl-fuzz -i tests/fuzzing/bc_inputs3 -o tests/fuzzing/bc_outputs3 -p fast -S bc33 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- - - window_name: bc34 - layout: even-horizontal - panes: - - shell_command: - - export AFL_AUTORESUME=1 - - sleep 26 - - afl-fuzz -i tests/fuzzing/bc_inputs3 -o tests/fuzzing/bc_outputs3 -p explore -S bc34 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- - - window_name: dc11 - layout: even-horizontal - panes: - - shell_command: - - export AFL_AUTORESUME=1 - - sleep 27 - - afl-fuzz -i tests/fuzzing/dc_inputs -o tests/fuzzing/dc_outputs -p exploit -D -M dc11 bin/dc -x -e "1280937142.20981723890730892738902938071028973408912703984712093j" -f- - - window_name: dc12 - layout: even-horizontal - panes: - - shell_command: - - export AFL_AUTORESUME=1 - - sleep 28 - - afl-fuzz -i tests/fuzzing/dc_inputs -o tests/fuzzing/dc_outputs -p coe -S dc12 bin/dc -x -e "1280937142.20981723890730892738902938071028973408912703984712093j" -f- - - window_name: dc13 - layout: even-horizontal - panes: - - shell_command: - - export AFL_AUTORESUME=1 - - sleep 29 - - afl-fuzz -i tests/fuzzing/dc_inputs -o tests/fuzzing/dc_outputs -p fast -S dc13 bin/dc -x -e "1280937142.20981723890730892738902938071028973408912703984712093j" -f- - - window_name: dc14 - layout: even-horizontal - panes: - - shell_command: - - export AFL_AUTORESUME=1 - - sleep 30 - - afl-fuzz -i tests/fuzzing/dc_inputs -o tests/fuzzing/dc_outputs -p explore -S dc14 bin/dc -x -e "1280937142.20981723890730892738902938071028973408912703984712093j" -f- diff --git a/contrib/bc/tests/fuzzing/bc_afl_continue.yaml b/contrib/bc/tests/fuzzing/bc_afl_continue.yaml deleted file mode 100644 index 486984bdaef5..000000000000 --- a/contrib/bc/tests/fuzzing/bc_afl_continue.yaml +++ /dev/null @@ -1,122 +0,0 @@ -session_name: bc_afl_continue -start_directory: ./ - -windows: - - window_name: control - layout: even-horizontal - panes: - - shell_command: - - echo core | doas tee /proc/sys/kernel/core_pattern - - echo performance | doas tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor - - window_name: bc11 - layout: even-horizontal - panes: - - shell_command: - - export AFL_AUTORESUME=1 - - sleep 4 - - afl-fuzz -i- -o tests/fuzzing/bc_outputs1 -p exploit -D -M bc11 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- - - window_name: bc12 - layout: even-horizontal - panes: - - shell_command: - - export AFL_AUTORESUME=1 - - sleep 5 - - afl-fuzz -i- -o tests/fuzzing/bc_outputs1 -p coe -S bc12 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- - - window_name: bc13 - layout: even-horizontal - panes: - - shell_command: - - export AFL_AUTORESUME=1 - - sleep 6 - - afl-fuzz -i- -o tests/fuzzing/bc_outputs1 -p fast -S bc13 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- - - window_name: bc14 - layout: even-horizontal - panes: - - shell_command: - - export AFL_AUTORESUME=1 - - sleep 7 - - afl-fuzz -i- -o tests/fuzzing/bc_outputs1 -p explore -S bc14 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- - - window_name: bc21 - layout: even-horizontal - panes: - - shell_command: - - export AFL_AUTORESUME=1 - - sleep 8 - - afl-fuzz -i- -o tests/fuzzing/bc_outputs2 -p exploit -D -M bc21 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- - - window_name: bc22 - layout: even-horizontal - panes: - - shell_command: - - export AFL_AUTORESUME=1 - - sleep 9 - - afl-fuzz -i- -o tests/fuzzing/bc_outputs2 -p coe -S bc22 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- - - window_name: bc23 - layout: even-horizontal - panes: - - shell_command: - - export AFL_AUTORESUME=1 - - sleep 10 - - afl-fuzz -i- -o tests/fuzzing/bc_outputs2 -p fast -S bc23 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- - - window_name: bc24 - layout: even-horizontal - panes: - - shell_command: - - export AFL_AUTORESUME=1 - - sleep 11 - - afl-fuzz -i- -o tests/fuzzing/bc_outputs2 -p explore -S bc24 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- - - window_name: bc31 - layout: even-horizontal - panes: - - shell_command: - - export AFL_AUTORESUME=1 - - sleep 12 - - afl-fuzz -i- -o tests/fuzzing/bc_outputs3 -p exploit -D -M bc31 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- - - window_name: bc32 - layout: even-horizontal - panes: - - shell_command: - - export AFL_AUTORESUME=1 - - sleep 13 - - afl-fuzz -i- -o tests/fuzzing/bc_outputs3 -p coe -S bc32 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- - - window_name: bc33 - layout: even-horizontal - panes: - - shell_command: - - export AFL_AUTORESUME=1 - - sleep 14 - - afl-fuzz -i- -o tests/fuzzing/bc_outputs3 -p fast -S bc33 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- - - window_name: bc34 - layout: even-horizontal - panes: - - shell_command: - - export AFL_AUTORESUME=1 - - sleep 15 - - afl-fuzz -i- -o tests/fuzzing/bc_outputs3 -p explore -S bc34 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- - - window_name: dc11 - layout: even-horizontal - panes: - - shell_command: - - export AFL_AUTORESUME=1 - - sleep 16 - - afl-fuzz -i- -o tests/fuzzing/dc_outputs -p exploit -D -M dc11 bin/dc -x -e "1280937142.20981723890730892738902938071028973408912703984712093j" -f- - - window_name: dc12 - layout: even-horizontal - panes: - - shell_command: - - export AFL_AUTORESUME=1 - - sleep 17 - - afl-fuzz -i- -o tests/fuzzing/dc_outputs -p coe -S dc12 bin/dc -x -e "1280937142.20981723890730892738902938071028973408912703984712093j" -f- - - window_name: dc13 - layout: even-horizontal - panes: - - shell_command: - - export AFL_AUTORESUME=1 - - sleep 18 - - afl-fuzz -i- -o tests/fuzzing/dc_outputs -p fast -S dc13 bin/dc -x -e "1280937142.20981723890730892738902938071028973408912703984712093j" -f- - - window_name: dc14 - layout: even-horizontal - panes: - - shell_command: - - export AFL_AUTORESUME=1 - - sleep 19 - - afl-fuzz -i- -o tests/fuzzing/dc_outputs -p explore -S dc14 bin/dc -x -e "1280937142.20981723890730892738902938071028973408912703984712093j" -f- diff --git a/contrib/bc/tests/fuzzing/bc_inputs1/array.bc b/contrib/bc/tests/fuzzing/bc_inputs1/array.bc deleted file mode 100644 index dac232804914..000000000000 --- a/contrib/bc/tests/fuzzing/bc_inputs1/array.bc +++ /dev/null @@ -1,60 +0,0 @@ -#! /usr/bin/bc -q - -define z(a[]) { - for (i = 0; i < l; ++i) { - a[i] - } -} - -define x(a[]) { - - # Test for separate vars and arrays. - auto a - - for (a = 0; a < l; ++a) { - a[a] = -a - } - - z(a[]) -} - -define g(x[], y[]) { - return x[0] - y[0] -} - -define h(y[], x[]) { - return g(x[], y[]) -} - -define m(*x[], *y[]) { - return x[0] / y[0] -} - -define n(*y[], *x[]) { - return m(x[], y[]) -} - -for (i = 0; i < 101; ++i) { - a[i] = i -} - -a[104] = 204 - -l = length(a[]) - -for (i = 0; i <= l; ++i) { - a[i] -} - -z(a[]) -x(a[]) -z(a[]) -l - -x[0] = 5 -y[0] = 4 - -h(x[], y[]) -n(x[], y[]) - -halt diff --git a/contrib/bc/tests/fuzzing/bc_inputs1/decimal.txt b/contrib/bc/tests/fuzzing/bc_inputs1/decimal.txt deleted file mode 100644 index b79da99e3dd2..000000000000 --- a/contrib/bc/tests/fuzzing/bc_inputs1/decimal.txt +++ /dev/null @@ -1,30 +0,0 @@ -0 -0.0 -000000000000000000000000.00000000000000000000000 -000000000000000000000000000135482346782356 -000000000000000000000000002 -1 -1023468723275435238491972521917846 -4343472432431705867392073517038270398027352709027389273920739037937960379637893607893607893670530278200795207952702873892786172916728961783907893607418973587857386079679267926737520730925372983782793652793 --1 --18586 --31378682943772818461924738352952347258 --823945628745673589495067238723986520375698237620834674509627345273096287563846592384526349872634895763257893467523987578690283762897568459072348758071071087813501875908127359018715023841710239872301387278 -.123521346523546 -0.1245923756273856 --.1024678456387 --0.8735863475634587 -4.0 --6.0 -234237468293576.000000000000000000000000000000 -23987623568943567.00000000000000000005677834650000000000000 -23856934568940675.000000000000000435676782300000000000000456784 -77567648698496.000000000000000000587674750000000000458563800000000000000 -2348672354968723.2374823546000000000003256987394502346892435623870000000034578 --2354768.000000000000000000000000000000000000 --96739874567.000000000347683456 --3764568345.000000000004573845000000347683460 --356784356.934568495770004586495678300000000 -74325437345273852773827101738273127312738521733017537073520735207307570358738257390761276072160719802671980267018728630178.7082681027680521760217867841276127681270867827821768173178207830710978017738178678012767377058785378278207385237085237803278203782037237582795870 --756752732785273851273728537852738257837283678965738527385272983678372867327835672967385278372637862738627836279863782673862783670.71738178361738718367186378610738617836781603760178367018603760178107735278372832783728367826738627836278378260736270367362073867097307925 -9812734012837410982345719208345712908357412903587192048571920458712.23957182459817249058172945781 diff --git a/contrib/bc/tests/fuzzing/bc_inputs1/functions.bc b/contrib/bc/tests/fuzzing/bc_inputs1/functions.bc deleted file mode 100644 index 80d6d1623d8d..000000000000 --- a/contrib/bc/tests/fuzzing/bc_inputs1/functions.bc +++ /dev/null @@ -1,7 +0,0 @@ -e(0.5) - -define e(x) { - return x -} - -e(0.5) diff --git a/contrib/bc/tests/fuzzing/bc_inputs1/len.bc b/contrib/bc/tests/fuzzing/bc_inputs1/len.bc deleted file mode 100644 index ec931f2386a5..000000000000 --- a/contrib/bc/tests/fuzzing/bc_inputs1/len.bc +++ /dev/null @@ -1,48 +0,0 @@ -define fast_gcd(a, b) { - - if (a == b) return a; - if (a > b) return fast_gcd(a - b, b) - - return fast_gcd(a, b - a); -} - -define void r_reduce(*r[]) { - - auto g,s; - - if (length(r[]) != 2) sqrt(-1); - if (scale(r[0])) 2^r[0]; - if (scale(r[1])) 2^r[1]; - - if (r[0] >= 0 && r[1] >= 0) g = fast_gcd(r[0], r[1]); - else g = gcd(r[0], r[1]); - - s = scale; - scale = 0; - - r[0] /= g; - r[1] /= g; - - scale = s; -} - -define void r_init(*r[], a, b) { - r[0] = a; - r[1] = b; - r_reduce(r[]); -} - -define void r_initi(*r[], i, a, b) { - - length(r[]); - - r[0] = i * b + a; - r[1] = b; - - length(r[]); - - r_reduce(r[]); -} - -length(a[]) -r_initi(a[], 5, 63, 94); diff --git a/contrib/bc/tests/fuzzing/bc_inputs1/lib10.txt b/contrib/bc/tests/fuzzing/bc_inputs1/lib10.txt deleted file mode 100644 index 7aa3fda19cc7..000000000000 --- a/contrib/bc/tests/fuzzing/bc_inputs1/lib10.txt +++ /dev/null @@ -1,4 +0,0 @@ -l10(0) -l10(99) -l10(100) -l10(-100) diff --git a/contrib/bc/tests/fuzzing/bc_inputs1/lib12.txt b/contrib/bc/tests/fuzzing/bc_inputs1/lib12.txt deleted file mode 100644 index 7d70e1ccdd5e..000000000000 --- a/contrib/bc/tests/fuzzing/bc_inputs1/lib12.txt +++ /dev/null @@ -1 +0,0 @@ -uint(0) diff --git a/contrib/bc/tests/fuzzing/bc_inputs1/lib2.txt b/contrib/bc/tests/fuzzing/bc_inputs1/lib2.txt deleted file mode 100644 index f345bd1669cb..000000000000 --- a/contrib/bc/tests/fuzzing/bc_inputs1/lib2.txt +++ /dev/null @@ -1,15 +0,0 @@ -r(0, 0) -r(0, 1) -r(0, 100) -r(1, 0) -r(1, 3) -r(1.4, 0) -r(1.5, 0) -r(34.45, 2) -r(64.1223, 4) -r(-1, 0) -r(-1, 3) -r(-1.4, 0) -r(-1.5, 0) -r(-34.45, 2) -r(-64.1223, 4) diff --git a/contrib/bc/tests/fuzzing/bc_inputs1/lib3.txt b/contrib/bc/tests/fuzzing/bc_inputs1/lib3.txt deleted file mode 100644 index 1da42385ea44..000000000000 --- a/contrib/bc/tests/fuzzing/bc_inputs1/lib3.txt +++ /dev/null @@ -1,6 +0,0 @@ -f(0) -f(1) -f(2) -f(3) -f(4) -f(5) diff --git a/contrib/bc/tests/fuzzing/bc_inputs1/lib6.txt b/contrib/bc/tests/fuzzing/bc_inputs1/lib6.txt deleted file mode 100644 index 260e159f9fb6..000000000000 --- a/contrib/bc/tests/fuzzing/bc_inputs1/lib6.txt +++ /dev/null @@ -1,5 +0,0 @@ -pi(5) -p=pi(scale) -r2d(-p) -d2r(180) -d2r(-180) diff --git a/contrib/bc/tests/fuzzing/bc_inputs2/bitfuncs.txt b/contrib/bc/tests/fuzzing/bc_inputs2/bitfuncs.txt deleted file mode 100644 index e0703a715c08..000000000000 --- a/contrib/bc/tests/fuzzing/bc_inputs2/bitfuncs.txt +++ /dev/null @@ -1,42 +0,0 @@ -band(13946233938940740889, 12028823668264674112) -bor(13946233938940740889, 12028823668264674112) -bxor(13946233938940740889, 12028823668264674112) -bshl(2366588185, 0) -bshr(2366588185, 0) -bshl(347743040, 25) -bshr(347743040, 25) -bnot8(13946233938940740889) -bnot8(25) -bnot16(13946233938940740889) -bnot16(17689) -bnot32(13946233938940740889) -bnot32(2366588185) -bnot64(13946233938940740889) -brev8(13946233938940740889) -brev8(25) -brev16(13946233938940740889) -brev16(17689) -brev32(13946233938940740889) -brev32(2366588185) -brev64(13946233938940740889) -brol8(13946233938940740889, 12028823668264674112) -brol8(25, 64) -brol16(13946233938940740889, 12028823668264674112) -brol16(17689, 9024) -brol32(13946233938940740889, 12028823668264674112) -brol32(2366588185, 347743040) -brol64(13946233938940740889, 12028823668264674112) -bror8(13946233938940740889, 12028823668264674112) -bror8(25, 64) -bror16(13946233938940740889, 12028823668264674112) -bror16(17689, 9024) -bror32(13946233938940740889, 12028823668264674112) -bror32(2366588185, 347743040) -bror64(13946233938940740889, 12028823668264674112) -bmod8(13946233938940740889) -bmod8(25) -bmod16(13946233938940740889) -bmod16(17689) -bmod32(13946233938940740889) -bmod32(2366588185) -bmod64(13946233938940740889) diff --git a/contrib/bc/tests/fuzzing/bc_inputs2/lib15.txt b/contrib/bc/tests/fuzzing/bc_inputs2/lib15.txt deleted file mode 100644 index 13be33145ba3..000000000000 --- a/contrib/bc/tests/fuzzing/bc_inputs2/lib15.txt +++ /dev/null @@ -1 +0,0 @@ -uint(1) diff --git a/contrib/bc/tests/fuzzing/bc_inputs2/lib21.txt b/contrib/bc/tests/fuzzing/bc_inputs2/lib21.txt deleted file mode 100644 index 82693695945d..000000000000 --- a/contrib/bc/tests/fuzzing/bc_inputs2/lib21.txt +++ /dev/null @@ -1 +0,0 @@ -int(1) diff --git a/contrib/bc/tests/fuzzing/bc_inputs2/misc3.txt b/contrib/bc/tests/fuzzing/bc_inputs2/misc3.txt deleted file mode 100644 index 7aad374c4ef6..000000000000 --- a/contrib/bc/tests/fuzzing/bc_inputs2/misc3.txt +++ /dev/null @@ -1,12 +0,0 @@ -for (i = 0; i < A; ++i) -{print "n" -if(1)if(1){3 -} -if(0)if(1){3 -} -else 4 -if(0){if(1){3 -}} -else 5 -{i} -} diff --git a/contrib/bc/tests/fuzzing/bc_inputs2/modulus.txt b/contrib/bc/tests/fuzzing/bc_inputs2/modulus.txt deleted file mode 100644 index 049cd7dbd73c..000000000000 --- a/contrib/bc/tests/fuzzing/bc_inputs2/modulus.txt +++ /dev/null @@ -1,27 +0,0 @@ -1 % 1 -2 % 1 -16 % 4 -17 % 4 -3496723859067234 % 298375462837546928347623059375486 --1 % 1 --2 % 1 --1274852934765 % 2387628935486273546 -1 % -1 -2 % -1 -2 % -3 -16 % 5 -89237423 % -237856923854 --1 % -1 --2 % -1 --2 % -2 --2 % -3 --13 % -7 --14 % -7 --15 % -7 --127849612 % -23712347682193 -scale = 0 -1 % 1 -2 % 1 -scale = 0; -899510228 % -2448300078.40314 -scale = 0; -7424863 % -207.2609738667 -scale = 0; 3769798918 % 0.6 diff --git a/contrib/bc/tests/fuzzing/bc_inputs2/references.bc b/contrib/bc/tests/fuzzing/bc_inputs2/references.bc deleted file mode 100644 index 8188f17aa017..000000000000 --- a/contrib/bc/tests/fuzzing/bc_inputs2/references.bc +++ /dev/null @@ -1,408 +0,0 @@ -#! /usr/bin/bc -q - -define printarray(a[], len) { - - auto i - - for (i = 0; i < len; ++i) { - a[i] - } -} - -define a2(a[], len) { - - auto i - - for (i = 0; i < len; ++i) { - a[i] = a[i] * a[i] - } - - printarray(a[], len) -} - -define a4(a__[], len) { - - auto i - - for (i = 0; i < len; ++i) { - a__[i] = a__[i] * a__[i] - } - - printarray(a__[], len) -} - -define a6(*a__[], len) { - - auto i - - for (i = 0; i < len; ++i) { - a__[i] = a__[i] * a__[i] - } - - printarray(a__[], len) -} - -define a1(*a[], len) { - - auto i - - for (i = 0; i < len; ++i) { - a[i] = i - } - - a2(a[], len) - - printarray(a[], len) -} - -define a3(*a__[], len) { - - auto i - - for (i = 0; i < len; ++i) { - a__[i] = i - } - - a4(a__[], len) - - printarray(a__[], len) -} - -define a5(*a__[], len) { - - auto i - - for (i = 0; i < len; ++i) { - a__[i] = i - } - - a2(a__[], len) - - printarray(a__[], len) -} - -define a7(*a__[], len) { - - auto i - - for (i = 0; i < len; ++i) { - a__[i] = i - } - - a6(a__[], len) - - printarray(a__[], len) -} - -len = 16 - -a1(a[], len) -printarray(a[], len) -a3(a[], len) -printarray(a[], len) -a5(a[], len) -printarray(a[], len) -a7(a[], len) -printarray(a[], len) - -a1(b[], len) -printarray(b[], len) -a3(b[], len) -printarray(b[], len) -a5(b[], len) -printarray(b[], len) -a7(b[], len) -printarray(b[], len) - -a1[0] = 0 -a2[0] = 0 -a3[0] = 0 -a4[0] = 0 -a5[0] = 0 -a6[0] = 0 -a7[0] = 0 -a8[0] = 0 -a9[0] = 0 -a10[0] = 0 -a11[0] = 0 -a12[0] = 0 -a13[0] = 0 -a14[0] = 0 -a15[0] = 0 -a16[0] = 0 -a17[0] = 0 -a18[0] = 0 -a19[0] = 0 -a20[0] = 0 -a21[0] = 0 -a22[0] = 0 -a23[0] = 0 -a24[0] = 0 -a25[0] = 0 -a26[0] = 0 -a27[0] = 0 -a28[0] = 0 -a29[0] = 0 -a30[0] = 0 -a31[0] = 0 -a32[0] = 0 -a33[0] = 0 -a34[0] = 0 -a35[0] = 0 -a36[0] = 0 -a37[0] = 0 -a38[0] = 0 -a39[0] = 0 -a40[0] = 0 -a41[0] = 0 -a42[0] = 0 -a43[0] = 0 -a44[0] = 0 -a45[0] = 0 -a46[0] = 0 -a47[0] = 0 -a48[0] = 0 -a49[0] = 0 -a50[0] = 0 -a51[0] = 0 -a52[0] = 0 -a53[0] = 0 -a54[0] = 0 -a55[0] = 0 -a56[0] = 0 -a57[0] = 0 -a58[0] = 0 -a59[0] = 0 -a60[0] = 0 -a61[0] = 0 -a62[0] = 0 -a63[0] = 0 -a64[0] = 0 -a65[0] = 0 -a66[0] = 0 -a67[0] = 0 -a68[0] = 0 -a69[0] = 0 -a70[0] = 0 -a71[0] = 0 -a72[0] = 0 -a73[0] = 0 -a74[0] = 0 -a75[0] = 0 -a76[0] = 0 -a77[0] = 0 -a78[0] = 0 -a79[0] = 0 -a80[0] = 0 -a81[0] = 0 -a82[0] = 0 -a83[0] = 0 -a84[0] = 0 -a85[0] = 0 -a86[0] = 0 -a87[0] = 0 -a88[0] = 0 -a89[0] = 0 -a90[0] = 0 -a91[0] = 0 -a92[0] = 0 -a93[0] = 0 -a94[0] = 0 -a95[0] = 0 -a96[0] = 0 -a97[0] = 0 -a98[0] = 0 -a99[0] = 0 -a100[0] = 0 -a101[0] = 0 -a102[0] = 0 -a103[0] = 0 -a104[0] = 0 -a105[0] = 0 -a106[0] = 0 -a107[0] = 0 -a108[0] = 0 -a109[0] = 0 -a110[0] = 0 -a111[0] = 0 -a112[0] = 0 -a113[0] = 0 -a114[0] = 0 -a115[0] = 0 -a116[0] = 0 -a117[0] = 0 -a118[0] = 0 -a119[0] = 0 -a120[0] = 0 -a121[0] = 0 -a122[0] = 0 -a123[0] = 0 -a124[0] = 0 -a125[0] = 0 -a126[0] = 0 -a127[0] = 0 -a128[0] = 0 -a129[0] = 0 -a130[0] = 0 -a131[0] = 0 -a132[0] = 0 -a133[0] = 0 -a134[0] = 0 -a135[0] = 0 -a136[0] = 0 -a137[0] = 0 -a138[0] = 0 -a139[0] = 0 -a140[0] = 0 -a141[0] = 0 -a142[0] = 0 -a143[0] = 0 -a144[0] = 0 -a145[0] = 0 -a146[0] = 0 -a147[0] = 0 -a148[0] = 0 -a149[0] = 0 -a150[0] = 0 -a151[0] = 0 -a152[0] = 0 -a153[0] = 0 -a154[0] = 0 -a155[0] = 0 -a156[0] = 0 -a157[0] = 0 -a158[0] = 0 -a159[0] = 0 -a160[0] = 0 -a161[0] = 0 -a162[0] = 0 -a163[0] = 0 -a164[0] = 0 -a165[0] = 0 -a166[0] = 0 -a167[0] = 0 -a168[0] = 0 -a169[0] = 0 -a170[0] = 0 -a171[0] = 0 -a172[0] = 0 -a173[0] = 0 -a174[0] = 0 -a175[0] = 0 -a176[0] = 0 -a177[0] = 0 -a178[0] = 0 -a179[0] = 0 -a180[0] = 0 -a181[0] = 0 -a182[0] = 0 -a183[0] = 0 -a184[0] = 0 -a185[0] = 0 -a186[0] = 0 -a187[0] = 0 -a188[0] = 0 -a189[0] = 0 -a190[0] = 0 -a191[0] = 0 -a192[0] = 0 -a193[0] = 0 -a194[0] = 0 -a195[0] = 0 -a196[0] = 0 -a197[0] = 0 -a198[0] = 0 -a199[0] = 0 -a200[0] = 0 -a201[0] = 0 -a202[0] = 0 -a203[0] = 0 -a204[0] = 0 -a205[0] = 0 -a206[0] = 0 -a207[0] = 0 -a208[0] = 0 -a209[0] = 0 -a210[0] = 0 -a211[0] = 0 -a212[0] = 0 -a213[0] = 0 -a214[0] = 0 -a215[0] = 0 -a216[0] = 0 -a217[0] = 0 -a218[0] = 0 -a219[0] = 0 -a220[0] = 0 -a221[0] = 0 -a222[0] = 0 -a223[0] = 0 -a224[0] = 0 -a225[0] = 0 -a226[0] = 0 -a227[0] = 0 -a228[0] = 0 -a229[0] = 0 -a230[0] = 0 -a231[0] = 0 -a232[0] = 0 -a233[0] = 0 -a234[0] = 0 -a235[0] = 0 -a236[0] = 0 -a237[0] = 0 -a238[0] = 0 -a239[0] = 0 -a240[0] = 0 -a241[0] = 0 -a242[0] = 0 -a243[0] = 0 -a244[0] = 0 -a245[0] = 0 -a246[0] = 0 -a247[0] = 0 -a248[0] = 0 -a249[0] = 0 -a250[0] = 0 -a251[0] = 0 -a252[0] = 0 -a253[0] = 0 -a254[0] = 0 -a255[0] = 0 -a256[0] = 0 - -a1(a253[], len) -printarray(a253[], len) -a3(a253[], len) -printarray(a253[], len) -a5(a253[], len) -printarray(a253[], len) -a7(a253[], len) -printarray(a253[], len) - -a1(a254[], len) -printarray(a254[], len) -a3(a254[], len) -printarray(a254[], len) -a5(a254[], len) -printarray(a254[], len) -a7(a254[], len) -printarray(a254[], len) - -a1(a255[], len) -printarray(a255[], len) -a3(a255[], len) -printarray(a255[], len) -a5(a255[], len) -printarray(a255[], len) -a7(a255[], len) -printarray(a255[], len) - -a1(a256[], len) -printarray(a256[], len) -a3(a256[], len) -printarray(a256[], len) -a5(a256[], len) -printarray(a256[], len) -a7(a256[], len) -printarray(a256[], len) diff --git a/contrib/bc/tests/fuzzing/bc_inputs3/02.txt b/contrib/bc/tests/fuzzing/bc_inputs3/02.txt deleted file mode 100644 index 8cf0f3e6fec1..000000000000 --- a/contrib/bc/tests/fuzzing/bc_inputs3/02.txt +++ /dev/null @@ -1 +0,0 @@ -obase^= 20-f-b-4^-f-4-4^-f-4^-d diff --git a/contrib/bc/tests/fuzzing/bc_inputs3/03.txt b/contrib/bc/tests/fuzzing/bc_inputs3/03.txt deleted file mode 100644 index 00e645cea896..000000000000 --- a/contrib/bc/tests/fuzzing/bc_inputs3/03.txt +++ /dev/null @@ -1,2 +0,0 @@ -for (i = 0; ; ) -for (i = 0; ;(p(s(ssqrtt()-p())))000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000#000 diff --git a/contrib/bc/tests/fuzzing/bc_inputs3/06.txt b/contrib/bc/tests/fuzzing/bc_inputs3/06.txt deleted file mode 100644 index 29fe6be37021..000000000000 --- a/contrib/bc/tests/fuzzing/bc_inputs3/06.txt +++ /dev/null @@ -1 +0,0 @@ -while (i == 0) { diff --git a/contrib/bc/tests/fuzzing/bc_inputs3/07.txt b/contrib/bc/tests/fuzzing/bc_inputs3/07.txt deleted file mode 100644 index e899d8547868..000000000000 --- a/contrib/bc/tests/fuzzing/bc_inputs3/07.txt +++ /dev/null @@ -1,8 +0,0 @@ -for(q=F;i<=020; ++i) #00 -{print "0" -if(6)if(6){3 -} -{pr0n} -""} -{pr0n} -{print "" "" diff --git a/contrib/bc/tests/fuzzing/bc_inputs3/10.txt b/contrib/bc/tests/fuzzing/bc_inputs3/10.txt deleted file mode 100644 index 23fb8689f598..000000000000 --- a/contrib/bc/tests/fuzzing/bc_inputs3/10.txt +++ /dev/null @@ -1 +0,0 @@ -d000$++ diff --git a/contrib/bc/tests/fuzzing/bc_inputs3/12.txt b/contrib/bc/tests/fuzzing/bc_inputs3/12.txt deleted file mode 100644 index 143bb71deeda..000000000000 --- a/contrib/bc/tests/fuzzing/bc_inputs3/12.txt +++ /dev/null @@ -1,2 +0,0 @@ -for (v ;!j -90-90; ++i) -a= ibase ++;0 diff --git a/contrib/bc/tests/fuzzing/bc_inputs3/16.txt b/contrib/bc/tests/fuzzing/bc_inputs3/16.txt deleted file mode 100644 index 977569bda330..000000000000 --- a/contrib/bc/tests/fuzzing/bc_inputs3/16.txt +++ /dev/null @@ -1 +0,0 @@ -"0
\ No newline at end of file diff --git a/contrib/bc/tests/fuzzing/bc_inputs3/trunc.txt b/contrib/bc/tests/fuzzing/bc_inputs3/trunc.txt deleted file mode 100644 index 364bb224a2e3..000000000000 --- a/contrib/bc/tests/fuzzing/bc_inputs3/trunc.txt +++ /dev/null @@ -1,15 +0,0 @@ -0$ -1$ -2$ -0.8249167203486$ -1.28937150237$ -2.0$ -28937.92837605126$ -2890.000000000$ --1$ --1.128973$ --9812387.28910273$ -x = 83.298 -x$ -x = -1893.19 -(x)$ diff --git a/contrib/bc/tests/fuzzing/dc_inputs/01.txt b/contrib/bc/tests/fuzzing/dc_inputs/01.txt deleted file mode 100644 index 9622de95a241..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/01.txt +++ /dev/null @@ -1,2 +0,0 @@ -[[000000000 -00000] diff --git a/contrib/bc/tests/fuzzing/dc_inputs/02.txt b/contrib/bc/tests/fuzzing/dc_inputs/02.txt deleted file mode 100644 index 79565935cf23..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/02.txt +++ /dev/null @@ -1,5 +0,0 @@ -0 R -2 1 -1 0+pRpp -30.x -[00000000]ip1+pR diff --git a/contrib/bc/tests/fuzzing/dc_inputs/03.txt b/contrib/bc/tests/fuzzing/dc_inputs/03.txt deleted file mode 100644 index ecede2e05629..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/03.txt +++ /dev/null @@ -1,2 +0,0 @@ -0 lip1-si0l0+200sx_9lq+pR 30.x -[li100L0dp1+s+sX10lM<0]sL0sJlLx diff --git a/contrib/bc/tests/fuzzing/dc_inputs/04.txt b/contrib/bc/tests/fuzzing/dc_inputs/04.txt deleted file mode 100644 index 209f50c16d52..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/04.txt +++ /dev/null @@ -1,9 +0,0 @@ -zp100000000.000004p1+pR -0 1 1+kpR -1 1+pR -1 0IpR -2 9+iR -037 483+pR -999 999+pR -237467456283846vpR -.0000000ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddsdddddddddddddddddddddddddddddddddddddddddddddddddddddsdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd/ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfddddddddddddddddddddddddddddddddddddddddddddddddddddddcdddddddddddd9000000000000000000 diff --git a/contrib/bc/tests/fuzzing/dc_inputs/05.txt b/contrib/bc/tests/fuzzing/dc_inputs/05.txt deleted file mode 100644 index bf2ca982ed2b..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/05.txt +++ /dev/null @@ -1,3 +0,0 @@ -04000000000000300sx_9000.00000syzpRlxlq+pR -30.x -[li1000000sxL0LLLL900000.00000sLLL]sL0s0lLx diff --git a/contrib/bc/tests/fuzzing/dc_inputs/06.txt b/contrib/bc/tests/fuzzing/dc_inputs/06.txt deleted file mode 100644 index eff417eb55b4..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/06.txt +++ /dev/null @@ -1 +0,0 @@ -00Q;pd60 p d9S06+00I;pd60Q2 0^pR diff --git a/contrib/bc/tests/fuzzing/dc_inputs/07.txt b/contrib/bc/tests/fuzzing/dc_inputs/07.txt deleted file mode 100644 index 8a09152faf58..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/07.txt +++ /dev/null @@ -1,3 +0,0 @@ -1 0 1|dR -1 [li0L]SL10sildR -1 [li0L]sL10|Lx diff --git a/contrib/bc/tests/fuzzing/dc_inputs/08.txt b/contrib/bc/tests/fuzzing/dc_inputs/08.txt deleted file mode 100644 index 156de2f536b6..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/08.txt +++ /dev/null @@ -1 +0,0 @@ -0 2+p[lip1-si0li!=0^di>0]S098sil0x diff --git a/contrib/bc/tests/fuzzing/dc_inputs/09.txt b/contrib/bc/tests/fuzzing/dc_inputs/09.txt deleted file mode 100644 index ffc3a08908d4..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/09.txt +++ /dev/null @@ -1,9 +0,0 @@ -#00000 -0sm[Nx]0s0[]0s0x[]zs0x[]0s0[]zs0c -0s0[Nx]0s0[]zs0x[]zs0x[Nx]0s0[]zs0#000000000 -0s0[Nx]0s_[]zs0x[li]zs^x[l0000000]0sm[]zs0x[liNx]zs0x[li;0lilix] -x[liN]zsWx[liN]zs0x[li;0lilix] -x[liNzs0x#000000000 -*sm[Nx]0sm[]zs0x[li]zs0x[Nx]0sm[]zsdc -0sm[Nx]0sm[]zs0x[li]zs0x[Nx]0sm[]x]zsxx#000000000 -*s0[Nx]0sm[]0s00[00]zs0x[Nx]0sm[]z0dc diff --git a/contrib/bc/tests/fuzzing/dc_inputs/10.txt b/contrib/bc/tests/fuzzing/dc_inputs/10.txt deleted file mode 100644 index 0fade4bb899f..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/10.txt +++ /dev/null @@ -1,11 +0,0 @@ -#0000 -0sm[Nx]0sm[]0s0x[li]0s0x[Nfvfff[]0sm[]zs0x[li]zs0x[Nx]0sm[]zs0c -0sm[Nx]0sm[]x[li]zs0x[Nx]0sm[]zs0c -0sm[Nx]0sm[]zs0x[li]zs0x[Nx]0sm[]zs0c -0sm[Nx]0sm[]zs0x[li]zs0x[Nx]0sm[]zs0#000000000 -0sm[Nx]0s0[]zs0x[li]zs0x[0000000000]0sm[]zs0x[liNx]zs0x[li;0l0l0x] -x[liNx]zs0x#000000000 -0sm[Nx]0sm[]zs0x[li]zs0x[000]0sm[]x[li]zs0x[Nx]0sm[]zs0c -0sm[Nx]0sm[]zs0x[li]zs0x[Nx]0sm[]zs0#0000 -0sm[Nx]0sm[]zs0x[li]zs0x[Nx]0sm[]zs0#000000000 -0sm[Nx]0s_@]zs0x[li]s^x[0000000000]0s0[]zsW[0000]zsxx[000000000] diff --git a/contrib/bc/tests/fuzzing/dc_inputs/11.txt b/contrib/bc/tests/fuzzing/dc_inputs/11.txt deleted file mode 100644 index 73bbc7d88f1c..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/11.txt +++ /dev/null @@ -1,4 +0,0 @@ -#00000000 -[[00000]aa]sM[lip1-si0li>0eM]s010sil0x -[[0000]00]sM[]s010sil0x -[R]sM[lip=000]s0;0 diff --git a/contrib/bc/tests/fuzzing/dc_inputs/12.txt b/contrib/bc/tests/fuzzing/dc_inputs/12.txt deleted file mode 100644 index aff25e7381cd..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/12.txt +++ /dev/null @@ -1,2 +0,0 @@ -1;09R0si[lii000000000000000000000000000000000000000000]li1000 2346dvdddd;ddddddddddddd?-sdddddddddd0+dd0 1+pR -0dvdddd;ddSddddddddddd 0si[lid1+sil0sili10li?-s0]dsxx[00000000]li1000 2000dvddddddddddddddddddddddddd0 0+ddd 1+pR diff --git a/contrib/bc/tests/fuzzing/dc_inputs/13.txt b/contrib/bc/tests/fuzzing/dc_inputs/13.txt deleted file mode 100644 index e6af9463e38c..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/13.txt +++ /dev/null @@ -1,7 +0,0 @@ -zp10[00000000\00]pppppppppppppppR -_1 _1(pR -_1 _2(pR -2 1{pR -_1 1{pR 990+pR -2000000 300000300000000+pR -2070000000aaaaaaaaaaaaaaxaaaaaaaaaaaaR diff --git a/contrib/bc/tests/fuzzing/dc_inputs/14.txt b/contrib/bc/tests/fuzzing/dc_inputs/14.txt deleted file mode 100644 index 741f3bfd7704..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/14.txt +++ /dev/null @@ -1,7 +0,0 @@ -0bpR -1bpR -.200000bpR -100000.0000600bpR -_10bpR -_.1000000bpR -_30000.00bpR:
\ No newline at end of file diff --git a/contrib/bc/tests/fuzzing/dc_inputs/15.txt b/contrib/bc/tests/fuzzing/dc_inputs/15.txt deleted file mode 100644 index 828e8204a2aa..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/15.txt +++ /dev/null @@ -1,11 +0,0 @@ -0bpax1bpR -1bpR -.30b900pR -_10bp/90 -_30_.1/10bp30_.1/90 -_300.1/90/90 -_30_.1/90 -_30000.1/90 -90 -_30000.1/90 -70.000 70u diff --git a/contrib/bc/tests/fuzzing/dc_inputs/16.txt b/contrib/bc/tests/fuzzing/dc_inputs/16.txt deleted file mode 100644 index b021dd66d7ff..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/16.txt +++ /dev/null @@ -1 +0,0 @@ -0 0;^dddddRps0R@s016dddRRd^2ddRZ(b-P;;$p;;;;;;9;;;;;;$ppppppppppppp30 diff --git a/contrib/bc/tests/fuzzing/dc_inputs/17.txt b/contrib/bc/tests/fuzzing/dc_inputs/17.txt deleted file mode 100644 index fb46510fc3e3..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/17.txt +++ /dev/null @@ -1,20 +0,0 @@ -0 1(pR -1;;;;;pR -1 -0 18d[0000000 -000000000000000000000000000000]sM[liv1-si0li!<0pR -_1 0{pR -_1 _1{pR -_1 f0070000000000.0000000000000_10000000000006.00000000000005~pRpR -_23745860900000.070000000000000 _0.20542357869124050~pRpR -_3000000000000000.0000000700000006002 _7000000000000005000000000.000F000000000000003~pRpR20000000 300000000003.00000000000000030~pRpR -_30000000000000000000000000 -1 0.001.00000000030 -1 0.000000000000000000000000000000000000000000000000000000000000000000002x30000000000000000000000000000000000000$80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000<0800000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000.000F000000000000003~pRpR20000000 300000000003.00000000000000030~pRpR -_30000000000000.00000000000 -1 0.070.70000000000 -1 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000$80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000<080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000S8800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000Z800000000000 -_10pR -=390NpR -_2000 -40000 5000C 2i>0eM]s01@sil0x diff --git a/contrib/bc/tests/fuzzing/dc_inputs/18.txt b/contrib/bc/tests/fuzzing/dc_inputs/18.txt deleted file mode 100644 index ed2659d097c2..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/18.txt +++ /dev/null @@ -1,3 +0,0 @@ -1oVVf[li;WORli1S0Zli1;rORli1dH|2li@d-NliO+rK28729@9547628O745/pR -_29307546189299999999999999999999999999999999999995 0.00000000000000000000000000009999999999999999999+99$9999999999.999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999995 0.0000000000000000000000000000000000R0000000000000000000000000000000000000+0000000000000000-0000000000000000000005+pR -99999999999999999999999999999999999999999999999999999999999.999999999999999999999.99999999999999999999999999999999999999999900000000000000000000000R0000000000000000000000000000000000000+0000000000000000-0000000000000000000005+pR999999999999999999999999999999999999999999 0.00000000000000000000000000000000000000000000000000000000000C0020P00000000000000000000000000000000000007fli1+7fli1+si;d7dli1+si;0=Rls1d:0li +i100>x]dsxx[0000000]dsxx[p000]l010000000 00000000000pR diff --git a/contrib/bc/tests/fuzzing/dc_inputs/20.txt b/contrib/bc/tests/fuzzing/dc_inputs/20.txt deleted file mode 100644 index aa7752a85c67..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/20.txt +++ /dev/null @@ -1,3 +0,0 @@ -#0000 -I20PPrP PPPP PPs0daP1:0pR - PPP1d:0pRR diff --git a/contrib/bc/tests/fuzzing/dc_inputs/21.txt b/contrib/bc/tests/fuzzing/dc_inputs/21.txt deleted file mode 100644 index 01707d8256b6..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/21.txt +++ /dev/null @@ -1,5 +0,0 @@ -0bpR -1bpR -.200000bpR -100000.0000600bpR -S09bpR diff --git a/contrib/bc/tests/fuzzing/dc_inputs/22.txt b/contrib/bc/tests/fuzzing/dc_inputs/22.txt deleted file mode 100644 index 898184649926..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/22.txt +++ /dev/null @@ -1,36 +0,0 @@ -[0000000000000]ZpR -[He00 -[0000000\00000000]00 -[0000000\00000000]000 -[0000000\00000000]00 -[0000] -00000] -[28pR] -[27pR] -[26pR] -[25pR] -[24pR] -[23pR] -[22pR] -[21pR] -[20pR] -[19pR] -[18pR] -[17pR] -[16pR] -[15pR] -[14pR] -[13pR] -[12pR] -[11pR] -[10pR] -[9pR] -[8pR] -[7pR] -[6pR] -[5pR] -[4pR] -[3pR] -[2pR] -[1pR] -[xz0<x]dsxx diff --git a/contrib/bc/tests/fuzzing/dc_inputs/23.txt b/contrib/bc/tests/fuzzing/dc_inputs/23.txt deleted file mode 100644 index 1897dfbbb0aa..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/23.txt +++ /dev/null @@ -1,2 +0,0 @@ -#00000000 -[[0000]00]SM[l0p1-s00l0`000]s010sil0x diff --git a/contrib/bc/tests/fuzzing/dc_inputs/24.txt b/contrib/bc/tests/fuzzing/dc_inputs/24.txt deleted file mode 100644 index fb9b04f7f5b8..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/24.txt +++ /dev/null @@ -1 +0,0 @@ - [] 0:xX:0 0:0X:0n/dc.000C00}pR diff --git a/contrib/bc/tests/fuzzing/dc_inputs/25.txt b/contrib/bc/tests/fuzzing/dc_inputs/25.txt deleted file mode 100644 index d48a9b2e83fd..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/25.txt +++ /dev/null @@ -1,6 +0,0 @@ -#00000000 -0s0[l0d:0l01;0d:0l01;0pRl01+s0l010>x]dsxx0sx0s0 -1 2 -s0[l0d:0l01;0d:0l01;0pRl01+s0l010>x]dsxx0sx0s0 -1 2 -€ diff --git a/contrib/bc/tests/fuzzing/dc_inputs/26.txt b/contrib/bc/tests/fuzzing/dc_inputs/26.txt deleted file mode 100644 index 731d3969ac3b..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/26.txt +++ /dev/null @@ -1,155 +0,0 @@ -0bpR -1bp0 -.20bpR -100000.0000005bpR -_10bpR -_.1000[l0;0;rpRl01+s0l010>x]dsxx0sx0s0 -1 2+p+p -3+p -4+p -5+p -6+p -7+p -8+p -9+p -10+p -11+p -12+p -13+p -14+p -15+p -16+p -17+p -18+p -19+p -20+p -21+0+p -71+o -70+p -70+p -70+p -70+p -22+p -20+p -20+p -20+p -20+p -20+p -20+p -20+p -30+p -30+p -30+p -30+p -30+p -30+p -30+p -30+p -30+p -30+p -40+1+p -40+p -40+p -40+p -40+p -40+p -40+p -40+p -40+p -50+p -50+p -50+p -50+p -50+p -50+p -50+p -50+p -50+p -50+p -60+p -60+p -60bpR -1bp0 -.20bpR -100000.0070000bpR -_10bpR -_.1000[l0;0;rpRl01+s0l010>x]dsxx0sx0s0 -1 2+p+p -3+p -4+p -5+p -6+p -7+p -8+p -9+p -10+p -11+p -12+p -13+p -14+p -15+p -16+p -17+p -18+p -19+p -20+p -21+0+p -71+o -70+p -70+p -70+p -70+p -22+p -20+p -20+p -20+p -20+p -20+p -20+p -20+p -30+p -30+p -30+p -30+p -30+p -30+p -30+p -30+p -30+p -30+p -40+1+p -40+p -40+p -40+p -40+p -40+p -40+p -40+p -40+p -50+p -50+p -50+p -50+p -50+p -50+p -50+p -50+p -50+p -50+p -60+p -60+p -60+p -60+p -60+p -60+p -60+p -60 -70+p -70+p -70+p -70+p -70+p -70+p -70+p -80+p -È diff --git a/contrib/bc/tests/fuzzing/dc_inputs/27.txt b/contrib/bc/tests/fuzzing/dc_inputs/27.txt deleted file mode 100644 index 69745b952afc..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/27.txt +++ /dev/null @@ -1,2 +0,0 @@ -"0000000\ - diff --git a/contrib/bc/tests/fuzzing/dc_inputs/28.txt b/contrib/bc/tests/fuzzing/dc_inputs/28.txt deleted file mode 100644 index fe81732b3e38..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/28.txt +++ /dev/null @@ -1 +0,0 @@ -10 4%0:i[000] 1:b 0;0 p 1;b0:b [000] 1:b 0;b p 1;b~b 0;b p 0;b~~~0k diff --git a/contrib/bc/tests/fuzzing/dc_inputs/29.txt b/contrib/bc/tests/fuzzing/dc_inputs/29.txt deleted file mode 100644 index 886eb8ee0a8e..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/29.txt +++ /dev/null @@ -1,13 +0,0 @@ -10 4%0:b [200] 1:b 0;b 1;b X - 2000 1%p0 -3460:b [200] 1:b 0;b p bp0 -.2 1%pR -6 4%pR -10 4%0:b [200] 1:b 0;b p 1;b X - 20000 1%pR -b 0;b p 0;b2 -1bpb [200] 1:u 0;b p 1;b X - 2 -[000] 0:b [200] 0:b 0;b p S0b p -[s0]XpR - diff --git a/contrib/bc/tests/fuzzing/dc_inputs/30.txt b/contrib/bc/tests/fuzzing/dc_inputs/30.txt deleted file mode 100644 index e072e71617d8..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/30.txt +++ /dev/null @@ -1 +0,0 @@ -0;0[]0:b;bs0l0x;0 diff --git a/contrib/bc/tests/fuzzing/dc_inputs/abs.txt b/contrib/bc/tests/fuzzing/dc_inputs/abs.txt deleted file mode 100644 index 9907dfc6679d..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/abs.txt +++ /dev/null @@ -1,7 +0,0 @@ -0bpR -1bpR -.218933bpR -138963.9873645bpR -_19bpR -_.1298376bpR -_3892173.289375bpR diff --git a/contrib/bc/tests/fuzzing/dc_inputs/add.txt b/contrib/bc/tests/fuzzing/dc_inputs/add.txt deleted file mode 100644 index 42da2f1f309c..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/add.txt +++ /dev/null @@ -1,33 +0,0 @@ -0 0+pR -0 0 0++pR -0 1+pR -0 1 1++pR -1 1+pR -1 0+pR -2 5+pR -237 483+pR -999 999+pR -2374623 324869356734856+pR -2378639084586723980562 23468729367839+pR -37298367203972395108367910823465293084561329084561390845613409516734503870691837451 785621394067928346918023476190834672198467134908618723249671349062187346898241093486139046139084613490817356023871869102746182749061872609129847+pR -1.1 0+pR -0 1.1+pR -457283.731284923576 37842934672834.3874629385672354+pR -1.0 0.1+pR -3746289134067138046 0.138375863945672398456712389456273486293+pR -_1 _1+pR -_4 _15+pR -_1346782 _1287904651762468913476+pR -99999999999999999999999999999999999999999999999999999999999.999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001+pR -99999999999999999999999999999999999999999999999999999999999.999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999995 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005+pR -99999999999999999999999999999999999999999999999999999999999.999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001+pR -99999999999999999999999999999999999999999999999999999999999.999999999999999999999999999999999999999999999999999999999899999999999999999999999999999999999999999999999999999999999999 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001+pR -99999999999999999999999999999999999989999999999999999999999.999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001+pR -_1889985797 2012747315+pR -0 _14338.391079082+pR -_2422297 1.3134942556+pR -_1289374 1289374.2893417 0.238971 28937.28971+++pR -1289374 1289374.2893417 _0.238971 28937.28971+++pR -1289374 1289374.2893417 0.238971 _28937.28971+++pR -1289374 1289374.2893417 _0.238971 _28937.28971+++pR -1289374 _1289374.2893417 _0.238971 _28937.28971+++pR diff --git a/contrib/bc/tests/fuzzing/dc_inputs/array.dc b/contrib/bc/tests/fuzzing/dc_inputs/array.dc deleted file mode 100644 index 970f29a68768..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/array.dc +++ /dev/null @@ -1,2 +0,0 @@ -#! /usr/bin/dc -0si[lid:rli1+sili100>x]dsxx[li;rpRli1-sili100!>x]li1+[li;rpRli1+sili100>x] diff --git a/contrib/bc/tests/fuzzing/dc_inputs/boolean.txt b/contrib/bc/tests/fuzzing/dc_inputs/boolean.txt deleted file mode 100644 index 815100f0d085..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/boolean.txt +++ /dev/null @@ -1,80 +0,0 @@ -0 1(pR -1 1(pR -2 1(pR -_1 1(pR -_1 0(pR -_1 _1(pR -_1 _2(pR -0 1{pR -1 1{pR -2 1{pR -_1 1{pR -_1 0{pR -_1 _1{pR -_1 _2{pR -0 1)pR -1 1)pR -2 1)pR -_1 1)pR -_1 0)pR -_1 _1)pR -_1 _2)pR -0 1}pR -1 1}pR -2 1}pR -_1 1}pR -_1 0}pR -_1 _1}pR -_1 _2}pR -0 0GpR -0 1GpR -1 0GpR -_1 _1GpR -0 _1GpR -_1 0GpR -1 1GpR -238 2GpR -0NpR -1NpR -_1NpR -2398NpR -_2983.2389NpR -0 0MpR -1 0MpR -0 1MpR -1 1MpR -128973240 0MpR -0 2893712MpR -1982 28937MpR -_2938 0MpR -0 _1023.298037MpR -0.283917 0MpR -2389 _1208.28937MpR -0 289.289372MpR -_298.29387 0MpR -_2983.28973 82937MpR -0 _2938.320837MpR -_2089.2308 0MpR -_0.2893 _2938.28973MpR -0.00000 1892MpR -1289.023 .0000MpR -0 0mpR -1 0mpR -0 1mpR -1 1mpR -128973240 0mpR -0 2893712mpR -1982 28937mpR -_2938 0mpR -0 _1023.298037mpR -0.283917 0mpR -2389 _1208.28937mpR -0 289.289372mpR -_298.29387 0mpR -_2983.28973 82937mpR -0 _2938.320837mpR -_2089.2308 0mpR -_0.2893 _2938.28973mpR -0.00000 1892mpR -1289.023 .0000mpR -0.0000 .00000mpR diff --git a/contrib/bc/tests/fuzzing/dc_inputs/decimal.txt b/contrib/bc/tests/fuzzing/dc_inputs/decimal.txt deleted file mode 100644 index fdc628c857e0..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/decimal.txt +++ /dev/null @@ -1,41 +0,0 @@ -0pR -0.0pR -.0000pR -000000000000000000000000.00000000000000000000000pR -000000000000000000000000000135482346782356pR -000000000000000000000000002pR -1pR -11pR -123pR -7505pR -1023468723275435238491972521917846pR -4343472432431705867392073517038270398027352709027389273920739037937960379637893607893607893670530278200795207952702873892786172916728961783907893607418973587857386079679267926737520730925372983782793652793pR -_1pR -_203pR -_57pR -_18586pR -_31378682943772818461924738352952347258pR -_823945628745673589495067238723986520375698237620834674509627345273096287563846592384526349872634895763257893467523987578690283762897568459072348758071071087813501875908127359018715023841710239872301387278pR -.123521346523546pR -0.1245923756273856pR -_.1024678456387pR -_0.8735863475634587pR -4.0pR -_6.0pR -234237468293576.000000000000000000000000000000pR -23987623568943567.00000000000000000005677834650000000000000pR -23856934568940675.000000000000000435676782300000000000000456784pR -77567648698496.000000000000000000587674750000000000458563800000000000000pR -2348672354968723.2374823546000000000003256987394502346892435623870000000034578pR -_2354768.000000000000000000000000000000000000pR -_96739874567.000000000347683456pR -_3764568345.000000000004573845000000347683460pR -_356784356.934568495770004586495678300000000pR -74325437345273852773827101738273127312738521733017537073520735207307570358738257390761276072160719802671980267018728630178.7082681027680521760217867841276127681270867827821768173178207830710978017738178678012767377058785378278207385237085237803278203782037237582795870pR -_756752732785273851273728537852738257837283678965738527385272983678372867327835672967385278372637862738627836279863782673862783670.71738178361738718367186378610738617836781603760178367018603760178107735278372832783728367826738627836278378260736270367362073867097307925pR -9812734012837410982345719208345712908357412903587192048571920458712.23957182459817249058172945781pR -2893.982.28937pRpR -198273\ -.192837pR -1892.238907\ -.3982739pRpR diff --git a/contrib/bc/tests/fuzzing/dc_inputs/divide.txt b/contrib/bc/tests/fuzzing/dc_inputs/divide.txt deleted file mode 100644 index 38b874e9f175..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/divide.txt +++ /dev/null @@ -1,33 +0,0 @@ -20k -0 1/pR -0 321566/pR -0 0.3984567238456/pR -1 1/pR -1 1287469297356/pR -1 0.2395672438567234/pR -1 237586239856.0293596728392360/pR -1249687284356 3027949207835207/pR -378617298617396719 35748521/pR -9348576237845624358 0.9857829375461/pR -35768293846193284 2374568947.045762839567823/pR -_78987234567812345 876542837618936/pR -_356789237555535468 0.3375273860984786903/pR -_5203475364850390 435742903748307.70869378534043296404530458/pR -_0.37861723347576903 7385770896/pR -_0.399454682043962 0.34824389304/pR -_0.6920414523873204 356489645223.76076045304879030/pR -_35872917389671.7573280963748 73924708/pR -_78375896314.4836709876983 0.78356798637817/pR -_2374123896417.143789621437581 347821469423789.1473856783960/pR -_896729350238549726 _34976289345762/pR -_2374568293458762348596 _0.8792370647234987679/pR -_237584692306721845726038 _21783910782374529637.978102738746189024761/pR -_0.23457980123576298375682 _1375486293874612/pR -_0.173897061862478951264 _0.8179327486017634987516298745/pR -_0.9186739823576829347586 _0.235678293458756239846/pR -_0.9375896183746982374568 _13784962873546.0928729395476283745/pR -_2930754618923467.12323745862937465 _734869238465/pR -_23745861923467.874675129834675 _0.23542357869124756/pR -_3878923750692883.7238596702834756902 _7384192674957215364986723.9738461923487621983/pR -1 0.00000000000000000000000000000000000000000002346728372937352457354204563027/pR -239854711289345712 2891374 182 .2893 ///pR diff --git a/contrib/bc/tests/fuzzing/dc_inputs/divmod.txt b/contrib/bc/tests/fuzzing/dc_inputs/divmod.txt deleted file mode 100644 index 1633203ff99f..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/divmod.txt +++ /dev/null @@ -1,64 +0,0 @@ -20k -0 1~pRpR -0 321566~pRpR -0 0.3984567238456~pRpR -1 1~pRpR -1 1287469297356~pRpR -1 0.2395672438567234~pRpR -1 237586239856.0293596728392360~pRpR -1249687284356 3027949207835207~pRpR -378617298617396719 35748521~pRpR -9348576237845624358 0.9857829375461~pRpR -35768293846193284 2374568947.045762839567823~pRpR -_78987234567812345 876542837618936~pRpR -_356789237555535468 0.3375273860984786903~pRpR -_5203475364850390 435742903748307.70869378534043296404530458~pRpR -_0.37861723347576903 7385770896~pRpR -_0.399454682043962 0.34824389304~pRpR -_0.6920414523873204 356489645223.76076045304879030~pRpR -_35872917389671.7573280963748 73924708~pRpR -_78375896314.4836709876983 0.78356798637817~pRpR -_2374123896417.143789621437581 347821469423789.1473856783960~pRpR -_896729350238549726 _34976289345762~pRpR -_2374568293458762348596 _0.8792370647234987679~pRpR -_237584692306721845726038 _21783910782374529637.978102738746189024761~pRpR -_0.23457980123576298375682 _1375486293874612~pRpR -_0.173897061862478951264 _0.8179327486017634987516298745~pRpR -_0.9186739823576829347586 _0.235678293458756239846~pRpR -_0.9375896183746982374568 _13784962873546.0928729395476283745~pRpR -_2930754618923467.12323745862937465 _734869238465~pRpR -_23745861923467.874675129834675 _0.23542357869124756~pRpR -_3878923750692883.7238596702834756902 _7384192674957215364986723.9738461923487621983~pRpR -1 0.00000000000000000000000000000000000000000002346728372937352457354204563027~pRpR -0k -0 1~pRpR -0 321566~pRpR -0 0.3984567238456~pRpR -1 1~pRpR -1 1287469297356~pRpR -1 0.2395672438567234~pRpR -1 237586239856.0293596728392360~pRpR -1249687284356 3027949207835207~pRpR -378617298617396719 35748521~pRpR -9348576237845624358 0.9857829375461~pRpR -35768293846193284 2374568947.045762839567823~pRpR -_78987234567812345 876542837618936~pRpR -_356789237555535468 0.3375273860984786903~pRpR -_5203475364850390 435742903748307.70869378534043296404530458~pRpR -_0.37861723347576903 7385770896~pRpR -_0.399454682043962 0.34824389304~pRpR -_0.6920414523873204 356489645223.76076045304879030~pRpR -_35872917389671.7573280963748 73924708~pRpR -_78375896314.4836709876983 0.78356798637817~pRpR -_2374123896417.143789621437581 347821469423789.1473856783960~pRpR -_896729350238549726 _34976289345762~pRpR -_2374568293458762348596 _0.8792370647234987679~pRpR -_237584692306721845726038 _21783910782374529637.978102738746189024761~pRpR -_0.23457980123576298375682 _1375486293874612~pRpR -_0.173897061862478951264 _0.8179327486017634987516298745~pRpR -_0.9186739823576829347586 _0.235678293458756239846~pRpR -_0.9375896183746982374568 _13784962873546.0928729395476283745~pRpR -_2930754618923467.12323745862937465 _734869238465~pRpR -_23745861923467.874675129834675 _0.23542357869124756~pRpR -_3878923750692883.7238596702834756902 _7384192674957215364986723.9738461923487621983~pRpR -1 0.00000000000000000000000000000000000000000002346728372937352457354204563027~pRpR diff --git a/contrib/bc/tests/fuzzing/dc_inputs/else.dc b/contrib/bc/tests/fuzzing/dc_inputs/else.dc deleted file mode 100644 index 84deb8754e9f..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/else.dc +++ /dev/null @@ -1,4 +0,0 @@ -#! /usr/bin/dc -[[Done!]pR]sM[lip1-si0li>LeM]sL10silLx -[[Done!]pR]sM[lip1-si0li!<LeM]sL10silLx -[[Done!]pR]sM[lip1-si0li!=LeM]sL10silLx diff --git a/contrib/bc/tests/fuzzing/dc_inputs/engineering.txt b/contrib/bc/tests/fuzzing/dc_inputs/engineering.txt deleted file mode 100644 index 90a35052b3cb..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/engineering.txt +++ /dev/null @@ -1,19 +0,0 @@ -1o -0pR -1pR -_34pR -298pR -_8933pR -29488pR -_148232pR -8927559pR -.2pR -_.02pR -.002pR -_.0003pR -.0000209310pR -_.00000289362pR -.000000859289pR -_.02983672pR -.20201296pR -_.8907210897000000000000000000pR diff --git a/contrib/bc/tests/fuzzing/dc_inputs/loop.dc b/contrib/bc/tests/fuzzing/dc_inputs/loop.dc deleted file mode 100644 index 26cec23818df..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/loop.dc +++ /dev/null @@ -1,3 +0,0 @@ -#! /usr/bin/dc -[lip1-si0li>L]sL10silLx -[lip1+si10li<L]sL0silLx diff --git a/contrib/bc/tests/fuzzing/dc_inputs/misc.txt b/contrib/bc/tests/fuzzing/dc_inputs/misc.txt deleted file mode 100644 index 222a3ad265d2..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/misc.txt +++ /dev/null @@ -1 +0,0 @@ -zp198202389.289374pzp[Hello, World!]pzpzpfrfczpfR diff --git a/contrib/bc/tests/fuzzing/dc_inputs/modexp.txt b/contrib/bc/tests/fuzzing/dc_inputs/modexp.txt deleted file mode 100644 index a6afb998558e..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/modexp.txt +++ /dev/null @@ -1,103 +0,0 @@ -0 0 1|pR -1 0 1|pR -1 0 2|pR -0 10 1|pR -1 293 1|pR -1 2789365 2|pR -100 8 7|pR -10922384 15031007 201|pR -3346529 189 254|pR -4113416930 197 14|pR -7709 5887 111|pR -5487406 3252 128|pR -2080527 2279453822 219|pR -48895 50678 232|pR -1535808383 2902995144 18|pR -8437837 2882198 69|pR -35363 25806 2|pR -3221177403 1560419989 189|pR -227 42775 163|pR -2811398069 37500 173|pR -15046850 3859895697 195|pR -15770756 3621999893 119|pR -6937927 3719297189 183|pR -12573 43819 209|pR -42098463 7584603 136|pR -8656683 1328292415 226|pR -209 81 157|pR -141 13317429 26|pR -809485795 60745 101|pR -4882 1388217898 38|pR -750704 78 119|pR -668879580 2888860497 179|pR -1152725844 15295742 154|pR -16160694 8981529 154|pR -216 102 3|pR -3691227289 5344109 232|pR -2195559299 61 222|pR -2478990626 13007440 30|pR -45083 44 117|pR -224 55824 53|pR -1372700133 89 94|pR -205 10422 48|pR -11887 12 73|pR -5955 24353 114|pR -1201697310 789722419 6|pR -56577 231 229|pR -96 38841 189|pR -6529661 5636520 209|pR -11005 15955685 27|pR -9709 231 132|pR -59790 1034579699 166|pR -47892 14536879 79|pR -48 208 21|pR -33036 3877 65|pR -164 6527085 249|pR -12146850 224 37|pR -218 16425679 62|pR -51 27641 95|pR -3076735605 49154 32|pR -515652717 4117874315 143|pR -300672671 720768884 110|pR -9422066 206 5|pR -43 97 13|pR -545174510 65319 126|pR -3317462730 704990271 51|pR -47316 23231 202|pR -7236571 4379567 106|pR -2584584521 2459274189 29|pR -61562 5035178 178|pR -65302 112 151|pR -63040 2168854052 213|pR -9039611 2370306559 62|pR -16414384 1020652061 83|pR -7491 3853569905 172|pR -1180322494 46670 84|pR -3823343557 3865107254 127|pR -6240872 55335 39|pR -2281401897 1098411 251|pR -61 2949190429 231|pR -8981024 162 43|pR -1 3568883218 212|pR -4217100969 3471787779 8|pR -3232237 13 243|pR -29280 3972452706 100|pR -13077 6431923 216|pR -104 3098510775 140|pR -9503298 174 242|pR -3424695712 12184 23|pR -184 15066347 151|pR -2935856 14003205 184|pR -1386637762 2128151420 71|pR -154 11960656 12|pR -743976432 4004778779 136|pR -3909160595 3575680922 21|pR -26133 3580 147|pR -409154 170 68|pR -149 55629 40|pR -5753 13776176 32|pR -3831447473 658273178 98|pR -1527252003 2300622 207|pR -3363824553 8244645 215|pR -20 145 101|pR -4005077294 2196555621 94|pR diff --git a/contrib/bc/tests/fuzzing/dc_inputs/modulus.txt b/contrib/bc/tests/fuzzing/dc_inputs/modulus.txt deleted file mode 100644 index 613944b2001a..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/modulus.txt +++ /dev/null @@ -1,70 +0,0 @@ -20k -1 1%pR -2 1%pR -16 4%pR -15 4%pR -17 4%pR -2389473 5%pR -39240687239 1%pR -346728934 23958%pR -3496723859067234 298375462837546928347623059375486%pR -_1 1%pR -_2 1%pR -_47589634875689345 37869235%pR -_1274852934765 2387628935486273546%pR -_6324758963 237854962%pR -1 _1%pR -2 _1%pR -2 _2%pR -2 _3%pR -16 5%pR -15 5%pR -14 5%pR -89237423 _237856923854%pR -123647238946 _12467%pR -_1 _1%pR -_2 _1%pR -_2 _2%pR -_2 _3%pR -_13 _7%pR -_14 _7%pR -_15 _7%pR -_12784956 _32746%pR -_127849612 _23712347682193%pR -0k -1 1%pR -2 1%pR -16 4%pR -15 4%pR -17 4%pR -2389473 5%pR -39240687239 1%pR -346728934 23958%pR -3496723859067234 298375462837546928347623059375486%pR -_1 1%pR -_2 1%pR -_47589634875689345 37869235%pR -_1274852934765 2387628935486273546%pR -_6324758963 237854962%pR -1 _1%pR -2 _1%pR -2 _2%pR -2 _3%pR -16 5%pR -15 5%pR -14 5%pR -89237423 _237856923854%pR -123647238946 _12467%pR -_1 _1%pR -_2 _1%pR -_2 _2%pR -_2 _3%pR -_13 _7%pR -_14 _7%pR -_15 _7%pR -_12784956 _32746%pR -_127849612 _23712347682193%pR -_3191280681 641165986%pR -0k _899510228 _2448300078.40314%pR -0k _7424863 _207.2609738667%pR -0k 3769798918 0.6%pR diff --git a/contrib/bc/tests/fuzzing/dc_inputs/multiply.txt b/contrib/bc/tests/fuzzing/dc_inputs/multiply.txt deleted file mode 100644 index 1f9041d06ea7..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/multiply.txt +++ /dev/null @@ -1,42 +0,0 @@ -0 0*pR -0.000 0*pR -1 0*pR -0 1*pR -0 2498752389672835476*pR -873246913745129084576134 0*pR -1 472638590273489273456*pR -12374861230476103672835496 1*pR -1 1*pR -2 1*pR -1 2*pR -2 2*pR -3 14*pR -17 8*pR -1892467513846753 1872439821374591038746*pR -328962735862.2973546835638947635 1728465791348762356*pR -38745962374538.387427384672934867234 0.1932476528394672837568923754*pR -9878894576289457634856.2738627161689017387608947567654 37842939768237596237854203.29874372139852739126739621793162*pR -_1 1*pR -_1 2*pR -78893457 _34876238956*pR -235678324957634 _0.2349578349672389576*pR -_12849567821934 12738462937681*pR -1274861293467.927843682937462 _28935678239*pR -2936077239872.12937462836 _0.012842357682435762*pR -2387692387566.2378569237546 _272189345628.123875629835876*pR -0.012348629356782835962 _23487692356*pR -0.4768349567348675934 _0.23756834576934857638495*pR -0.98748395367485962735486 _4675839462354867.376834956738456*pR -_321784627934586 _235762378596*pR -_32578623567892356 _0.32567384579638456*pR -_35768232346876 _2348672935602387620.28375682349576237856*pR -_0.2356728394765234 _238759624356978*pR -_0.2345768212346780 _0.235768124697074385948943532045*pR -_0.370873860736785306278630 _7835678398607.7086378076867096270*pR -_78365713707.7089637863786730 _738580798679306780*pR -_73867038956790490258249 _0.7379862716391723672803679*pR -_378621971598721837710387 _98465373878350798.09743896037963078560*pR -37164201 2931559660*pR -679468076118972457796560530571.46287161642138401685 93762.2836*pR -.000000000000000000000000001 .0000000000000000000000001*pR -239 289 _98 .8937 _.1893 28937*****pR diff --git a/contrib/bc/tests/fuzzing/dc_inputs/places.txt b/contrib/bc/tests/fuzzing/dc_inputs/places.txt deleted file mode 100644 index 308ff1373d64..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/places.txt +++ /dev/null @@ -1,14 +0,0 @@ -0 0@pR -1 0@pR -2 0@pR -0.0023896 0@pR -1.298346 0@pR -2.00000000 0@pR -0.0023896 3@pR -1.298346 4@pR -2.00000000 5@pR -289 3@pR -18.34 6@pR -_183.1 0@pR -_23.238 8@pR -_343.23 2@pR diff --git a/contrib/bc/tests/fuzzing/dc_inputs/power.txt b/contrib/bc/tests/fuzzing/dc_inputs/power.txt deleted file mode 100644 index 955e42557a15..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/power.txt +++ /dev/null @@ -1,36 +0,0 @@ -20k -0 0^pR -0 1^pR -0 1894^pR -1 0^pR -39746823 0^pR -0.238672983047682 0^pR -18394762374689237468.97354862973846 0^pR -1 1^pR -2 1^pR -18927361346 1^pR -0.23523785962738592635777 1^pR -328956734869213746.89782398457234 1^pR -8937 8^pR -93762.2836 3^pR -1 _1^pR -2 _1^pR -10 _1^pR -683734768 _1^pR -38579623756.897937568235 _1^pR -1 _32467^pR -2 _53^pR -_1 1^pR -_1 2^pR -_2 1^pR -_2 2^pR -_237 294^pR -_3746 28^pR -_0.3548 35^pR -_1 _1^pR -_1 _2^pR -_2 _1^pR -_2 _2^pR -_86 _7^pR -0 _251^pR -_0.2959371298 27^pR diff --git a/contrib/bc/tests/fuzzing/dc_inputs/quit.dc b/contrib/bc/tests/fuzzing/dc_inputs/quit.dc deleted file mode 100644 index 81e6289af25b..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/quit.dc +++ /dev/null @@ -1,2 +0,0 @@ -1se [li p 1+si le li !=lem]sl [lk p 1+sk le lk !=o]so [0sk lox leQ 0sk lox le 3*1+Q 0sk lox]sm [0si llx le 1+se 10 le !=n]dsnx -1si [li p 1+si 10 li !=set]ss [1000Q]st lsx diff --git a/contrib/bc/tests/fuzzing/dc_inputs/scientific.txt b/contrib/bc/tests/fuzzing/dc_inputs/scientific.txt deleted file mode 100644 index 240473b0bbca..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/scientific.txt +++ /dev/null @@ -1,55 +0,0 @@ -0e0pR -0e1pR -0e5pR -0e_2pR -0e_100pR -1e0pR -_1e1pR -1e9pR -_1e21pR -1e_1pR -_1e_2pR -1e_5pR -4.92837e5pR -_3.28971028e20pR -6.2e3pR -_8.289371e2pR -5.9817280937e8pR -_3.28977e_1pR -8.8927891e_20pR -_7.98239e_4pR -4.4892e_4pR -_18937e0pR -198273e10pR -_18927e_4pR -28937e_5pR -_891072e_7pR -.28972e0pR -_.891273e_1pR -.8928397e1pR -_.0002983172e5pR -.00022e3pR -_.00022e4pR -.0000328937e8pR -82938.29873e8.82\ -937pRpR -2893e2\ -.389pRpR -0o -0pR -1pR -10pR -_289pR -2894pR -_89434pR -894370pR -_1239839pR -28931708pR -_8052098.8029731809pR -.1pR -_.01pR -.001pR -_.00038pR -.0000483pR -_.0002894378190pR -.2893712083pR diff --git a/contrib/bc/tests/fuzzing/dc_inputs/shift.txt b/contrib/bc/tests/fuzzing/dc_inputs/shift.txt deleted file mode 100644 index 628b0a5bf6fe..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/shift.txt +++ /dev/null @@ -1,42 +0,0 @@ -0 0HpR -1 0HpR -2 0HpR -0.0023896 0HpR -1.298346 0HpR -2.00000000 0HpR -0.0023896 3HpR -1.298346 4HpR -2.00000000 5HpR -89136.892348976 7HpR -1892634051829351283289298 24HpR -0 0hpR -1 0hpR -2 0hpR -0.0023896 0hpR -1.298346 0hpR -2.00000000 0hpR -0.0023896 3hpR -1.298346 4hpR -2.00000000 5hpR -89136.892348976 7hpR -1892634051829351283289298 24hpR -_1 0HpR -_2 0HpR -_0.0023896 0HpR -_1.298346 0HpR -_2.00000000 0HpR -_0.0023896 3HpR -_1.298346 4HpR -_2.00000000 5HpR -_89136.892348976 7HpR -_1892634051829351283289298 24HpR -_1 0hpR -_2 0hpR -_0.0023896 0hpR -_1.298346 0hpR -_2.00000000 0hpR -_0.0023896 3hpR -_1.298346 4hpR -_2.00000000 5hpR -_89136.892348976 7hpR -_1892634051829351283289298 24hpR diff --git a/contrib/bc/tests/fuzzing/dc_inputs/sqrt.txt b/contrib/bc/tests/fuzzing/dc_inputs/sqrt.txt deleted file mode 100644 index 7c13fdd0bb5d..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/sqrt.txt +++ /dev/null @@ -1,14 +0,0 @@ -20k -0vpR -2vpR -4vpR -9vpR -16vpR -25vpR -121vpR -48765vpR -9287356207356vpR -0.189274385967238956872354vpR -12389467137496823.134567829387456283946vpR -.0000000000000000000000000000123vpR -1vpR diff --git a/contrib/bc/tests/fuzzing/dc_inputs/stack_len.txt b/contrib/bc/tests/fuzzing/dc_inputs/stack_len.txt deleted file mode 100644 index 1b367f3affa8..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/stack_len.txt +++ /dev/null @@ -1,15 +0,0 @@ -zp -zp -zp -zp -sa -yap -Sa -yap -Sa -yapR -La -yapR -La -yap -zp diff --git a/contrib/bc/tests/fuzzing/dc_inputs/stdin.txt b/contrib/bc/tests/fuzzing/dc_inputs/stdin.txt deleted file mode 100644 index 7bf8316b99af..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/stdin.txt +++ /dev/null @@ -1,205 +0,0 @@ -0si[lid:rli1+sili10>x]dsxxli1-si[li;rpRli1-sili0!>x]dsxxli1+si[li;rpRli1+sili10>x]dsxx0sx0si -1 2+p -[foo] -0 -1+p -2+p -3+p -4+p -5+p -6+p -7+p -8+p -9+p -10+p -11+p -12+p -13+p -14+p -15+p -16+p -17+p -18+p -19+p -20+p -21+p -22+p -23+p -24+p -25+p -26+p -27+p -28+p -29+p -30+p -31+p -32+p -33+p -34+p -35+p -36+p -37+p -38+p -39+p -40+p -41+p -42+p -43+p -44+p -45+p -46+p -47+p -48+p -49+p -50+p -51+p -52+p -53+p -54+p -55+p -56+p -57+p -58+p -59+p -60+p -61+p -62+p -63+p -64+p -65+p -66+p -67+p -68+p -69+p -70+p -71+p -72+p -73+p -74+p -75+p -76+p -77+p -78+p -79+p -80+p -81+p -82+p -83+p -84+p -85+p -86+p -87+p -88+p -89+p -90+p -91+p -92+p -93+p -94+p -95+p -96+p -97+p -98+p -99+p -100+p -101+p -102+p -103+p -104+p -105+p -106+p -107+p -108+p -109+p -110+p -111+p -112+p -113+p -114+p -115+p -116+p -117+p -118+p -119+p -120+p -121+p -122+p -123+p -124+p -125+p -126+p -127+p -128+p -129+p -130+p -131+p -132+p -133+p -134+p -135+p -136+p -137+p -138+p -139+p -140+p -141+p -142+p -143+p -144+p -145+p -146+p -147+p -148+p -149+p -150+p -151+p -152+p -153+p -154+p -155+p -156+p -157+p -158+p -159+p -160+p -161+p -162+p -163+p -164+p -165+p -166+p -167+p -168+p -169+p -170+p -171+p -172+p -173+p -174+p -175+p -176+p -177+p -178+p -179+p -180+p -181+p -182+p -183+p -184+p -185+p -186+p -187+p -188+p -189+p -190+p -191+p -192+p -193+p -194+p -195+p -196+p -197+p -198+p -199+p -200+p -p diff --git a/contrib/bc/tests/fuzzing/dc_inputs/stream.dc b/contrib/bc/tests/fuzzing/dc_inputs/stream.dc deleted file mode 100644 index 5c61e7c931f9..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/stream.dc +++ /dev/null @@ -1,2 +0,0 @@ -#! /usr/bin/dc -0si[liPlid1+sili4096>x]ddsxPx diff --git a/contrib/bc/tests/fuzzing/dc_inputs/strings.txt b/contrib/bc/tests/fuzzing/dc_inputs/strings.txt deleted file mode 100644 index 460976abbd9e..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/strings.txt +++ /dev/null @@ -1,51 +0,0 @@ -[Hello, World!]ZpR -[Hello, World!]pR -[Hello, \[ World!]ZpR -[Hello, \[ World!]pR -[Hello, \] World!]ZpR -[Hello, \] World!]pR -[30pR] -[29pR] -[28pR] -[27pR] -[26pR] -[25pR] -[24pR] -[23pR] -[22pR] -[21pR] -[20pR] -[19pR] -[18pR] -[17pR] -[16pR] -[15pR] -[14pR] -[13pR] -[12pR] -[11pR] -[10pR] -[9pR] -[8pR] -[7pR] -[6pR] -[5pR] -[4pR] -[3pR] -[2pR] -[1pR] -[xz0<x]dsxx -[\\]pR -[\[\]]pR -1xpR -[1st] 0:b [2nd] 1:b 0;b p 1;b p -[string]XpR -[3 4^pR]silix -[[[q 1 3+pR]x]x]x4 5^pR -4xpR -5 112ax 90ax 112ax 82ax -[\q] pR -[q\\] pR -[\\] pR -92 a pR -[[10pR]si]x [[lix]x]x diff --git a/contrib/bc/tests/fuzzing/dc_inputs/subtract.txt b/contrib/bc/tests/fuzzing/dc_inputs/subtract.txt deleted file mode 100644 index 2cb4104fb717..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/subtract.txt +++ /dev/null @@ -1,33 +0,0 @@ -0 0-pR -0 1-pR -1 0-pR -1 1-pR -5 2-pR -2 9-pR -321974 12845976238457-pR -2874519803456710938465 384723854-pR -10000000000000000000000000000000000000000 999999999999999999999999999999999999999-pR -10000000000000000000000000000000000000000 9999999999999999999999999999999999999999-pR -10000000000000000000000000000000000000000 999999999999999999999999999999999999999.99999999999999999999999999999999999-pR -10000000000000000000000000000000000000000 9999999999999999999999999999999999999999.9999999999999999999999999999999999-pR -10000000000000000000000000000000000000000 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000001-pR -10000000000000000000000000000000000000001 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000001-pR -10000000000000000000000000000000000000000.0000000001 0.0000000000000000000000000000000000000000000000000000000000000000000000000001-pR -_2 6-pR -_23784692345 182934721309467230894628735496027345-pR -_224352354962873059862 _1245723576829456278354960278345-pR -_3468273598 _12354243-pR -_0.92345768293 _2354768923-pR -_712384634.123476823 _24768293376-pR -_1879234638 _0.917234869234-pR -_0.9172438692134 _0.971284967124-pR -_0.1283475123465 _0.937462346-pR -_124765829346.2837468293562 _0.923467829346-pR -_12476829385769 _1928476259034.8378629356-pR -_0.38476284395876345 _94875394587623.2357869324857-pR -_4674596708467.34754789403674343567 _48672394852354698.237548629345-pR -979519669 3018100865-pR -929002449 3280677283-pR -0 _525898-pR -3 _3-pR -2 _1 2893714 _2189367411289 _.8921374 3.9201384----pR diff --git a/contrib/bc/tests/fuzzing/dc_inputs/vars.txt b/contrib/bc/tests/fuzzing/dc_inputs/vars.txt deleted file mode 100644 index bbe73b47d81f..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/vars.txt +++ /dev/null @@ -1,2 +0,0 @@ -298734.8921702348sx_928374892.28937syzpRlxly+pR -298734.8921702348S xotj _928374892.28937S yotp zpRl xotj l yotp-pRzpR L xotj L yotp-pR diff --git a/contrib/bc/tests/fuzzing/dc_inputs/weird.dc b/contrib/bc/tests/fuzzing/dc_inputs/weird.dc deleted file mode 100644 index 391ec05d6282..000000000000 --- a/contrib/bc/tests/fuzzing/dc_inputs/weird.dc +++ /dev/null @@ -1,2 +0,0 @@ -#! /usr/bin/dc -zp198202389.289374pzp[He World!]SzpzXfrfxzpfR diff --git a/contrib/bc/tests/history.py b/contrib/bc/tests/history.py index c74dfd72f0a7..a3b722386a62 100755 --- a/contrib/bc/tests/history.py +++ b/contrib/bc/tests/history.py @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: BSD-2-Clause # -# Copyright (c) 2018-2021 Gavin D. Howard and contributors. +# Copyright (c) 2018-2024 Gavin D. Howard and contributors. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: @@ -126,9 +126,9 @@ def write_str(child, s): # Check the bc banner. # @param child The child process. def bc_banner(child): - bc_banner1 = "bc [0-9]+\.[0-9]+\.[0-9]+\r\n" - bc_banner2 = "Copyright \(c\) 2018-[2-9][0-9][0-9][0-9] Gavin D. Howard and contributors\r\n" - bc_banner3 = "Report bugs at: https://git.yzena.com/gavin/bc\r\n\r\n" + bc_banner1 = "bc [0-9]+\\.[0-9]+\\.[0-9]+\r\n" + bc_banner2 = "Copyright \\(c\\) 2018-[2-9][0-9][0-9][0-9] Gavin D. Howard and contributors\r\n" + bc_banner3 = "Report bugs at: https://git.gavinhoward.com/gavin/bc\r\n\r\n" bc_banner4 = "This is free software with ABSOLUTELY NO WARRANTY.\r\n\r\n" expect(child, bc_banner1) expect(child, bc_banner2) @@ -251,7 +251,7 @@ def test_sigint_sigquit(exe, args, env): try: send(child, "\t") - expect(child, " ") + expect(child, "\t") send(child, "\x03") # send(child, "\x1c") wait(child) @@ -320,7 +320,7 @@ def test_sigint(exe, args, env): try: send(child, "\t") - expect(child, " ") + expect(child, "\t") send(child, "\x03") wait(child) except pexpect.TIMEOUT: @@ -355,7 +355,7 @@ def test_sigtstp(exe, args, env): try: send(child, "\t") - expect(child, " ") + expect(child, "\t") send(child, "\x13") time.sleep(1) if not child.isalive(): @@ -395,7 +395,7 @@ def test_sigstop(exe, args, env): try: send(child, "\t") - expect(child, " ") + expect(child, "\t") send(child, "\x14") time.sleep(1) if not child.isalive(): @@ -678,7 +678,7 @@ def test_bc7(exe, args, env): send(child, "\x1b[0;4\x1b[0A") send(child, "\n") expect(child, prompt) - send(child, " ") + send(child, "\t") send(child, "\x1bb\x1bb\x1bb\x1bb\x1bb\x1bb\x1bb\x1bb\x1bb\x1bb\x1bb\x1bb") send(child, "\x1bf\x1bf\x1bf\x1bf\x1bf\x1bf\x1bf\x1bf\x1bf\x1bf\x1bf\x1bf") send(child, "\n") diff --git a/contrib/bc/tests/history.sh b/contrib/bc/tests/history.sh index 1898ae5499dc..d06d3c6af104 100755 --- a/contrib/bc/tests/history.sh +++ b/contrib/bc/tests/history.sh @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: BSD-2-Clause # -# Copyright (c) 2018-2021 Gavin D. Howard and contributors. +# Copyright (c) 2018-2024 Gavin D. Howard and contributors. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: @@ -33,7 +33,16 @@ testdir=$(dirname "$script") . "$testdir/../scripts/functions.sh" -# usage: history.sh dir -a|idx [exe args...] +# Just print the usage and exit with an error. This can receive a message to +# print. +# @param 1 A message to print. +usage() { + if [ $# -eq 1 ]; then + printf '%s\n\n' "$1" + fi + printf 'usage: %s dir -a|idx [exe args...]\n' "$script" + exit 1 +} # If Python does not exist, then just skip. py=$(command -v python3) @@ -51,9 +60,14 @@ if [ "$err" -ne 0 ]; then fi fi +if [ "$#" -lt 2 ]; then + usage "Not enough arguments; expect 2 arguments" +fi + # d is "bc" or "dc" d="$1" shift +check_d_arg "$d" # idx is either an index of the test to run or "-a". If it is "-a", then all # tests are run. @@ -65,9 +79,11 @@ if [ "$#" -gt 0 ]; then # exe is the executable to run. exe="$1" shift + check_exec_arg "$exe" else exe="$testdir/../bin/$d" + check_exec_arg "$exe" fi if [ "$d" = "bc" ]; then diff --git a/contrib/bc/tests/other.sh b/contrib/bc/tests/other.sh index 64ba877a20c0..1012fe919dea 100755 --- a/contrib/bc/tests/other.sh +++ b/contrib/bc/tests/other.sh @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: BSD-2-Clause # -# Copyright (c) 2018-2021 Gavin D. Howard and contributors. +# Copyright (c) 2018-2024 Gavin D. Howard and contributors. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: @@ -36,24 +36,39 @@ testdir=$(dirname "$script") outputdir=${BC_TEST_OUTPUT_DIR:-$testdir} +# Just print the usage and exit with an error. This can receive a message to +# print. +# @param 1 A message to print. +usage() { + if [ $# -eq 1 ]; then + printf '%s\n\n' "$1" + fi + printf 'usage: %s dir extra_math [exec args...]\n' "$script" + exit 1 +} + # Command-line processing. if [ "$#" -ge 2 ]; then d="$1" shift + check_d_arg "$d" extra_math="$1" shift + check_bool_arg "$extra_math" else - err_exit "usage: $script dir extra_math [exec args...]" 1 + usage "Not enough arguments; need 2" fi if [ "$#" -lt 1 ]; then exe="$testdir/../bin/$d" + check_exec_arg "$exe" else exe="$1" shift + check_exec_arg "$exe" fi if [ "$d" = "bc" ]; then @@ -62,6 +77,8 @@ else halt="q" fi +mkdir -p "$outputdir" + # For tests later. num=100000000000000000000000000000000000000000000000000000000000000000000000000000 num2="$num" @@ -95,14 +112,14 @@ set +e printf '\nRunning %s quit test...' "$d" -printf '%s\n' "$halt" | "$exe" "$@" > /dev/null 2>&1 +printf '%s\n' "$halt" 2> /dev/null | "$exe" "$@" > /dev/null 2>&1 checktest_retcode "$d" "$?" "quit" # bc has two halt or quit commands, so test the second as well. if [ "$d" = bc ]; then - printf '%s\n' "quit" | "$exe" "$@" > /dev/null 2>&1 + printf '%s\n' "quit" 2> /dev/null | "$exe" "$@" > /dev/null 2>&1 checktest_retcode "$d" "$?" quit @@ -125,11 +142,11 @@ if [ "$d" = "bc" ]; then export BC_ENV_ARGS=" '-l' '' -q" - printf 's(.02893)\n' | "$exe" "$@" > /dev/null + printf 's(.02893)\n' 2> /dev/null | "$exe" "$@" > /dev/null checktest_retcode "$d" "$?" "environment var" - "$exe" "$@" -e 4 > /dev/null + printf 'halt\n' 2> /dev/null | "$exe" "$@" -e 4 > /dev/null err="$?" checktest_retcode "$d" "$?" "environment var" @@ -143,7 +160,7 @@ if [ "$d" = "bc" ]; then redefine_res="$outputdir/bc_outputs/redefine.txt" redefine_out="$outputdir/bc_outputs/redefine_results.txt" - outdir=$(dirname "$easter_out") + outdir=$(dirname "$redefine_out") if [ ! -d "$outdir" ]; then mkdir -p "$outdir" @@ -151,19 +168,19 @@ if [ "$d" = "bc" ]; then printf '5\n0\n' > "$redefine_res" - "$exe" "$@" --redefine=print -e 'define print(x) { x }' -e 'print(5)' > "$redefine_out" + printf 'halt\n' 2> /dev/null | "$exe" "$@" --redefine=print -e 'define print(x) { x }' -e 'print(5)' > "$redefine_out" err="$?" checktest "$d" "$err" "keyword redefinition" "$redefine_res" "$redefine_out" - "$exe" "$@" -r "abs" -r "else" -e 'abs = 5;else = 0' -e 'abs;else' > "$redefine_out" + printf 'halt\n' 2> /dev/null | "$exe" "$@" -r "abs" -r "else" -e 'abs = 5;else = 0' -e 'abs;else' > "$redefine_out" err="$?" checktest "$d" "$err" "keyword redefinition" "$redefine_res" "$redefine_out" if [ "$extra_math" -ne 0 ]; then - "$exe" "$@" -lr abs -e "perm(5, 1)" -e "0" > "$redefine_out" + printf 'halt\n' 2> /dev/null | "$exe" "$@" -lr abs -e "perm(5, 1)" -e "0" > "$redefine_out" err="$?" checktest "$d" "$err" "keyword not redefined in builtin library" "$redefine_res" "$redefine_out" @@ -187,7 +204,7 @@ if [ "$d" = "bc" ]; then multiline_expr_out="$outputdir/bc_outputs/multiline_expr_results.txt" # tests/bc/misc1.txt happens to have a multiline comment in it. - "$exe" "$@" -f "$testdir/bc/misc1.txt" > "$multiline_expr_out" + printf 'halt\n' 2> /dev/null | "$exe" "$@" -f "$testdir/bc/misc1.txt" > "$multiline_expr_out" err="$?" checktest "$d" "$err" "multiline comment in expression file" "$testdir/bc/misc1_results.txt" \ @@ -196,7 +213,7 @@ if [ "$d" = "bc" ]; then printf 'pass\n' printf 'Running multiline comment expression file error test...' - "$exe" "$@" -f "$testdir/bc/errors/05.txt" 2> "$multiline_expr_out" + printf 'halt\n' 2> /dev/null | "$exe" "$@" -f "$testdir/bc/errors/05.txt" 2> "$multiline_expr_out" err="$?" checkerrtest "$d" "$err" "multiline comment in expression file error" \ @@ -206,7 +223,7 @@ if [ "$d" = "bc" ]; then printf 'Running multiline string expression file test...' # tests/bc/strings.txt happens to have a multiline string in it. - "$exe" "$@" -f "$testdir/bc/strings.txt" > "$multiline_expr_out" + printf 'halt\n' 2> /dev/null | "$exe" "$@" -f "$testdir/bc/strings.txt" > "$multiline_expr_out" err="$?" checktest "$d" "$err" "multiline string in expression file" "$testdir/bc/strings_results.txt" \ @@ -215,13 +232,13 @@ if [ "$d" = "bc" ]; then printf 'pass\n' printf 'Running multiline string expression file error test...' - "$exe" "$@" -f "$testdir/bc/errors/16.txt" 2> "$multiline_expr_out" + printf 'halt\n' 2> /dev/null | "$exe" "$@" -f "$testdir/bc/errors/16.txt" 2> "$multiline_expr_out" err="$?" checkerrtest "$d" "$err" "multiline string in expression file with backslash error" \ "$multiline_expr_out" "$d" - "$exe" "$@" -f "$testdir/bc/errors/04.txt" 2> "$multiline_expr_out" + printf 'halt\n' 2> /dev/null | "$exe" "$@" -f "$testdir/bc/errors/04.txt" 2> "$multiline_expr_out" err="$?" checkerrtest "$d" "$err" "multiline string in expression file error" \ @@ -234,7 +251,7 @@ else export DC_ENV_ARGS="'-x'" export DC_EXPR_EXIT="1" - printf '4s stuff\n' | "$exe" "$@" > /dev/null + printf '4s stuff\n' 2> /dev/null | "$exe" "$@" > /dev/null checktest_retcode "$d" "$?" "environment var" @@ -249,15 +266,15 @@ else # dc has an extra test for a case that someone found running this easter.dc # script. It went into an infinite loop, so we want to check that we did not # regress. - printf 'three\n' | cut -c1-3 > /dev/null + printf 'three\n' 2> /dev/null | cut -c1-3 > /dev/null err=$? if [ "$err" -eq 0 ]; then printf 'Running dc Easter script...' - easter_res="$outputdir/dc_outputs/easter.txt" - easter_out="$outputdir/dc_outputs/easter_results.txt" + easter_out="$outputdir/dc_outputs/easter.txt" + easter_res="$outputdir/dc_outputs/easter_results.txt" outdir=$(dirname "$easter_out") @@ -267,14 +284,44 @@ else printf '4 April 2021\n' > "$easter_res" - "$testdir/dc/scripts/easter.sh" "$exe" 2021 "$@" | cut -c1-12 > "$easter_out" + "$testdir/dc/scripts/easter.sh" "$exe" 2021 "$@" 2> /dev/null | cut -c1-12 > "$easter_out" err="$?" - checktest "$d" "$err" "Easter script" "$easter_res" "$easter_out" + checktest "$d" "$err" "Easter script" "$easter_out" "$easter_res" printf 'pass\n' fi + unset DC_ENV_ARGS + unset DC_EXPR_EXIT + + printf 'Running dc extended register command tests...' + + ext_reg_out="$outputdir/dc_outputs/ext_reg.txt" + ext_reg_res="$outputdir/dc_outputs/ext_reg_results.txt" + + outdir=$(dirname "$ext_reg_out") + + if [ ! -d "$outdir" ]; then + mkdir -p "$outdir" + fi + + printf '0\n' > "$ext_reg_res" + + printf '%s\n' "$halt" | "$exe" "$@" -e "gxpR" 2> /dev/null > "$ext_reg_out" + err="$?" + + checktest "$d" "$err" "Extended register command" "$ext_reg_out" "$ext_reg_res" + + printf '1\n' > "$ext_reg_res" + + printf '%s\n' "$halt" | "$exe" "$@" -x -e "gxpR" 2> /dev/null > "$ext_reg_out" + err="$?" + + checktest "$d" "$err" "Extended register command" "$ext_reg_out" "$ext_reg_res" + + printf 'pass\n' + fi out1="$outputdir/${d}_outputs/${d}_other.txt" @@ -285,26 +332,26 @@ printf 'Running %s line length tests...' "$d" printf '%s\n' "$numres" > "$out1" export "$line_var"=80 -printf '%s\n' "$num" | "$exe" "$@" > "$out2" +printf '%s\n' "$num" 2> /dev/null | "$exe" "$@" > "$out2" checktest "$d" "$?" "line length" "$out1" "$out2" printf '%s\n' "$num70" > "$out1" export "$line_var"=2147483647 -printf '%s\n' "$num" | "$exe" "$@" > "$out2" +printf '%s\n' "$num" 2> /dev/null | "$exe" "$@" > "$out2" checktest "$d" "$?" "line length 2" "$out1" "$out2" printf '%s\n' "$num2" > "$out1" export "$line_var"=62 -printf '%s\n' "$num" | "$exe" "$@" -L > "$out2" +printf '%s\n' "$num" 2> /dev/null | "$exe" "$@" -L > "$out2" checktest "$d" "$?" "line length 3" "$out1" "$out2" printf '0\n' > "$out1" -printf '%s\n' "$lltest" | "$exe" "$@" -L > "$out2" +printf '%s\n' "$lltest" 2> /dev/null | "$exe" "$@" -L > "$out2" checktest "$d" "$?" "line length 3" "$out1" "$out2" @@ -325,23 +372,23 @@ printf '%s\n%s\n%s\n%s\n' "$results" "$results" "$results" "$results" > "$out1" checktest "$d" "$?" "arg" "$out1" "$out2" -printf '%s\n' "$halt" | "$exe" "$@" -- "$f" "$f" "$f" "$f" > "$out2" +printf '%s\n' "$halt" 2> /dev/null | "$exe" "$@" -- "$f" "$f" "$f" "$f" > "$out2" checktest "$d" "$?" "arg" "$out1" "$out2" if [ "$d" = "bc" ]; then - printf '%s\n' "$halt" | "$exe" "$@" -i > /dev/null 2>&1 + printf '%s\n' "$halt" 2> /dev/null | "$exe" "$@" -i > /dev/null 2>&1 fi -printf '%s\n' "$halt" | "$exe" "$@" -h > /dev/null +printf '%s\n' "$halt" 2> /dev/null | "$exe" "$@" -h > /dev/null checktest_retcode "$d" "$?" "arg" -printf '%s\n' "$halt" | "$exe" "$@" -P > /dev/null +printf '%s\n' "$halt" 2> /dev/null | "$exe" "$@" -P > /dev/null checktest_retcode "$d" "$?" "arg" -printf '%s\n' "$halt" | "$exe" "$@" -R > /dev/null +printf '%s\n' "$halt" 2> /dev/null | "$exe" "$@" -R > /dev/null checktest_retcode "$d" "$?" "arg" -printf '%s\n' "$halt" | "$exe" "$@" -v > /dev/null +printf '%s\n' "$halt" 2> /dev/null | "$exe" "$@" -v > /dev/null checktest_retcode "$d" "$?" "arg" -printf '%s\n' "$halt" | "$exe" "$@" -V > /dev/null +printf '%s\n' "$halt" 2> /dev/null | "$exe" "$@" -V > /dev/null checktest_retcode "$d" "$?" "arg" out=$(printf '0.1\n-0.1\n1.1\n-1.1\n0.1\n-0.1\n') @@ -353,12 +400,12 @@ else data=$(printf '0.1pR\n_0.1pR\n1.1pR\n_1.1pR\n.1pR\n_.1pR\n') fi -printf '%s\n' "$data" | "$exe" "$@" -z > "$out2" +printf '%s\n' "$data" 2> /dev/null | "$exe" "$@" -z > "$out2" checktest "$d" "$?" "leading zero" "$out1" "$out2" if [ "$d" = "bc" ] && [ "$extra_math" -ne 0 ]; then - printf '%s\n' "$halt" | "$exe" "$@" -lz "$testdir/bc/leadingzero.txt" > "$out2" + printf '%s\n' "$halt" 2> /dev/null | "$exe" "$@" -lz "$testdir/bc/leadingzero.txt" > "$out2" checktest "$d" "$?" "leading zero script" "$testdir/bc/leadingzero_results.txt" "$out2" @@ -416,6 +463,91 @@ checkerrtest "$d" "$err" "colon long option" "$out2" "$d" printf 'pass\n' +printf 'Running %s builtin variable arg tests...' "$d" + +if [ "$extra_math" -ne 0 ]; then + + out=$(printf '14\n15\n16\n17.25\n') + printf '%s\n' "$out" > "$out1" + + if [ "$d" = "bc" ]; then + data=$(printf 's=scale;i=ibase;o=obase;t=seed@2;ibase=A;obase=A;s;i;o;t;') + else + data=$(printf 'J2@OIKAiAopRpRpRpR') + fi + + printf '%s\n' "$data" 2> /dev/null | "$exe" "$@" -S14 -I15 -O16 -E17.25 > "$out2" + checktest "$d" "$?" "builtin variable args" "$out1" "$out2" + + printf '%s\n' "$data" 2> /dev/null | "$exe" "$@" --scale=14 --ibase=15 --obase=16 --seed=17.25 > "$out2" + checktest "$d" "$?" "builtin variable long args" "$out1" "$out2" + +else + + out=$(printf '14\n15\n16\n') + printf '%s\n' "$out" > "$out1" + + if [ "$d" = "bc" ]; then + data=$(printf 's=scale;i=ibase;o=obase;ibase=A;obase=A;s;i;o;') + else + data=$(printf 'OIKAiAopRpRpR') + fi + + printf '%s\n' "$data" 2> /dev/null | "$exe" "$@" -S14 -I15 -O16 > "$out2" + checktest "$d" "$?" "builtin variable args" "$out1" "$out2" + + printf '%s\n' "$data" 2> /dev/null | "$exe" "$@" --scale=14 --ibase=15 --obase=16 > "$out2" + checktest "$d" "$?" "builtin variable long args" "$out1" "$out2" + +fi + +if [ "$d" = "bc" ]; then + + out=$(printf '100\n') + printf '%s\n' "$out" > "$out1" + + printf 'scale\n' 2> /dev/null | "$exe" "$@" -S100 -l > "$out2" + checktest "$d" "$?" "builtin variable args with math lib" "$out1" "$out2" + + printf 'scale\n' 2> /dev/null | "$exe" "$@" --scale=100 --mathlib > "$out2" + checktest "$d" "$?" "builtin variable long args with math lib" "$out1" "$out2" + + export BC_ENV_ARGS="-l" + + printf 'scale\n' 2> /dev/null | "$exe" "$@" -S100 > "$out2" + checktest "$d" "$?" "builtin variable args with math lib env arg" "$out1" "$out2" + + printf 'scale\n' 2> /dev/null | "$exe" "$@" --scale=100 > "$out2" + checktest "$d" "$?" "builtin variable long args with math lib env arg" "$out1" "$out2" + + export BC_ENV_ARGS="-S100" + + printf 'scale\n' 2> /dev/null | "$exe" "$@" -l > "$out2" + checktest "$d" "$?" "builtin variable args with math lib arg" "$out1" "$out2" + + export BC_ENV_ARGS="--scale=100" + + printf 'scale\n' 2> /dev/null | "$exe" "$@" -l > "$out2" + checktest "$d" "$?" "builtin variable long args with math lib arg" "$out1" "$out2" + +fi + +printf 'scale\n' 2> /dev/null | "$exe" "$@" --scale=18923c.rlg > /dev/null 2> "$out2" +err="$?" + +checkerrtest "$d" "$err" "invalid command-line arg for builtin variable" "$out2" "$d" + +if [ "$extra_math" -ne 0 ]; then + + printf 'seed\n' 2> /dev/null | "$exe" "$@" --seed=18923c.rlg > /dev/null 2> "$out2" + err="$?" + + checkerrtest "$d" "$err" "invalid command-line arg for seed" "$out2" "$d" + +fi + +printf 'pass\n' + printf 'Running %s directory test...' "$d" "$exe" "$@" "$testdir" > /dev/null 2> "$out2" @@ -438,7 +570,7 @@ printf 'pass\n' printf 'Running %s binary stdin test...' "$d" -cat "$bin" | "$exe" "$@" > /dev/null 2> "$out2" +cat "$bin" 2> /dev/null | "$exe" "$@" > /dev/null 2> "$out2" err="$?" checkerrtest "$d" "$err" "binary stdin" "$out2" "$d" @@ -448,7 +580,7 @@ printf 'pass\n' if [ "$d" = "bc" ]; then printf 'Running %s limits tests...' "$d" - printf 'limits\n' | "$exe" "$@" > "$out2" /dev/null 2>&1 + printf 'limits\n' 2> /dev/null | "$exe" "$@" /dev/null > "$out2" 2>&1 checktest_retcode "$d" "$?" "limits" diff --git a/contrib/bc/tests/read.sh b/contrib/bc/tests/read.sh index a1915eb271ac..fd4b9b6721a5 100755 --- a/contrib/bc/tests/read.sh +++ b/contrib/bc/tests/read.sh @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: BSD-2-Clause # -# Copyright (c) 2018-2021 Gavin D. Howard and contributors. +# Copyright (c) 2018-2024 Gavin D. Howard and contributors. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: @@ -36,24 +36,37 @@ testdir=$(dirname "$script") outputdir=${BC_TEST_OUTPUT_DIR:-$testdir} -# Command-line processing. -if [ "$#" -lt 1 ]; then - printf 'usage: %s dir [exe [args...]]\n' "$0" +# Just print the usage and exit with an error. This can receive a message to +# print. +# @param 1 A message to print. +usage() { + if [ $# -eq 1 ]; then + printf '%s\n\n' "$1" + fi + printf 'usage: %s dir [exe [args...]]\n' "$script" printf 'valid dirs are:\n' printf '\n' cat "$testdir/all.txt" printf '\n' exit 1 +} + +# Command-line processing. +if [ "$#" -lt 1 ]; then + usage "Not enough arguments" fi d="$1" shift +check_d_arg "$d" if [ "$#" -gt 0 ]; then exe="$1" shift + check_exec_arg "$exe" else exe="$testdir/../bin/$d" + check_exec_arg "$exe" fi name="$testdir/$d/read.txt" @@ -61,6 +74,7 @@ results="$testdir/$d/read_results.txt" errors="$testdir/$d/read_errors.txt" out="$outputdir/${d}_outputs/read_results.txt" +multiple_res="$outputdir/${d}_outputs/read_multiple_results.txt" outdir=$(dirname "$out") # Make sure the directory exists. @@ -76,11 +90,13 @@ if [ "$d" = "bc" ]; then halt="halt" read_call="read()" read_expr="${read_call}\n5+5;" + read_multiple=$(printf '%s\n%s\n%s\n' "3" "2" "1") else options="-x" halt="q" read_call="?" read_expr="${read_call}" + read_multiple=$(printf '%spR\n%spR\n%spR\n' "3" "2" "1") fi # I use these, so unset them to make the tests work. @@ -103,6 +119,16 @@ done < "$name" printf 'pass\n' +printf 'Running %s read multiple...' "$d" + +printf '3\n2\n1\n' > "$multiple_res" + +# Run multiple read() calls. +printf '%s\n' "$read_multiple" | "$exe" "$@" "$options" -e "$read_call" -e "$read_call" -e "$read_call" > "$out" +checktest "$d" "$?" 'read multiple' "$multiple_res" "$out" + +printf 'pass\n' + printf 'Running %s read errors...' "$d" # Run read on every line. diff --git a/contrib/bc/tests/script.sh b/contrib/bc/tests/script.sh index 5942e13159fe..b1346ef09904 100755 --- a/contrib/bc/tests/script.sh +++ b/contrib/bc/tests/script.sh @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: BSD-2-Clause # -# Copyright (c) 2018-2021 Gavin D. Howard and contributors. +# Copyright (c) 2018-2024 Gavin D. Howard and contributors. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: @@ -37,49 +37,72 @@ testdir=$(dirname "${script}") outputdir=${BC_TEST_OUTPUT_DIR:-$testdir} -# Command-line processing. -if [ "$#" -lt 2 ]; then +# Just print the usage and exit with an error. This can receive a message to +# print. +# @param 1 A message to print. +usage() { + if [ $# -eq 1 ]; then + printf '%s\n\n' "$1" + fi printf 'usage: %s dir script [run_extra_tests] [run_stack_tests] [generate_tests] [time_tests] [exec args...]\n' "$script" exit 1 +} + +# Command-line processing. +if [ "$#" -lt 2 ]; then + usage "Not enough arguments; expect 2 arguments" fi d="$1" shift +check_d_arg "$d" + +scriptdir="$testdir/$d/scripts" f="$1" shift +check_file_arg "$scriptdir/$f" if [ "$#" -gt 0 ]; then run_extra_tests="$1" shift + check_bool_arg "$run_extra_tests" else run_extra_tests=1 + check_bool_arg "$run_extra_tests" fi if [ "$#" -gt 0 ]; then run_stack_tests="$1" shift + check_bool_arg "$run_stack_tests" else run_stack_tests=1 + check_bool_arg "$run_stack_tests" fi if [ "$#" -gt 0 ]; then generate="$1" shift + check_bool_arg "$generate" else generate=1 + check_bool_arg "$generate" fi if [ "$#" -gt 0 ]; then time_tests="$1" shift + check_bool_arg "$time_tests" else time_tests=0 + check_bool_arg "$generate" fi if [ "$#" -gt 0 ]; then exe="$1" shift + check_exec_arg "$exe" else exe="$testdir/../bin/$d" fi @@ -88,20 +111,18 @@ fi if [ "$d" = "bc" ]; then if [ "$run_stack_tests" -ne 0 ]; then - options="-lgq" + options="-lgqC" else - options="-lq" + options="-lqC" fi halt="halt" else - options="-x" + options="-xC" halt="q" fi -scriptdir="$testdir/$d/scripts" - name="${f%.*}" # We specifically want to skip this because it is handled specially. @@ -111,7 +132,7 @@ fi # Skip the tests that require extra math if we don't have it. if [ "$run_extra_tests" -eq 0 ]; then - if [ "$f" = "rand.bc" ]; then + if [ "$f" = "rand.bc" ] || [ "$f" = "root.bc" ] || [ "$f" = "i2rand.bc" ]; then printf 'Skipping %s script: %s\n' "$d" "$f" exit 0 fi @@ -159,7 +180,7 @@ else # This is to check that the command exists. If not, we should not try to # generate the test. Instead, we should just skip. - command -v "$d" + command -v "$d" 1>/dev/null 2>&1 err="$?" set -e @@ -169,11 +190,17 @@ else exit 0 fi - # This sed, and the script, are to remove an incompatibility with GNU bc, - # where GNU bc is wrong. See the development manual - # (manuals/development.md#script-tests) for more information. printf 'Generating %s results...' "$f" - printf '%s\n' "$halt" | "$d" "$s" | sed -n -f "$testdir/script.sed" > "$results" + + # This particular test needs to be generated straight. + if [ "$d" = "dc" ] && [ "$f" = "stream.dc" ]; then + printf '%s\n' "$halt" 2> /dev/null | "$d" "$s" > "$results" + else + # This sed, and the script, are to remove an incompatibility with GNU + # bc, where GNU bc is wrong. See the development manual + # (manuals/development.md#script-tests) for more information. + printf '%s\n' "$halt" 2> /dev/null | "$d" "$s" | sed -n -f "$testdir/script.sed" > "$results" + fi printf 'done\n' res="$results" fi @@ -185,11 +212,11 @@ printf 'Running %s script %s...' "$d" "$f" # Yes this is poor timing, but it works. if [ "$time_tests" -ne 0 ]; then printf '\n' - printf '%s\n' "$halt" | /usr/bin/time -p "$exe" "$@" $options "$s" > "$out" + printf '%s\n' "$halt" 2> /dev/null | /usr/bin/time -p "$exe" "$@" $options "$s" > "$out" err="$?" printf '\n' else - printf '%s\n' "$halt" | "$exe" "$@" $options "$s" > "$out" + printf '%s\n' "$halt" 2> /dev/null | "$exe" "$@" $options "$s" > "$out" err="$?" fi diff --git a/contrib/bc/tests/scripts.sh b/contrib/bc/tests/scripts.sh index 46aa7e761170..2c8af6c06df0 100755 --- a/contrib/bc/tests/scripts.sh +++ b/contrib/bc/tests/scripts.sh @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: BSD-2-Clause # -# Copyright (c) 2018-2021 Gavin D. Howard and contributors. +# Copyright (c) 2018-2024 Gavin D. Howard and contributors. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: @@ -31,6 +31,19 @@ script="$0" testdir=$(dirname "${script}") +. "$testdir/../scripts/functions.sh" + +# Just print the usage and exit with an error. This can receive a message to +# print. +# @param 1 A message to print. +usage() { + if [ $# -eq 1 ]; then + printf '%s\n\n' "$1" + fi + printf 'usage: %s [-n] dir [run_extra_tests] [run_stack_tests] [generate_tests] [time_tests] [exec args...]\n' "$script" + exit 1 +} + pids="" # We need to figure out if we should run stuff in parallel. @@ -39,54 +52,65 @@ pll=1 while getopts "n" opt; do case "$opt" in - n) pll=0 ; shift ; set -e ;; + n) pll=0 ; set -e ;; ?) usage "Invalid option: $opt" ;; esac done +shift $(($OPTIND - 1)) # Command-line processing. if [ "$#" -eq 0 ]; then - printf 'usage: %s [-n] dir [run_extra_tests] [run_stack_tests] [generate_tests] [time_tests] [exec args...]\n' "$script" - exit 1 + usage "Need at least 1 argument" else d="$1" shift + check_d_arg "$d" fi if [ "$#" -gt 0 ]; then run_extra_tests="$1" shift + check_bool_arg "$run_extra_tests" else run_extra_tests=1 + check_bool_arg "$run_extra_tests" fi if [ "$#" -gt 0 ]; then run_stack_tests="$1" shift + check_bool_arg "$run_stack_tests" else run_stack_tests=1 + check_bool_arg "$run_stack_tests" fi if [ "$#" -gt 0 ]; then generate="$1" shift + check_bool_arg "$generate" else generate=1 + check_bool_arg "$generate" fi if [ "$#" -gt 0 ]; then time_tests="$1" shift + check_bool_arg "$time_tests" else time_tests=0 + check_bool_arg "$time_tests" fi if [ "$#" -gt 0 ]; then exe="$1" shift + check_exec_arg "$exe" else exe="$testdir/../bin/$d" + check_exec_arg "$exe" fi scriptdir="$testdir/$d/scripts" diff --git a/contrib/bc/tests/stdin.sh b/contrib/bc/tests/stdin.sh index 69e6f2cabf34..7061e950367e 100755 --- a/contrib/bc/tests/stdin.sh +++ b/contrib/bc/tests/stdin.sh @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: BSD-2-Clause # -# Copyright (c) 2018-2021 Gavin D. Howard and contributors. +# Copyright (c) 2018-2024 Gavin D. Howard and contributors. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: @@ -37,24 +37,37 @@ testdir=$(dirname "$script") outputdir=${BC_TEST_OUTPUT_DIR:-$testdir} -# Command-line processing. -if [ "$#" -lt 1 ]; then +# Just print the usage and exit with an error. This can receive a message to +# print. +# @param 1 A message to print. +usage() { + if [ $# -eq 1 ]; then + printf '%s\n\n' "$1" + fi printf 'usage: %s dir [exe [args...]]\n' "$0" printf 'valid dirs are:\n' printf '\n' cat "$testdir/all.txt" printf '\n' exit 1 +} + +# Command-line processing. +if [ "$#" -lt 1 ]; then + usage "Not enough arguments" fi d="$1" shift +check_d_arg "$d" if [ "$#" -gt 0 ]; then exe="$1" shift + check_exec_arg "$exe" else exe="$testdir/../bin/$d" + check_exec_arg "$exe" fi out="$outputdir/${d}_outputs/stdin_results.txt" diff --git a/contrib/bc/tests/test.sh b/contrib/bc/tests/test.sh index 9d557a715dc0..7b5916f02990 100755 --- a/contrib/bc/tests/test.sh +++ b/contrib/bc/tests/test.sh @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: BSD-2-Clause # -# Copyright (c) 2018-2021 Gavin D. Howard and contributors. +# Copyright (c) 2018-2024 Gavin D. Howard and contributors. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: @@ -37,19 +37,32 @@ testdir=$(dirname "$script") outputdir=${BC_TEST_OUTPUT_DIR:-$testdir} -# Command-line processing. -if [ "$#" -lt 2 ]; then +# Just print the usage and exit with an error. This can receive a message to +# print. +# @param 1 A message to print. +usage() { + if [ $# -eq 1 ]; then + printf '%s\n\n' "$1" + fi printf 'usage: %s dir test [generate_tests] [time_tests] [exe [args...]]\n' "$0" printf 'valid dirs are:\n' printf '\n' cat "$testdir/all.txt" printf '\n' exit 1 +} + +# Command-line processing. +if [ "$#" -lt 2 ]; then + usage "Need at least 2 arguments" fi d="$1" shift +check_d_arg "$d" +# We don't use check_file_arg on the test or the result because they might be +# generated. t="$1" name="$testdir/$d/$t.txt" results="$testdir/$d/${t}_results.txt" @@ -58,22 +71,28 @@ shift if [ "$#" -gt 0 ]; then generate_tests="$1" shift + check_bool_arg "$generate_tests" else generate_tests=1 + check_bool_arg "$generate_tests" fi if [ "$#" -gt 0 ]; then time_tests="$1" shift + check_bool_arg "$time_tests" else time_tests=0 + check_bool_arg "$time_tests" fi if [ "$#" -gt 0 ]; then exe="$1" shift + check_exec_arg "$exe" else exe="$testdir/../bin/$d" + check_exec_arg "$exe" fi out="$outputdir/${d}_outputs/${t}_results.txt" @@ -119,13 +138,15 @@ fi # If the results do not exist, generate.. if [ ! -f "$results" ]; then printf 'Generating %s %s results...' "$d" "$t" - printf '%s\n' "$halt" | "$d" $options "$name" > "$results" + printf '%s\n' "$halt" 2> /dev/null | "$d" $options "$name" > "$results" printf 'done\n' fi -# We set this here because GNU dc does not have it. -if [ "$d" = "dc" ]; then - options="-x" +# We set this here because GNU bc and dc does not have these options. +if [ "$d" = "bc" ]; then + options="-lqc" +else + options="-xc" fi export $var=string @@ -136,11 +157,11 @@ printf 'Running %s %s...' "$d" "$t" if [ "$time_tests" -ne 0 ]; then printf '\n' - printf '%s\n' "$halt" | /usr/bin/time -p "$exe" "$@" $options "$name" > "$out" + printf '%s\n' "$halt" 2> /dev/null | /usr/bin/time -p "$exe" "$@" $options "$name" > "$out" err="$?" printf '\n' else - printf '%s\n' "$halt" | "$exe" "$@" $options "$name" > "$out" + printf '%s\n' "$halt" 2> /dev/null | "$exe" "$@" $options "$name" > "$out" err="$?" fi |