diff options
-rwxr-xr-x | cmake/basictest | 43 | ||||
-rw-r--r-- | test/CMakeLists.txt | 11 |
2 files changed, 47 insertions, 7 deletions
diff --git a/cmake/basictest b/cmake/basictest index f7fc8653..e77328a8 100755 --- a/cmake/basictest +++ b/cmake/basictest @@ -64,6 +64,11 @@ function poundbang() { ${COMPARE} ${SRCDIR}/poundbang.awk _`basename ${TESTCASE}` && rm -f _`basename ${TESTCASE}` _pbd.awk } +function localenl() { + ${SRCDIR}/${TESTCASE}.sh >_${TESTCASE} 2>/dev/null + ${COMPARE} ${SRCDIR}/${TESTCASE}.ok _${TESTCASE} && rm -f _${TESTCASE} +} + function mbprintf1() { GAWKLOCALE=en_US.UTF-8 ; export GAWKLOCALE $GAWKEXE -f ${SRCDIR}/${TESTCASE}.awk ${SRCDIR}/${TESTCASE}.in >_${TESTCASE} 2>&1 || echo EXIT CODE: $? >> _${TESTCASE} @@ -173,6 +178,24 @@ function fts() { ${COMPARE} ${SRCDIR}/${TESTCASE}.ok ${SRCDIR}/_${TESTCASE} && rm -f ${SRCDIR}/_${TESTCASE} ${SRCDIR}/${TESTCASE}.ok } +function fflush() { + ${SRCDIR}/fflush.sh >_${TESTCASE} + ${COMPARE} ${SRCDIR}/${TESTCASE}.ok _${TESTCASE} && rm -f _${TESTCASE} +} + +function pid() { + AWKPATH=${SRCDIR} AWK=$GAWKEXE ${SHELL} ${SRCDIR}/pid.sh $$ > _`basename ${TESTCASE}` ; : + ${COMPARE} ${SRCDIR}/pid.ok _`basename ${TESTCASE}` && rm -f _`basename ${TESTCASE}` +} + +function strftlng() { + TZ=UTC; export TZ; $GAWKEXE -f ${SRCDIR}/strftlng.awk >_${TESTCASE} + if ${COMPARE} ${SRCDIR}/strftlng.ok _${TESTCASE} >/dev/null 2>&1 ; then : ; else \ + TZ=UTC0; export TZ; $GAWKEXE -f ${SRCDIR}/strftlng.awk >_${TESTCASE} ; \ + fi + ${COMPARE} ${SRCDIR}/${TESTCASE}.ok _${TESTCASE} && rm -f _${TESTCASE} +} + function fmtspcl() { $GAWKEXE -v "sd=${SRCDIR}" 'BEGIN {pnan = sprintf("%g",sqrt(-1)); nnan = sprintf("%g",-sqrt(-1)); pinf = sprintf("%g",-log(0)); ninf = sprintf("%g",log(0))} {sub(/positive_nan/,pnan); sub(/negative_nan/,nnan); sub(/positive_infinity/,pinf); sub(/negative_infinity/,ninf); sub(/fmtspcl/,(sd"/fmtspcl")); print}' < ${SRCDIR}/fmtspcl.tok > ${TESTCASE}.ok 2>/dev/null $GAWKEXE $AWKFLAGS -f ${SRCDIR}/fmtspcl.awk --lint >_${TESTCASE} 2>&1 || echo EXIT CODE: $? >>_${TESTCASE} @@ -183,6 +206,11 @@ function fmtspcl() { fi } +function pipeio2() { + $GAWKEXE -v SRCDIR=${SRCDIR} -f ${SRCDIR}/pipeio2.awk >_${TESTCASE} + ${COMPARE} ${SRCDIR}/${TESTCASE}.ok _${TESTCASE} && rm -f _${TESTCASE} +} + function inetechu() { echo This test is for establishing UDP connections $GAWKEXE 'BEGIN {print "" |& "/inet/udp/0/127.0.0.1/9"}' @@ -205,6 +233,11 @@ function inetdayt() { "/inet/tcp/0/127.0.0.1/13" |& getline; print $0}' } +function space() { + $GAWKEXE -f ' ' ${SRCDIR}/space.awk >_${TESTCASE} 2>&1 || echo EXIT CODE: $? >>_${TESTCASE} + ${COMPARE} ${SRCDIR}/${TESTCASE}.ok _${TESTCASE} && rm -f _${TESTCASE} +} + function mpfrexprange() { $GAWKEXE -M -vPREC=53 -f ${SRCDIR}/${TESTCASE}.awk > _${TESTCASE} 2>&1 ${COMPARE} ${SRCDIR}/${TESTCASE}.ok _${TESTCASE} && rm -f _${TESTCASE} @@ -230,6 +263,16 @@ function jarebug() { ${COMPARE} ${SRCDIR}/${TESTCASE}.ok _${TESTCASE} && rm -f _${TESTCASE} } +function rtlen() { + ${SRCDIR}/${TESTCASE}.sh >_${TESTCASE} || echo EXIT CODE: $? >>_${TESTCASE} + ${COMPARE} ${SRCDIR}/${TESTCASE}.ok _${TESTCASE} && rm -f _${TESTCASE} +} + +function rtlen01() { + ${SRCDIR}/${TESTCASE}.sh >_${TESTCASE} || echo EXIT CODE: $? >>_${TESTCASE} + ${COMPARE} ${SRCDIR}/${TESTCASE}.ok _${TESTCASE} && rm -f _${TESTCASE} +} + function rtlenmb() { GAWKLOCALE=en_US.UTF-8 ; export GAWKLOCALE ${SRCDIR}/rtlen.sh >_${TESTCASE} || echo EXIT CODE: $? >>_${TESTCASE} diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 218c6590..4d5cf86c 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -66,27 +66,24 @@ foreach(testgroup ${ALL_GROUPS} ) ${testcase} STREQUAL devfd OR ${testcase} STREQUAL devfd1 OR ${testcase} STREQUAL devfd2 OR ${testcase} STREQUAL dumpvars OR ${testcase} STREQUAL exit OR ${testcase} STREQUAL exitval1 OR - ${testcase} STREQUAL fflush OR ${testcase} STREQUAL fmtspcl OR + ${testcase} STREQUAL fmtspcl OR ${testcase} STREQUAL fsspcoln OR ${testcase} STREQUAL gsubtst3 OR ${testcase} STREQUAL incdupe OR ${testcase} STREQUAL incdupe2 OR ${testcase} STREQUAL incdupe3 OR ${testcase} STREQUAL incdupe4 OR ${testcase} STREQUAL incdupe5 OR ${testcase} STREQUAL incdupe6 OR ${testcase} STREQUAL incdupe7 OR ${testcase} STREQUAL include2 OR - ${testcase} STREQUAL leaddig OR ${testcase} STREQUAL localenl OR + ${testcase} STREQUAL leaddig OR ${testcase} STREQUAL messages OR ${testcase} STREQUAL mmap8k OR ${testcase} STREQUAL next OR ${testcase} STREQUAL nofile OR ${testcase} STREQUAL nondec2 OR ${testcase} STREQUAL nors OR - ${testcase} STREQUAL pid OR - ${testcase} STREQUAL pipeio2 OR ${testcase} STREQUAL posix2008sub OR + ${testcase} STREQUAL posix2008sub OR ${testcase} STREQUAL printf0 OR ${testcase} STREQUAL printfbad2 OR ${testcase} STREQUAL profile1 OR ${testcase} STREQUAL profile2 OR ${testcase} STREQUAL profile3 OR ${testcase} STREQUAL redfilnm OR ${testcase} STREQUAL rsnulbig OR ${testcase} STREQUAL rsnulbig2 OR - ${testcase} STREQUAL rsstart3 OR ${testcase} STREQUAL rtlen OR - ${testcase} STREQUAL rtlen01 OR - ${testcase} STREQUAL space OR ${testcase} STREQUAL strftlng OR + ${testcase} STREQUAL rsstart3 OR ${testcase} STREQUAL symtab6 OR ${testcase} STREQUAL symtab8 ) set(file_suffix "_FAILS") |