From 3c5dd6de57cae59a88ddcef5b4091ffb223171ba Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Fri, 6 May 2022 00:17:26 +0000 Subject: [PATCH] fixed a syntax error in var-01.hcl --- t/run.sh | 2 +- t/var-01.hcl | 19 ++++++++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/t/run.sh b/t/run.sh index c3e105d..5e6ad3b 100644 --- a/t/run.sh +++ b/t/run.sh @@ -1,3 +1,3 @@ #!/bin/sh -$@ | grep -E ^ERROR: && exit 1 +$@ 2>&1 | grep -Eq ^ERROR: && exit 1 exit 0 diff --git a/t/var-01.hcl b/t/var-01.hcl index a9eef84..71a3044 100644 --- a/t/var-01.hcl +++ b/t/var-01.hcl @@ -74,14 +74,16 @@ ) (defun x() - (do - | x | - (set x 1) - (while (< x j) - (defun Q() x) - (set x (+ x 1)) + (set R + (do + | x | + (set x 1) + (while (< x j) + (defun Q() x) + (set x (+ x 1)) + ) ) - } + ) ) ) @@ -90,3 +92,6 @@ (set t (Q)) (if (/= t 99) (print "ERROR: t is not 99\n") else (printf "OK: %d\n" t)) + +(if (nqv? R false) (print "ERROR: R is not false\n") + else (printf "OK: %O\n" R))