experimenting with a new line as a terminator like a semicolon. this breaks some test cases as of now
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@ -30,8 +30,8 @@ TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(check_ERRORS)
|
||||
|
||||
TEST_EXTENSIONS = .hcl .err
|
||||
|
||||
HCL_LOG_COMPILER = sh $(abs_srcdir)/run.sh ../bin/hcl --modlibdirs="@abs_top_builddir@/mod:@abs_top_builddir@/mod/.libs" --heapsize=0 -x
|
||||
HCL_LOG_COMPILER = sh $(abs_srcdir)/run.sh ../bin/hcl --modlibdirs="@abs_top_builddir@/mod:@abs_top_builddir@/mod/.libs" --heapsize=0 -b -n
|
||||
AM_HCL_LOG_FLAGS =
|
||||
|
||||
ERR_LOG_COMPILER = sh $(abs_srcdir)/err.sh ../bin/hcl --modlibdirs="@abs_top_builddir@/mod:@abs_top_builddir@/mod/.libs" --heapsize=0 -x
|
||||
ERR_LOG_COMPILER = sh $(abs_srcdir)/err.sh ../bin/hcl --modlibdirs="@abs_top_builddir@/mod:@abs_top_builddir@/mod/.libs" --heapsize=0 -b -n
|
||||
AM_ERR_LOG_FLAGS =
|
||||
|
@ -494,9 +494,9 @@ check_ERRORS = \
|
||||
|
||||
EXTRA_DIST = $(check_SCRIPTS) $(check_ERRORS)
|
||||
TEST_EXTENSIONS = .hcl .err
|
||||
HCL_LOG_COMPILER = sh $(abs_srcdir)/run.sh ../bin/hcl --modlibdirs="@abs_top_builddir@/mod:@abs_top_builddir@/mod/.libs" --heapsize=0 -x
|
||||
HCL_LOG_COMPILER = sh $(abs_srcdir)/run.sh ../bin/hcl --modlibdirs="@abs_top_builddir@/mod:@abs_top_builddir@/mod/.libs" --heapsize=0 -b -n
|
||||
AM_HCL_LOG_FLAGS =
|
||||
ERR_LOG_COMPILER = sh $(abs_srcdir)/err.sh ../bin/hcl --modlibdirs="@abs_top_builddir@/mod:@abs_top_builddir@/mod/.libs" --heapsize=0 -x
|
||||
ERR_LOG_COMPILER = sh $(abs_srcdir)/err.sh ../bin/hcl --modlibdirs="@abs_top_builddir@/mod:@abs_top_builddir@/mod/.libs" --heapsize=0 -b -n
|
||||
AM_ERR_LOG_FLAGS =
|
||||
all: all-am
|
||||
|
||||
|
25
t/fun-01.hcl
25
t/fun-01.hcl
@ -6,8 +6,11 @@ defun aaa(a b) {
|
||||
|
||||
set k (aaa 10 20);
|
||||
|
||||
if (= k 30) { printf "OK - %d\n" k; }
|
||||
else { printf "ERROR - %d\n" k; };
|
||||
if (= k 30) {
|
||||
printf "OK - %d\n" k;
|
||||
} else {
|
||||
printf "ERROR - %d\n" k;
|
||||
};
|
||||
|
||||
## --------------------------------------
|
||||
|
||||
@ -19,15 +22,16 @@ defun mkfun(t) {
|
||||
|
||||
set f (mkfun 20);
|
||||
set k (f 50);
|
||||
if (= k 70) { printf "OK - %d\n" k; }
|
||||
else { printf "ERROR - %d\n" k; };
|
||||
if (= k 70) {
|
||||
printf "OK - %d\n" k;
|
||||
} else {
|
||||
printf "ERROR - %d\n" k;
|
||||
};
|
||||
|
||||
|
||||
## --------------------------------------
|
||||
|
||||
defclass A
|
||||
| a b c |
|
||||
{
|
||||
defclass A | a b c | {
|
||||
defun ::* newInstance(x y z) {
|
||||
(set a x)
|
||||
(set b y)
|
||||
@ -42,5 +46,8 @@ defclass A
|
||||
|
||||
set k (A:newInstance 11 22 33);
|
||||
set v (k:get-a);
|
||||
if (= v 11) { printf "OK - %d\n" v; }
|
||||
else { printf "ERROR - %d\n" v; };
|
||||
if (= v 11) {
|
||||
printf "OK - %d\n" v;
|
||||
} else {
|
||||
printf "ERROR - %d\n" v;
|
||||
};
|
||||
|
37
t/va-01.hcl
37
t/va-01.hcl
@ -25,17 +25,30 @@ defun x(a b ... ::: x y z) {
|
||||
};
|
||||
|
||||
set t (x 10 20 30);
|
||||
if (/= t 1) { printf "ERROR: t is not 1\n" }
|
||||
else { printf "OK: %d\n" t };
|
||||
if (/= t 1) {
|
||||
printf "ERROR: t is not 1\n"
|
||||
} else {
|
||||
printf "OK: %d\n" t
|
||||
};
|
||||
|
||||
set t (set-r a b c (x 10 20 30 40 50));
|
||||
if (/= t 3) { printf "ERROR: t is not 3\n" }
|
||||
else { printf "OK: %d\n" t };
|
||||
if (/= a 3) { printf "ERROR: a is not 3\n" }
|
||||
else { printf "OK: %d\n" a };
|
||||
if (/= b 200) { printf "ERROR: b is not 200\n" }
|
||||
else { printf "OK: %d\n" b };
|
||||
if (/= c 30) { printf "ERROR: c is not 30\n" }
|
||||
else { printf "OK: %d\n" c };
|
||||
|
||||
|
||||
if (/= t 3) {
|
||||
printf "ERROR: t is not 3\n"
|
||||
} else {
|
||||
printf "OK: %d\n" t
|
||||
};
|
||||
if (/= a 3) {
|
||||
printf "ERROR: a is not 3\n"
|
||||
} else {
|
||||
printf "OK: %d\n" a
|
||||
};
|
||||
if (/= b 200) {
|
||||
printf "ERROR: b is not 200\n"
|
||||
} else {
|
||||
printf "OK: %d\n" b
|
||||
};
|
||||
if (/= c 30) {
|
||||
printf "ERROR: c is not 30\n"
|
||||
} else {
|
||||
printf "OK: %d\n" c
|
||||
};
|
||||
|
Reference in New Issue
Block a user