diff options
author | Rui Ueyama <ruiu@google.com> | 2016-10-26 01:07:26 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2016-10-26 01:07:26 +0000 |
commit | 7d084db8369c1b076dfc4563dce27f5aaebb63b8 (patch) | |
tree | 1d0e809d67468fa12e0f7d8db158158fc6aacac8 /test | |
parent | 7f59a4b62de3f616add2f022094e7a57ae1fb032 (diff) |
Use printf instead of "echo -e" or "echo -n".
Not all echo commands support "-e". On the other hand, printf
command is in POSIX, so it's more portable than "echo -e".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285151 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Object/archive-format.test | 8 | ||||
-rw-r--r-- | test/tools/sanstats/elf.test | 38 |
2 files changed, 23 insertions, 23 deletions
diff --git a/test/Object/archive-format.test b/test/Object/archive-format.test index 70458d51be1..b9562a36d67 100644 --- a/test/Object/archive-format.test +++ b/test/Object/archive-format.test @@ -4,11 +4,11 @@ string table or not. RUN: mkdir -p %t RUN: cd %t -RUN: echo -n bar. > 0123456789abcde -RUN: echo -n zed. > 0123456789abcdef +RUN: printf bar. > 0123456789abcde +RUN: printf zed. > 0123456789abcdef RUN: mkdir -p foo -RUN: echo -n bar2 > foo/0123456789abcde -RUN: echo -n zed2 > foo/0123456789abcdef +RUN: printf bar2 > foo/0123456789abcde +RUN: printf zed2 > foo/0123456789abcdef RUN: rm -f %t.a RUN: llvm-ar --format=gnu rc %t.a 0123456789abcde 0123456789abcdef foo/0123456789abcde foo/0123456789abcdef diff --git a/test/tools/sanstats/elf.test b/test/tools/sanstats/elf.test index 91651bc3f9d..ab90b50020f 100644 --- a/test/tools/sanstats/elf.test +++ b/test/tools/sanstats/elf.test @@ -1,27 +1,27 @@ # RUN: yaml2obj %s > %t1.o # RUN: yaml2obj %s > %t2.o -# RUN: echo -ne "\x04" > %t.stats +# RUN: printf "\x04" > %t.stats -# RUN: echo -n "%t1.o" >> %t.stats -# RUN: echo -ne "\x00" >> %t.stats -# RUN: echo -ne "\x01\x00\x00\x00\x01\x00\x00\x00" >> %t.stats -# RUN: echo -ne "\x11\x00\x00\x00\x02\x00\x00\x20" >> %t.stats -# RUN: echo -ne "\x21\x00\x00\x00\x03\x00\x00\x40" >> %t.stats -# RUN: echo -ne "\x01\x00\x00\x00\x04\x00\x00\x60" >> %t.stats -# RUN: echo -ne "\x11\x00\x00\x00\x05\x00\x00\x80" >> %t.stats -# RUN: echo -ne "\x21\x00\x00\x00\x06\x00\x00\xa0" >> %t.stats -# RUN: echo -ne "\x00\x00\x00\x00\x00\x00\x00\x00" >> %t.stats +# RUN: printf "%%s" "%t1.o" >> %t.stats +# RUN: printf "\x00" >> %t.stats +# RUN: printf "\x01\x00\x00\x00\x01\x00\x00\x00" >> %t.stats +# RUN: printf "\x11\x00\x00\x00\x02\x00\x00\x20" >> %t.stats +# RUN: printf "\x21\x00\x00\x00\x03\x00\x00\x40" >> %t.stats +# RUN: printf "\x01\x00\x00\x00\x04\x00\x00\x60" >> %t.stats +# RUN: printf "\x11\x00\x00\x00\x05\x00\x00\x80" >> %t.stats +# RUN: printf "\x21\x00\x00\x00\x06\x00\x00\xa0" >> %t.stats +# RUN: printf "\x00\x00\x00\x00\x00\x00\x00\x00" >> %t.stats -# RUN: echo -n "%t2.o" >> %t.stats -# RUN: echo -ne "\x00" >> %t.stats -# RUN: echo -ne "\x21\x00\x00\x00\x07\x00\x00\x00" >> %t.stats -# RUN: echo -ne "\x11\x00\x00\x00\x08\x00\x00\x20" >> %t.stats -# RUN: echo -ne "\x01\x00\x00\x00\x09\x00\x00\x40" >> %t.stats -# RUN: echo -ne "\x21\x00\x00\x00\x0b\x00\x00\x60" >> %t.stats -# RUN: echo -ne "\x11\x00\x00\x00\x0c\x00\x00\x80" >> %t.stats -# RUN: echo -ne "\x01\x00\x00\x00\x0e\x00\x00\xa0" >> %t.stats -# RUN: echo -ne "\x00\x00\x00\x00\x00\x00\x00\x00" >> %t.stats +# RUN: printf "%%s" "%t2.o" >> %t.stats +# RUN: printf "\x00" >> %t.stats +# RUN: printf "\x21\x00\x00\x00\x07\x00\x00\x00" >> %t.stats +# RUN: printf "\x11\x00\x00\x00\x08\x00\x00\x20" >> %t.stats +# RUN: printf "\x01\x00\x00\x00\x09\x00\x00\x40" >> %t.stats +# RUN: printf "\x21\x00\x00\x00\x0b\x00\x00\x60" >> %t.stats +# RUN: printf "\x11\x00\x00\x00\x0c\x00\x00\x80" >> %t.stats +# RUN: printf "\x01\x00\x00\x00\x0e\x00\x00\xa0" >> %t.stats +# RUN: printf "\x00\x00\x00\x00\x00\x00\x00\x00" >> %t.stats # RUN: sanstats %t.stats | FileCheck %s |