fix 3G modem support for ARM
[tomato.git] / release / src-rt-6.x.4708 / router / libiconv / tests / check-stateless.cmd
blob473a248838cb70db10cecdbc7876693d25b7ea06
1 /*
2 * check-stateless
4 * Complete check of a stateless encoding.
5 * Usage: check-stateless SRCDIR CHARSET
6 */
8 IF RxFuncQuery('SysLoadFuncs') THEN DO
9 CALL RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
10 CALL SysLoadFuncs
11 END
13 '@echo off'
15 PARSE ARG srcdir charset
17 '.\table-from 'charset' > tmp-'charset'.TXT'
18 '.\table-to 'charset' | sort > tmp-'charset'.INVERSE.TXT'
19 'cmp 'srcdir'\'charset'.TXT tmp-'charset'.TXT'
21 IF exists(srcdir'\'charset'.IRREVERSIBLE.TXT') = 1 THEN
23 'cat 'srcdir'\'charset'.TXT 'srcdir'\'charset'.IRREVERSIBLE.TXT | sort | uniq -u > tmp-orig-'charset'.INVERSE.TXT'
24 'cmp tmp-orig-'charset'.INVERSE.TXT tmp-'charset'.INVERSE.TXT'
25 END
26 ELSE
28 'cmp 'srcdir'\'charset'.TXT tmp-'charset'.INVERSE.TXT'
29 END
31 'rm -f tmp-'charset'.TXT tmp-'charset'.INVERSE.TXT tmp-orig-'charset'.INVERSE.TXT'
33 EXIT
36 * exists - check if file exists
39 exists: PROCEDURE
40 IF STREAM(ARG(1), 'C', 'QUERY EXISTS') = '' THEN
41 RETURN 0
42 ELSE
43 RETURN 1