From b33d2266e41d27f60ed48df40a22a3152b5d5120 Mon Sep 17 00:00:00 2001 From: Koji Arai Date: Wed, 5 Oct 2016 22:33:55 +0900 Subject: [PATCH] Examine the printf command to pass the test13 on MacOS X --- tests/lha-test13 | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/tests/lha-test13 b/tests/lha-test13 index fbe192f..ad6b273 100644 --- a/tests/lha-test13 +++ b/tests/lha-test13 @@ -1,11 +1,24 @@ # -*- shell-script -*- message testing the kanji code conversion. -# printf '\xb4\xc1\xbb\xfa\n' > test-tmp-euc -echo abcd | LANG=C tr abcd '\264\301\273\372' > test-tmp-euc - check $? $LINENO -# printf '\x8a\xbf\x8e\x9a\n' > test-tmp-sjis -echo abcd | LANG=C tr abcd '\212\277\216\232' > test-tmp-sjis +uname >&2 +case $(uname) in +Darwin*) + printf '\xb4\xc1\xbb\xfa\n' > test-tmp-euc + ;; +*) + echo abcd | LANG=C tr abcd '\264\301\273\372' > test-tmp-euc + ;; +esac + check $? $LINENO +case $(uname) in +Darwin*) + printf '\x8a\xbf\x8e\x9a\n' > test-tmp-sjis + ;; +*) + echo abcd | LANG=C tr abcd '\212\277\216\232' > test-tmp-sjis + ;; +esac check $? $LINENO # no convert $lha c test-tmp-euc.lzh test-tmp-euc -- 2.11.0