update test.sh to new cli features

This commit is contained in:
Michael Sippel 2025-05-10 16:25:36 +02:00
parent 783c70b2e2
commit efa584dfb5
Signed by: senvas
GPG key ID: F96CF119C34B64A6

View file

@ -8,13 +8,12 @@ run_test_case() {
-----------------------------------------------------------------------------
Running test case ${TEST_NAME}"
ldmc "${SRC_TYPE}" "${DST_TYPE}" ../morphisms/*.morphism-base 2>|.tmp/ldmc_err 1>| target/src/${TEST_NAME}.c \
ldmc -m "main : ${SRC_TYPE} --> ${DST_TYPE}" -o target/src/${TEST_NAME}.c 2>|.tmp/ldmc_err \
|| (echo "... error at generation:"; cat .tmp/ldmc_err; return -1);
gcc -I../morphisms/runtime/include target/src/${TEST_NAME}.c -o target/${TEST_NAME} \
|| (echo "... error at compilation:"; return -2);
LEN="$(echo -n "${EXPECT}" | wc -c)"
RESULT="$(echo -n ${INPUT} | ./target/${TEST_NAME} 2>.tmp/target_err | head -c ${LEN})"