From a571f49b3d0fa57561b27c517bf47987f7f5958c Mon Sep 17 00:00:00 2001 From: ZyX Date: Sun, 26 Jan 2014 21:59:33 +0400 Subject: [PATCH] Get rid of printf --- tests/test_shells/bash.ok | 4 ++-- tests/test_shells/input.bash | 4 ++-- tests/test_shells/input.fish | 4 ++-- tests/test_shells/input.zsh | 4 ++-- tests/test_shells/test.sh | 6 ++++-- tests/test_shells/zsh.ok | 4 ++-- 6 files changed, 14 insertions(+), 12 deletions(-) diff --git a/tests/test_shells/bash.ok b/tests/test_shells/bash.ok index 167f6b2c..b5026d25 100644 --- a/tests/test_shells/bash.ok +++ b/tests/test_shells/bash.ok @@ -7,8 +7,8 @@   HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  false   HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  1  kill `cat pid` ; sleep 1s [1]+ Terminated bash -c "echo \$\$>pid ; while true ; do sleep 0.1s ; done" -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  cd $(printf '\x1b[32m') -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  ^[[32m  cd ../$(printf '\x08') +  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  cd "$DIR1" +  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  ^[[32m  cd ../"$DIR2"   HOSTNAME  USER   BRANCH  ⋯  shell  3rd  ^H  cd ../'\[\]'   HOSTNAME  USER   BRANCH  ⋯  shell  3rd  \[\]  cd ../'%%'   HOSTNAME  USER   BRANCH  ⋯  shell  3rd  %%  cd ../'#[bold]' diff --git a/tests/test_shells/input.bash b/tests/test_shells/input.bash index 429b4e19..e9f0d8ab 100644 --- a/tests/test_shells/input.bash +++ b/tests/test_shells/input.bash @@ -10,8 +10,8 @@ VIRTUAL_ENV= bash -c "echo \$\$>pid ; while true ; do sleep 0.1s ; done" & false kill `cat pid` ; sleep 1s -cd $(printf '\x1b[32m') -cd ../$(printf '\x08') +cd "$DIR1" +cd ../"$DIR2" cd ../'\[\]' cd ../'%%' cd ../'#[bold]' diff --git a/tests/test_shells/input.fish b/tests/test_shells/input.fish index 549343d6..f6dcc4fc 100644 --- a/tests/test_shells/input.fish +++ b/tests/test_shells/input.fish @@ -11,8 +11,8 @@ set VIRTUAL_ENV bash -c "echo \$\$>pid ; while true ; do sleep 0.1s ; done" & false kill (cat pid) ; sleep 1s -cd (printf '\x1b[32m') -cd ../(printf '\x08') +cd "$DIR1" +cd ../"$DIR2" cd ../'\[\]' cd ../'%%' cd ../'#[bold]' diff --git a/tests/test_shells/input.zsh b/tests/test_shells/input.zsh index 744dea32..b3b3ba59 100644 --- a/tests/test_shells/input.zsh +++ b/tests/test_shells/input.zsh @@ -11,8 +11,8 @@ VIRTUAL_ENV= bash -c "echo \$\$>pid ; while true ; do sleep 0.1s ; done" & false kill `cat pid` ; sleep 1s -cd $(printf '\x1b[32m') -cd ../$(printf '\x08') +cd "$DIR1" +cd ../"$DIR2" cd ../'\[\]' cd ../'%%' cd ../'#[bold]' diff --git a/tests/test_shells/test.sh b/tests/test_shells/test.sh index dca958e3..c38d13c4 100755 --- a/tests/test_shells/test.sh +++ b/tests/test_shells/test.sh @@ -61,8 +61,10 @@ test -d tests/shell && rm -r tests/shell mkdir tests/shell git init tests/shell/3rd git --git-dir=tests/shell/3rd/.git checkout -b BRANCH -mkdir tests/shell/3rd/"$(printf '\x1b[32m')" -mkdir tests/shell/3rd/"$(printf '\x08')" +export DIR1="" +export DIR2="" +mkdir tests/shell/3rd/"$DIR1" +mkdir tests/shell/3rd/"$DIR2" mkdir tests/shell/3rd/'\[\]' mkdir tests/shell/3rd/'%%' mkdir tests/shell/3rd/'#[bold]' diff --git a/tests/test_shells/zsh.ok b/tests/test_shells/zsh.ok index ba98eb73..9ebcfb60 100644 --- a/tests/test_shells/zsh.ok +++ b/tests/test_shells/zsh.ok @@ -8,8 +8,8 @@   HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  false   HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  1  kill `cat pid` ; sleep 1s [1] + terminated bash -c "echo \$\$>pid ; while true ; do sleep 0.1s ; done" -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  cd $(printf '\x1b[32m') -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  ^[[32m  cd ../$(printf '\x08') +  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  cd "$DIR1" +  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  ^[[32m  cd ../"$DIR2"   HOSTNAME  USER   BRANCH  ⋯  shell  3rd  ^H  cd ../'\[\]'   HOSTNAME  USER   BRANCH  ⋯  shell  3rd  \[\]  cd ../'%%'   HOSTNAME  USER   BRANCH  ⋯  shell  3rd  %%  cd ../'#[bold]'