--- /dev/null
+# -*- shell-script -*-
+message testing the end of line conversion.
+
+# NL to CR NL in archive
+$lha ct test-tmp-crnl.lzh test-a test-b test-c
+ check $? $LINENO
+# no convert
+$lha xw=test-tmp-crnl test-tmp-crnl.lzh
+ check $? $LINENO
+diff -r test-1 test-tmp-crnl
+test $? -ne 0
+ check $? $LINENO
+sed -e 's/$/
+/' < test-a | diff test-tmp-crnl/test-a -
+ check $? $LINENO
+sed -e 's/$/
+/' < test-b | diff test-tmp-crnl/test-b -
+ check $? $LINENO
+sed -e 's/$/
+/' < test-c | diff test-tmp-crnl/test-c -
+ check $? $LINENO
+# CR NL to NL
+$lha xtw=test-tmp-nl test-tmp-crnl.lzh
+ check $? $LINENO
+diff -r test-1 test-tmp-nl
+ check $? $LINENO
+# no convert
+$lha c test-tmp-nl.lzh test-a test-b test-c
+ check $? $LINENO
+# CR NL to NL (cannot convert)
+$lha xtw=test-tmp-nl2 test-tmp-nl.lzh
+ check $? $LINENO
+diff -r test-1 test-tmp-nl2
+ check $? $LINENO
--- /dev/null
+# -*- shell-script -*-
+message testing the kanji code conversion.
+
+printf '\xb4\xc1\xbb\xfa\xc9\xbd\n' > test-tmp-euc
+ check $? $LINENO
+printf '\x8a\xbf\x8e\x9a\x95\x5c\n' > test-tmp-sjis
+ check $? $LINENO
+# no convert
+$lha c test-tmp-euc.lzh test-tmp-euc
+ check $? $LINENO
+# file size is too small, so no compressed
+$lha v test-tmp-euc.lzh | grep lh0
+ check $? $LINENO
+# no convert
+$lha xw=test-tmp-euc-d test-tmp-euc.lzh
+ check $? $LINENO
+diff -r test-tmp-euc test-tmp-euc-d/test-tmp-euc
+ check $? $LINENO
+# sjis to euc
+$lha xew=test-tmp-unknown-d test-tmp-euc.lzh
+ check $? $LINENO
+diff -r test-tmp-euc test-tmp-unknown-d/test-tmp-euc
+test $? -ne 0
+ check $? $LINENO
+diff -r test-tmp-sjis test-tmp-unknown-d/test-tmp-euc
+test $? -ne 0
+ check $? $LINENO
+
+# euc to sjis (NL to CR NL)
+$lha ce test-tmp-sjis.lzh test-tmp-euc
+ check $? $LINENO
+# file size is too small, so no compressed
+$lha v test-tmp-euc.lzh | grep lh0
+ check $? $LINENO
+# no convert (CR NL to NL)
+$lha xtw=test-tmp-sjis-d test-tmp-sjis.lzh
+ check $? $LINENO
+diff test-tmp-sjis test-tmp-sjis-d/test-tmp-euc
+ check $? $LINENO
+# sjis to euc (CR NL to NL)
+$lha xew=test-tmp-euc-d2 test-tmp-sjis.lzh
+ check $? $LINENO
+diff test-tmp-euc test-tmp-euc-d2/test-tmp-euc
+ check $? $LINENO
+
+i=0
+while ((i++ < 100))
+do
+ cat test-tmp-euc >> test-tmp-euc2
+ cat test-tmp-sjis >> test-tmp-sjis2
+done
+
+# no convert
+$lha c test-tmp-euc2.lzh test-tmp-euc2
+ check $? $LINENO
+$lha v test-tmp-euc2.lzh | grep 'lh[567]'
+ check $? $LINENO
+# no convert
+$lha xw=test-tmp-euc2-d test-tmp-euc2.lzh
+ check $? $LINENO
+diff -r test-tmp-euc2 test-tmp-euc2-d/test-tmp-euc2
+ check $? $LINENO
+# sjis to euc
+$lha xew=test-tmp-unknown2-d test-tmp-euc2.lzh
+ check $? $LINENO
+diff -r test-tmp-euc2 test-tmp-unknown2-d/test-tmp-euc2
+test $? -ne 0
+ check $? $LINENO
+diff -r test-tmp-sjis2 test-tmp-unknown2-d/test-tmp-euc2
+test $? -ne 0
+ check $? $LINENO
+
+# euc to sjis (NL to CR NL)
+$lha ce test-tmp-sjis2.lzh test-tmp-euc2
+ check $? $LINENO
+$lha v test-tmp-euc2.lzh | grep 'lh[567]'
+ check $? $LINENO
+# no convert (CR NL to NL)
+$lha xtw=test-tmp-sjis2-d test-tmp-sjis2.lzh
+ check $? $LINENO
+diff test-tmp-sjis2 test-tmp-sjis2-d/test-tmp-euc2
+ check $? $LINENO
+# sjis to euc (CR NL to NL)
+$lha xew=test-tmp-euc2-d2 test-tmp-sjis2.lzh
+ check $? $LINENO
+diff test-tmp-euc2 test-tmp-euc2-d2/test-tmp-euc2
+ check $? $LINENO