summaryrefslogtreecommitdiff
path: root/test/GNU/check-stateless.bat
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2008-11-13 00:43:22 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2008-11-13 00:43:22 +0000
commit1e27fedc75e11311af66666655996aa5fe2960e2 (patch)
tree237b9f2200b45149beb1f7dc27cfbd3f72259e21 /test/GNU/check-stateless.bat
parentdb524b69d0cc2d982c3d9f8496a33d7bff9308b8 (diff)
downloadiconv-1e27fedc75e11311af66666655996aa5fe2960e2.tar.gz
iconv-1e27fedc75e11311af66666655996aa5fe2960e2.tar.bz2
Import GNU libiconv testsuite, suitably hacked to fit into our buildsystem.
This still needs a bit of work, not least to get sensible automated testing. It currently requires manual inspection of the output, which isn't all that great. svn path=/trunk/iconv/; revision=5690
Diffstat (limited to 'test/GNU/check-stateless.bat')
-rw-r--r--test/GNU/check-stateless.bat21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/GNU/check-stateless.bat b/test/GNU/check-stateless.bat
new file mode 100644
index 0000000..3950f2e
--- /dev/null
+++ b/test/GNU/check-stateless.bat
@@ -0,0 +1,21 @@
+@ECHO OFF
+REM Complete check of a stateless encoding.
+REM Usage: check-stateless.bat SRCDIR CHARSET
+
+.\table-from %2 > tmp-%2.TXT
+.\table-to %2 | sort > tmp-%2.INVERSE.TXT
+fc %1\%2.TXT tmp-%2.TXT
+
+if not exist %1\%2.IRREVERSIBLE.TXT goto ELSE_1
+ copy /a %1\%2.TXT /a + %1\%2.IRREVERSIBLE.TXT /a tmp
+ sort < tmp | uniq-u > tmp-orig-%2.INVERSE.TXT
+ fc tmp-orig-%2.INVERSE.TXT tmp-%2.INVERSE.TXT
+ del tmp
+ del tmp-orig-%2.INVERSE.TXT
+ goto ENDIF_1
+:ELSE_1
+ fc %1\%2.TXT tmp-%2.INVERSE.TXT
+:ENDIF_1
+
+del tmp-%2.TXT
+del tmp-%2.INVERSE.TXT