[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gawk-diffs] [SCM] gawk branch, cmake, updated. bfebb6547fb331a87820be10
From: |
Juergen Kahrs |
Subject: |
[gawk-diffs] [SCM] gawk branch, cmake, updated. bfebb6547fb331a87820be10d9c91efd274ea399 |
Date: |
Sun, 05 May 2013 17:04:00 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".
The branch, cmake has been updated
via bfebb6547fb331a87820be10d9c91efd274ea399 (commit)
from 188e4c22845855953c24b9ac26a86320371e1482 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=bfebb6547fb331a87820be10d9c91efd274ea399
commit bfebb6547fb331a87820be10d9c91efd274ea399
Author: Juergen Kahrs <address@hidden>
Date: Sun May 5 19:03:48 2013 +0200
All BASIC test cases are in now.
diff --git a/cmake/basictest b/cmake/basictest
index e77328a..3b8dd39 100755
--- a/cmake/basictest
+++ b/cmake/basictest
@@ -19,9 +19,11 @@ export LANG=C
if test -n "$COMSPEC"; then
# Ignore all differences in white space.
COMPARE="diff -w"
+ PATH_SEPARATOR="\\"
else
# This is a shell running in Unix environment.
COMPARE="cmp"
+ PATH_SEPARATOR="/"
fi
# Each test case that cannot be handle in the "standard way" shall
@@ -34,6 +36,11 @@ function regtest() {
AWK=$GAWKEXE ${SRCDIR}/regtest.sh
}
+function compare() {
+ $GAWKEXE -f ${SRCDIR}/compare.awk 0 1 ${SRCDIR}/compare.in >_${TESTCASE}
+ ${COMPARE} ${SRCDIR}/${TESTCASE}.ok _${TESTCASE} && rm -f _${TESTCASE}
+}
+
function inftest() {
echo This test is very machine specific...
$GAWKEXE -f ${SRCDIR}/inftest.awk | sed "s/inf/Inf/g" >_${TESTCASE}
@@ -45,6 +52,11 @@ function getline2() {
${COMPARE} ${SRCDIR}/${TESTCASE}.ok _${TESTCASE} && rm -f _${TESTCASE}
}
+function awkpath() {
+ AWKPATH="${SRCDIR}$(PATH_SEPARATOR)/lib" $GAWKEXE -f awkpath.awk
>_${TESTCASE}
+ ${COMPARE} ${SRCDIR}/${TESTCASE}.ok _${TESTCASE} && rm -f _${TESTCASE}
+}
+
function litoct() {
echo ab | $GAWKEXE --traditional -f ${SRCDIR}/litoct.awk >_${TESTCASE}
${COMPARE} ${SRCDIR}/${TESTCASE}.ok _${TESTCASE} && rm -f _${TESTCASE}
@@ -64,6 +76,25 @@ function poundbang() {
${COMPARE} ${SRCDIR}/poundbang.awk _`basename ${TESTCASE}` && rm -f
_`basename ${TESTCASE}` _pbd.awk
}
+function messages() {
+ $GAWKEXE -f ${SRCDIR}/messages.awk >_out2 2>_out3
+ ${COMPARE} ${SRCDIR}/out1.ok _out1 && ${COMPARE} ${SRCDIR}/out2.ok _out2 &&
${COMPARE} ${SRCDIR}/out3.ok _out3 && rm -f _out1 _out2 _out3
+}
+
+function argarray() {
+ case ${SRCDIR} in
+ .) : ;;
+ *) cp ${SRCDIR}/argarray.in . ;;
+ esac
+ TEST=test echo just a test | $GAWKEXE -f ${SRCDIR}/argarray.awk
./argarray.in - >_${TESTCASE}
+ case ${SRCDIR} in
+ .) : ;;
+ *) rm -f ./argarray.in ;;
+ esac
+ ${COMPARE} ${SRCDIR}/${TESTCASE}.ok _${TESTCASE} && rm -f _${TESTCASE}
+}
+
+
function localenl() {
${SRCDIR}/${TESTCASE}.sh >_${TESTCASE} 2>/dev/null
${COMPARE} ${SRCDIR}/${TESTCASE}.ok _${TESTCASE} && rm -f _${TESTCASE}
@@ -96,6 +127,16 @@ function manyfiles() {
${COMPARE} ${SRCDIR}/${TESTCASE}.ok _${TESTCASE} && rm -f _${TESTCASE}
}
+function exitval1() {
+ $GAWKEXE -f ${SRCDIR}/exitval1.awk >_${TESTCASE} 2>&1; echo EXIT CODE: $?
>>_${TESTCASE}
+ ${COMPARE} ${SRCDIR}/${TESTCASE}.ok _${TESTCASE} && rm -f _${TESTCASE}
+}
+
+function fsspcoln() {
+ $GAWKEXE -f ${SRCDIR}/${TESTCASE}.awk 'FS=[ :]+' ${SRCDIR}/${TESTCASE}.in
>_${TESTCASE}
+ ${COMPARE} ${SRCDIR}/${TESTCASE}.ok _${TESTCASE} && rm -f _${TESTCASE}
+}
+
function rsstart2() {
$GAWKEXE -f ${SRCDIR}/${TESTCASE}.awk ${SRCDIR}/rsstart1.in >_${TESTCASE}
${COMPARE} ${SRCDIR}/${TESTCASE}.ok _${TESTCASE} && rm -f _${TESTCASE}
@@ -183,6 +224,11 @@ function fflush() {
${COMPARE} ${SRCDIR}/${TESTCASE}.ok _${TESTCASE} && rm -f _${TESTCASE}
}
+function mmap8k() {
+ $GAWKEXE '{ print }' ${SRCDIR}/mmap8k.in >_${TESTCASE}
+ ${COMPARE} ${SRCDIR}/mmap8k.in _${TESTCASE} && rm -f _${TESTCASE} || cp
${SRCDIR}/${TESTCASE}.in ${TESTCASE}.ok
+}
+
function pid() {
AWKPATH=${SRCDIR} AWK=$GAWKEXE ${SHELL} ${SRCDIR}/pid.sh $$ > _`basename
${TESTCASE}` ; :
${COMPARE} ${SRCDIR}/pid.ok _`basename ${TESTCASE}` && rm -f _`basename
${TESTCASE}`
@@ -196,6 +242,11 @@ function strftlng() {
${COMPARE} ${SRCDIR}/${TESTCASE}.ok _${TESTCASE} && rm -f _${TESTCASE}
}
+function nors() {
+ echo A B C D E | tr -d '\12\15' | $GAWKEXE '{ print $NF }' -
${SRCDIR}/nors.in > _${TESTCASE}
+ ${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}
@@ -211,6 +262,11 @@ function pipeio2() {
${COMPARE} ${SRCDIR}/${TESTCASE}.ok _${TESTCASE} && rm -f _${TESTCASE}
}
+function arynocls() {
+ AWKPATH=${SRCDIR} $GAWKEXE -v INPUT=${SRCDIR}/arynocls.in -f arynocls.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"}'
@@ -233,11 +289,52 @@ function inetdayt() {
"/inet/tcp/0/127.0.0.1/13" |& getline; print $0}'
}
+function redfilnm() {
+ $GAWKEXE -f ${SRCDIR}/redfilnm.awk srcdir=${SRCDIR} ${SRCDIR}/redfilnm.in
>_${TESTCASE}
+ ${COMPARE} ${SRCDIR}/${TESTCASE}.ok _${TESTCASE} && rm -f _${TESTCASE}
+}
+
+function leaddig() {
+ $GAWKEXE -v x=2E -f ${SRCDIR}/leaddig.awk >_${TESTCASE}
+ ${COMPARE} ${SRCDIR}/${TESTCASE}.ok _${TESTCASE} && rm -f _${TESTCASE}
+}
+
+function gsubtst3() {
+ $GAWKEXE --re-interval -f ${SRCDIR}/${TESTCASE}.awk ${SRCDIR}/${TESTCASE}.in
>_${TESTCASE}
+ ${COMPARE} ${SRCDIR}/${TESTCASE}.ok _${TESTCASE} && rm -f _${TESTCASE}
+}
+
function space() {
$GAWKEXE -f ' ' ${SRCDIR}/space.awk >_${TESTCASE} 2>&1 || echo EXIT CODE: $?
>>_${TESTCASE}
${COMPARE} ${SRCDIR}/${TESTCASE}.ok _${TESTCASE} && rm -f _${TESTCASE}
}
+function rsnulbig() {
+ # Suppose that block size for pipe is at most 128kB:
+ $GAWKEXE 'BEGIN { for (i = 1; i <= 128*64+1; i++) print "abcdefgh123456\n"
}' 2>&1 | \
+ $GAWKEXE 'BEGIN { RS = ""; ORS = "\n\n" }; { print }' 2>&1 | \
+ $GAWKEXE '/^[^a]/; END{ print NR }' >_${TESTCASE} 2>&1 || echo EXIT CODE: $?
>>_${TESTCASE}
+ ${COMPARE} ${SRCDIR}/${TESTCASE}.ok _${TESTCASE} && rm -f _${TESTCASE}
+}
+
+function rsnulbig2() {
+ $GAWKEXE 'BEGIN { ORS = ""; n = "\n"; for (i = 1; i <= 10; i++) n = (n n); \
+ for (i = 1; i <= 128; i++) print n; print "abc\n" }' 2>&1 | \
+ $GAWKEXE 'BEGIN { RS = ""; ORS = "\n\n" };{ print }' 2>&1 | \
+ $GAWKEXE '/^[^a]/; END { print NR }' >_${TESTCASE} 2>&1 || echo EXIT CODE:
$? >>_${TESTCASE}
+ ${COMPARE} ${SRCDIR}/${TESTCASE}.ok _${TESTCASE} && rm -f _${TESTCASE}
+}
+
+function printf0() {
+ $GAWKEXE --posix -f ${SRCDIR}/${TESTCASE}.awk >_${TESTCASE} 2>&1 || echo
EXIT CODE: $? >>_${TESTCASE}
+ ${COMPARE} ${SRCDIR}/${TESTCASE}.ok _${TESTCASE} && rm -f _${TESTCASE}
+}
+
+function posix2008sub() {
+ $GAWKEXE --posix -f ${SRCDIR}/${TESTCASE}.awk > _${TESTCASE} 2>&1
+ ${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}
@@ -279,6 +376,11 @@ function rtlenmb() {
${COMPARE} ${SRCDIR}/${TESTCASE}.ok _${TESTCASE} && rm -f _${TESTCASE}
}
+function nofile() {
+ $GAWKEXE '{}' no/such/file >_${TESTCASE} 2>&1 || echo EXIT CODE: $?
>>_${TESTCASE}
+ ${COMPARE} ${SRCDIR}/${TESTCASE}.ok _${TESTCASE} && rm -f _${TESTCASE}
+}
+
# Is this test case implemented as a function ?
if [ "$( type -t $TESTCASE )" = "function" ]
then
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 4d5cf86..eb3ddce 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -58,31 +58,24 @@ foreach(testgroup ${ALL_GROUPS} )
# Some of them may reveal genuine bugs.
# Most of them fail because they need to be invoked with a special
parameter.
elseif(
- ${testcase} STREQUAL argarray OR ${testcase} STREQUAL argtest OR
- ${testcase} STREQUAL arynocls OR ${testcase} STREQUAL awkpath OR
+ ${testcase} STREQUAL argtest OR
${testcase} STREQUAL badargs OR ${testcase} STREQUAL beginfile2 OR
${testcase} STREQUAL binmode1 OR ${testcase} STREQUAL charasbytes OR
- ${testcase} STREQUAL colonwarn OR ${testcase} STREQUAL compare OR
+ ${testcase} STREQUAL colonwarn OR
${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 exit OR
${testcase} STREQUAL fmtspcl OR
- ${testcase} STREQUAL fsspcoln OR
- ${testcase} STREQUAL gsubtst3 OR ${testcase} STREQUAL incdupe 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 messages OR ${testcase} STREQUAL mmap8k OR
- ${testcase} STREQUAL next OR ${testcase} STREQUAL nofile OR
- ${testcase} STREQUAL nondec2 OR ${testcase} STREQUAL nors OR
- ${testcase} STREQUAL posix2008sub OR
- ${testcase} STREQUAL printf0 OR ${testcase} STREQUAL printfbad2 OR
+ ${testcase} STREQUAL next OR
+ ${testcase} STREQUAL nondec2 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 symtab6 OR ${testcase} STREQUAL symtab8
)
-----------------------------------------------------------------------
Summary of changes:
cmake/basictest | 102 +++++++++++++++++++++++++++++++++++++++++++++++++++
test/CMakeLists.txt | 21 +++-------
2 files changed, 109 insertions(+), 14 deletions(-)
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gawk-diffs] [SCM] gawk branch, cmake, updated. bfebb6547fb331a87820be10d9c91efd274ea399,
Juergen Kahrs <=