mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-16 06:18:47 +02:00
Add test for --max-expr-complexity
This commit is contained in:
@@ -795,6 +795,24 @@ done
|
||||
|
||||
../src/remind --flush -q ../tests/safety.rem 2025-08-13 >> ../tests/test.out 2>&1
|
||||
|
||||
# Test --max-expr-complexity
|
||||
../src/remind --flush -q --max-expr-complexity=1000000 - 2025-01-01 <<'EOF' >> ../tests/test.out 2>&1
|
||||
BANNER %
|
||||
SET $AddBlankLines 0
|
||||
FSET fib(n) iif(n < 3, 1, fib(n-1) + fib(n-2))
|
||||
|
||||
REM MSG fib(10) = [fib(10)]
|
||||
REM MSG fib(15) = [fib(15)]
|
||||
REM MSG fib(20) = [fib(20)]
|
||||
REM MSG fib(21) = [fib(21)]
|
||||
REM MSG fib(22) = [fib(22)]
|
||||
REM MSG fib(23) = [fib(23)]
|
||||
REM MSG fib(24) = [fib(24)]
|
||||
REM MSG fib(25) = [fib(25)]
|
||||
REM MSG fib(30) = [fib(30)]
|
||||
|
||||
EOF
|
||||
|
||||
cmp -s ../tests/test.out ../tests/test.cmp
|
||||
if [ "$?" = "0" ]; then
|
||||
echo "Remind: Acceptance test PASSED"
|
||||
|
||||
@@ -39824,3 +39824,16 @@ nooooo....
|
||||
../tests/safety.rem(37): [#0] In function `subst_b'
|
||||
today
|
||||
nooooo....
|
||||
fib(10) = 55
|
||||
fib(15) = 610
|
||||
fib(20) = 6765
|
||||
fib(21) = 10946
|
||||
fib(22) = 17711
|
||||
fib(23) = 28657
|
||||
fib(24) = 46368
|
||||
-stdin-(12): `-': Maximum expression complexity exceeded
|
||||
-stdin-(3): [#0] In function `fib'
|
||||
[remaining call frames omitted]
|
||||
-stdin-(13): `-': Maximum expression complexity exceeded
|
||||
-stdin-(3): [#0] In function `fib'
|
||||
[remaining call frames omitted]
|
||||
|
||||
Reference in New Issue
Block a user