From c2624fcf87cac6b56c10771cdd88c3aaecbf2488 Mon Sep 17 00:00:00 2001 From: Stefan Radomski Date: Mon, 5 Jun 2017 15:02:25 +0200 Subject: Added more encoding tests --- test/w3c/c89/test-enc-CP1250.scxml | 26 ++++++++++++++++++++++++++ test/w3c/c89/test-enc-ISO-8859-15.scxml | 26 ++++++++++++++++++++++++++ test/w3c/c89/test-enc-UTF8.scxml | 26 ++++++++++++++++++++++++++ test/w3c/c89/test-utf8.scxml | 22 ---------------------- test/w3c/contrib/test-enc-UTF8.txml | 24 ++++++++++++++++++++++++ test/w3c/contrib/test-utf8.txml | 19 ------------------- test/w3c/convert-tests.sh | 20 ++++++++++++++++---- test/w3c/ecma/test-enc-ASCII.scxml | 26 ++++++++++++++++++++++++++ test/w3c/ecma/test-enc-CP1250.scxml | 26 ++++++++++++++++++++++++++ test/w3c/ecma/test-enc-ISO-8859-15.scxml | 26 ++++++++++++++++++++++++++ test/w3c/ecma/test-enc-UTF8.scxml | 26 ++++++++++++++++++++++++++ test/w3c/ecma/test-utf8.scxml | 22 ---------------------- test/w3c/jexl/test-enc-CP1250.scxml | 26 ++++++++++++++++++++++++++ test/w3c/jexl/test-enc-ISO-8859-15.scxml | 26 ++++++++++++++++++++++++++ test/w3c/jexl/test-enc-UTF8.scxml | 26 ++++++++++++++++++++++++++ test/w3c/jexl/test-utf8.scxml | 22 ---------------------- test/w3c/lua/test-enc-CP1250.scxml | 26 ++++++++++++++++++++++++++ test/w3c/lua/test-enc-ISO-8859-15.scxml | 26 ++++++++++++++++++++++++++ test/w3c/lua/test-enc-UTF8.scxml | 26 ++++++++++++++++++++++++++ test/w3c/lua/test-utf8.scxml | 22 ---------------------- test/w3c/namespace/test-enc-CP1250.scxml | 26 ++++++++++++++++++++++++++ test/w3c/namespace/test-enc-ISO-8859-15.scxml | 26 ++++++++++++++++++++++++++ test/w3c/namespace/test-enc-UTF8.scxml | 26 ++++++++++++++++++++++++++ test/w3c/namespace/test-utf8.scxml | 22 ---------------------- test/w3c/promela/test-enc-utf8.scxml | 26 ++++++++++++++++++++++++++ test/w3c/promela/test-utf8.scxml | 22 ---------------------- 26 files changed, 482 insertions(+), 155 deletions(-) create mode 100644 test/w3c/c89/test-enc-CP1250.scxml create mode 100644 test/w3c/c89/test-enc-ISO-8859-15.scxml create mode 100644 test/w3c/c89/test-enc-UTF8.scxml delete mode 100644 test/w3c/c89/test-utf8.scxml create mode 100644 test/w3c/contrib/test-enc-UTF8.txml delete mode 100644 test/w3c/contrib/test-utf8.txml create mode 100644 test/w3c/ecma/test-enc-ASCII.scxml create mode 100644 test/w3c/ecma/test-enc-CP1250.scxml create mode 100644 test/w3c/ecma/test-enc-ISO-8859-15.scxml create mode 100644 test/w3c/ecma/test-enc-UTF8.scxml delete mode 100644 test/w3c/ecma/test-utf8.scxml create mode 100644 test/w3c/jexl/test-enc-CP1250.scxml create mode 100644 test/w3c/jexl/test-enc-ISO-8859-15.scxml create mode 100644 test/w3c/jexl/test-enc-UTF8.scxml delete mode 100644 test/w3c/jexl/test-utf8.scxml create mode 100644 test/w3c/lua/test-enc-CP1250.scxml create mode 100644 test/w3c/lua/test-enc-ISO-8859-15.scxml create mode 100644 test/w3c/lua/test-enc-UTF8.scxml delete mode 100644 test/w3c/lua/test-utf8.scxml create mode 100644 test/w3c/namespace/test-enc-CP1250.scxml create mode 100644 test/w3c/namespace/test-enc-ISO-8859-15.scxml create mode 100644 test/w3c/namespace/test-enc-UTF8.scxml delete mode 100644 test/w3c/namespace/test-utf8.scxml create mode 100644 test/w3c/promela/test-enc-utf8.scxml delete mode 100644 test/w3c/promela/test-utf8.scxml diff --git a/test/w3c/c89/test-enc-CP1250.scxml b/test/w3c/c89/test-enc-CP1250.scxml new file mode 100644 index 0000000..3cd1241 --- /dev/null +++ b/test/w3c/c89/test-enc-CP1250.scxml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/w3c/c89/test-enc-ISO-8859-15.scxml b/test/w3c/c89/test-enc-ISO-8859-15.scxml new file mode 100644 index 0000000..5fdf91c --- /dev/null +++ b/test/w3c/c89/test-enc-ISO-8859-15.scxml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/w3c/c89/test-enc-UTF8.scxml b/test/w3c/c89/test-enc-UTF8.scxml new file mode 100644 index 0000000..b576365 --- /dev/null +++ b/test/w3c/c89/test-enc-UTF8.scxml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/w3c/c89/test-utf8.scxml b/test/w3c/c89/test-utf8.scxml deleted file mode 100644 index 88632c3..0000000 --- a/test/w3c/c89/test-utf8.scxml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/w3c/contrib/test-enc-UTF8.txml b/test/w3c/contrib/test-enc-UTF8.txml new file mode 100644 index 0000000..72d2c0b --- /dev/null +++ b/test/w3c/contrib/test-enc-UTF8.txml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/w3c/contrib/test-utf8.txml b/test/w3c/contrib/test-utf8.txml deleted file mode 100644 index fccabf5..0000000 --- a/test/w3c/contrib/test-utf8.txml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/test/w3c/convert-tests.sh b/test/w3c/convert-tests.sh index fcaf978..8ffe48b 100755 --- a/test/w3c/convert-tests.sh +++ b/test/w3c/convert-tests.sh @@ -8,14 +8,14 @@ ME=`basename $0` DIR="$( cd "$( dirname "$0" )" && pwd )" cd $DIR -if [ "$#" -lt 1 ]; then +if [ "$#" -lt 2 ]; then echo "At least one datamodel needs to be specified:" - echo " $0 ecma c89 lua jexl namespace xpath promela prolog" + echo " $0 ecma c89 lua jexl namespace xpath promela prolog [pattern]" exit 1 fi -while [ "$1" != "" ]; do +while [ "$2" != "" ]; do case $1 in ecma ) ECMA=$1 @@ -47,7 +47,7 @@ while [ "$1" != "" ]; do esac done -TXMLS=`ls txml/*.txml contrib/*.txml` +TXMLS=`ls txml/$1.txml contrib/$1.txml` TRANSFORM="java -jar /Users/sradomski/Developer/Applications/SaxonHE9-4-0-7J/saxon9he.jar" # see http://saxon.sourceforge.net/saxon6.5.1/using-xsl.html @@ -134,6 +134,18 @@ find ./jexl -type f -exec grep -Ili 'datamodel="xpath"' {} \; |xargs rm -fv find ./jexl -type f -exec grep -Ili 'datamodel="ecmascript"' {} \; |xargs rm -fv find ./jexl -type f -exec grep -Ili 'datamodel="null"' {} \; |xargs rm -fv +# create other encoding tests from the utf8 one +for ENC in ISO-8859-15 CP1250; +do + export ENC=$ENC + find . -name "test-enc-UTF8.scxml" -exec sh -c 'sed "s/UTF-8/${ENC}/g" {} > $(dirname {})/test-enc-${ENC}.tmp.scxml' \; + find . -name "test-enc-${ENC}.tmp.scxml" -exec sh -c 'iconv -f UTF-8 -t ${ENC} {} > $(dirname {})/test-enc-${ENC}.scxml' \; + find . -name "test-enc-${ENC}.tmp.scxml" -exec rm {} \; +done + +# find . -name "tmp.scxml" -exec rm {} \; +# find . -name "tmp.scxml.orig" -exec rm {} \; + # test436 is the null datamodel mv ./ecma/test436.scxml ./null rm ./namespace/test436.scxml diff --git a/test/w3c/ecma/test-enc-ASCII.scxml b/test/w3c/ecma/test-enc-ASCII.scxml new file mode 100644 index 0000000..be03547 --- /dev/null +++ b/test/w3c/ecma/test-enc-ASCII.scxml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/w3c/ecma/test-enc-CP1250.scxml b/test/w3c/ecma/test-enc-CP1250.scxml new file mode 100644 index 0000000..83b8218 --- /dev/null +++ b/test/w3c/ecma/test-enc-CP1250.scxml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/w3c/ecma/test-enc-ISO-8859-15.scxml b/test/w3c/ecma/test-enc-ISO-8859-15.scxml new file mode 100644 index 0000000..331359d --- /dev/null +++ b/test/w3c/ecma/test-enc-ISO-8859-15.scxml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/w3c/ecma/test-enc-UTF8.scxml b/test/w3c/ecma/test-enc-UTF8.scxml new file mode 100644 index 0000000..b2fb878 --- /dev/null +++ b/test/w3c/ecma/test-enc-UTF8.scxml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/w3c/ecma/test-utf8.scxml b/test/w3c/ecma/test-utf8.scxml deleted file mode 100644 index 85d3854..0000000 --- a/test/w3c/ecma/test-utf8.scxml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/w3c/jexl/test-enc-CP1250.scxml b/test/w3c/jexl/test-enc-CP1250.scxml new file mode 100644 index 0000000..993f0dc --- /dev/null +++ b/test/w3c/jexl/test-enc-CP1250.scxml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/w3c/jexl/test-enc-ISO-8859-15.scxml b/test/w3c/jexl/test-enc-ISO-8859-15.scxml new file mode 100644 index 0000000..d6b0e26 --- /dev/null +++ b/test/w3c/jexl/test-enc-ISO-8859-15.scxml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/w3c/jexl/test-enc-UTF8.scxml b/test/w3c/jexl/test-enc-UTF8.scxml new file mode 100644 index 0000000..5b853ac --- /dev/null +++ b/test/w3c/jexl/test-enc-UTF8.scxml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/w3c/jexl/test-utf8.scxml b/test/w3c/jexl/test-utf8.scxml deleted file mode 100644 index 932d06f..0000000 --- a/test/w3c/jexl/test-utf8.scxml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/w3c/lua/test-enc-CP1250.scxml b/test/w3c/lua/test-enc-CP1250.scxml new file mode 100644 index 0000000..47272f5 --- /dev/null +++ b/test/w3c/lua/test-enc-CP1250.scxml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/w3c/lua/test-enc-ISO-8859-15.scxml b/test/w3c/lua/test-enc-ISO-8859-15.scxml new file mode 100644 index 0000000..b026b95 --- /dev/null +++ b/test/w3c/lua/test-enc-ISO-8859-15.scxml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/w3c/lua/test-enc-UTF8.scxml b/test/w3c/lua/test-enc-UTF8.scxml new file mode 100644 index 0000000..e85a511 --- /dev/null +++ b/test/w3c/lua/test-enc-UTF8.scxml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/w3c/lua/test-utf8.scxml b/test/w3c/lua/test-utf8.scxml deleted file mode 100644 index 2ee83a3..0000000 --- a/test/w3c/lua/test-utf8.scxml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/w3c/namespace/test-enc-CP1250.scxml b/test/w3c/namespace/test-enc-CP1250.scxml new file mode 100644 index 0000000..bfa62de --- /dev/null +++ b/test/w3c/namespace/test-enc-CP1250.scxml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/w3c/namespace/test-enc-ISO-8859-15.scxml b/test/w3c/namespace/test-enc-ISO-8859-15.scxml new file mode 100644 index 0000000..964cd2f --- /dev/null +++ b/test/w3c/namespace/test-enc-ISO-8859-15.scxml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/w3c/namespace/test-enc-UTF8.scxml b/test/w3c/namespace/test-enc-UTF8.scxml new file mode 100644 index 0000000..b52857b --- /dev/null +++ b/test/w3c/namespace/test-enc-UTF8.scxml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/w3c/namespace/test-utf8.scxml b/test/w3c/namespace/test-utf8.scxml deleted file mode 100644 index ee592ed..0000000 --- a/test/w3c/namespace/test-utf8.scxml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/w3c/promela/test-enc-utf8.scxml b/test/w3c/promela/test-enc-utf8.scxml new file mode 100644 index 0000000..998a1d3 --- /dev/null +++ b/test/w3c/promela/test-enc-utf8.scxml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/w3c/promela/test-utf8.scxml b/test/w3c/promela/test-utf8.scxml deleted file mode 100644 index f9ce782..0000000 --- a/test/w3c/promela/test-utf8.scxml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -- cgit v0.12