OSDN Git Service

Examine the printf command to pass the test13 on MacOS X
authorKoji Arai <jca02266@gmail.com>
Wed, 5 Oct 2016 13:33:55 +0000 (22:33 +0900)
committerKoji Arai <jca02266@gmail.com>
Wed, 5 Oct 2016 13:34:26 +0000 (22:34 +0900)
tests/lha-test13

index fbe192f..ad6b273 100644 (file)
@@ -1,11 +1,24 @@
 # -*- shell-script -*-
 message testing the kanji code conversion.
 
 # -*- 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
                                                        check $? $LINENO
 # no convert
 $lha c test-tmp-euc.lzh test-tmp-euc