From 9f0665506b4390fc76cd1591bb3be1ae7f920ce9 Mon Sep 17 00:00:00 2001 From: Foo Date: Fri, 21 Aug 2015 18:39:52 +0300 Subject: [PATCH 1/3] =?UTF-8?q?Rename=20=E2=80=A6/test=5Fin=5Fvterm/test.s?= =?UTF-8?q?h=20to=20=E2=80=A6/test=5Fin=5Fvterm/test=5Ftmux.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/run_vterm_tests.sh | 2 +- tests/test_in_vterm/test_tmux.py | 2 +- tests/test_in_vterm/{test.sh => test_tmux.sh} | 24 +++++++++---------- 3 files changed, 14 insertions(+), 14 deletions(-) rename tests/test_in_vterm/{test.sh => test_tmux.sh} (61%) diff --git a/tests/run_vterm_tests.sh b/tests/run_vterm_tests.sh index 312b817d..1368ba66 100755 --- a/tests/run_vterm_tests.sh +++ b/tests/run_vterm_tests.sh @@ -1,7 +1,7 @@ #!/bin/sh set -e FAILED=0 -if ! sh tests/test_in_vterm/test.sh ; then +if ! sh tests/test_in_vterm/test_tmux.sh ; then echo "Failed vterm" FAILED=1 fi diff --git a/tests/test_in_vterm/test_tmux.py b/tests/test_in_vterm/test_tmux.py index 6454d69c..83705faa 100755 --- a/tests/test_in_vterm/test_tmux.py +++ b/tests/test_in_vterm/test_tmux.py @@ -18,7 +18,7 @@ from powerline import get_fallback_logger from tests.lib.terminal import ExpectProcess -VTERM_TEST_DIR = os.path.abspath('tests/vterm') +VTERM_TEST_DIR = os.path.abspath('tests/vterm_tmux') def cell_properties_key_to_shell_escape(cell_properties_key): diff --git a/tests/test_in_vterm/test.sh b/tests/test_in_vterm/test_tmux.sh similarity index 61% rename from tests/test_in_vterm/test.sh rename to tests/test_in_vterm/test_tmux.sh index f87201fe..a881485f 100755 --- a/tests/test_in_vterm/test.sh +++ b/tests/test_in_vterm/test_tmux.sh @@ -4,18 +4,18 @@ set +x FAILED=0 -rm -rf tests/vterm -mkdir tests/vterm -mkdir tests/vterm/path +rm -rf tests/vterm_tmux +mkdir tests/vterm_tmux +mkdir tests/vterm_tmux/path -ln -s "$(which "${PYTHON}")" tests/vterm/path/python -ln -s "$(which bash)" tests/vterm/path -ln -s "$(which env)" tests/vterm/path -ln -s "$(which cut)" tests/vterm/path -ln -s "$PWD/scripts/powerline-render" tests/vterm/path -ln -s "$PWD/scripts/powerline-config" tests/vterm/path +ln -s "$(which "${PYTHON}")" tests/vterm_tmux/path/python +ln -s "$(which bash)" tests/vterm_tmux/path +ln -s "$(which env)" tests/vterm_tmux/path +ln -s "$(which cut)" tests/vterm_tmux/path +ln -s "$PWD/scripts/powerline-render" tests/vterm_tmux/path +ln -s "$PWD/scripts/powerline-config" tests/vterm_tmux/path -cp -r tests/terminfo tests/vterm +cp -r tests/terminfo tests/vterm_tmux FAIL_SUMMARY="" @@ -28,7 +28,7 @@ test_tmux() { if ! which "${POWERLINE_TMUX_EXE}" ; then return 0 fi - ln -sf "$(which "${POWERLINE_TMUX_EXE}")" tests/vterm/path + ln -sf "$(which "${POWERLINE_TMUX_EXE}")" tests/vterm_tmux/path f=tests/test_in_vterm/test_tmux.py if ! "${PYTHON}" $f ; then echo "Failed vterm test $f" @@ -49,7 +49,7 @@ fi if test $FAILED -eq 0 ; then echo "$FAIL_SUMMARY" - rm -rf tests/vterm + rm -rf tests/vterm_tmux fi exit $FAILED From b7bca615afd8e56c7c7afe2822e72687743d891d Mon Sep 17 00:00:00 2001 From: Foo Date: Sat, 22 Aug 2015 17:18:35 +0300 Subject: [PATCH 2/3] Use tests/common.sh for reporting test failures --- tests/common.sh | 33 +++++++++++++++++++++++++ tests/run_daemon_tests.sh | 23 +++++++++-------- tests/run_lint_tests.sh | 11 ++++++--- tests/run_python_tests.sh | 12 ++++++--- tests/run_vim_tests.sh | 16 ++++++------ tests/run_vterm_tests.sh | 19 +++++++++------ tests/test.sh | 19 ++++++++++----- tests/test_in_vterm/test_tmux.sh | 17 ++++++------- tests/test_shells/test.sh | 42 +++++++++++--------------------- 9 files changed, 114 insertions(+), 78 deletions(-) create mode 100644 tests/common.sh diff --git a/tests/common.sh b/tests/common.sh new file mode 100644 index 00000000..0b555162 --- /dev/null +++ b/tests/common.sh @@ -0,0 +1,33 @@ +. tests/bot-ci/scripts/common/main.sh +set +x + +: ${PYTHON:=python} + +FAILED=0 + +FAIL_SUMMARY="" + +enter_suite() { + local suite_name="$1" + export POWERLINE_CURRENT_SUITE="${POWERLINE_CURRENT_SUITE}/$suite_name" +} + +exit_suite() { + if test $FAILED -ne 0 ; then + echo "Suite ${POWERLINE_CURRENT_SUITE} failed, summary:" + echo "${FAIL_SUMMARY}" + fi + export POWERLINE_CURRENT_SUITE="${POWERLINE_CURRENT_SUITE%/*}" + exit $FAILED +} + +fail() { + local test_name="$1" + local fail_char="$2" + local message="$3" + local full_msg="$fail_char $POWERLINE_CURRENT_SUITE|$test_name :: $message" + FAIL_SUMMARY="${FAIL_SUMMARY}${NL}${full_msg}" + echo "Failed: $full_msg" + echo "$full_msg" >> tests/failures + FAILED=1 +} diff --git a/tests/run_daemon_tests.sh b/tests/run_daemon_tests.sh index e42a3bc8..af68eacf 100755 --- a/tests/run_daemon_tests.sh +++ b/tests/run_daemon_tests.sh @@ -1,5 +1,8 @@ #!/bin/sh -FAILED=0 +. tests/common.sh + +enter_suite daemon + export ADDRESS="powerline-ipc-test-$$" echo "Powerline address: $ADDRESS" if $PYTHON scripts/powerline-daemon -s$ADDRESS ; then @@ -8,16 +11,14 @@ if $PYTHON scripts/powerline-daemon -s$ADDRESS ; then $PYTHON client/powerline.py --socket $ADDRESS -p/dev/null shell left | \ grep 'file not found' ) ; then - echo "-p/dev/null argument ignored or not treated properly" - FAILED=1 + fail "devnull" F "-p/dev/null argument ignored or not treated properly" fi if ( \ $PYTHON client/powerline.py --socket $ADDRESS \ -p$PWD/powerline/config_files shell left | \ grep 'file not found' ) ; then - echo "-p/dev/null argument remembered while it should not" - FAILED=1 + fail "nodevnull" F "-p/dev/null argument remembered while it should not" fi if ! ( \ cd tests && \ @@ -25,17 +26,15 @@ if $PYTHON scripts/powerline-daemon -s$ADDRESS ; then -p$PWD/../powerline/config_files shell left | \ grep 'tests' ) ; then - echo "Output lacks string “tests”" - FAILED=1 + fail "segment" F "Output lacks string “tests”" fi else - echo "Daemon exited with status $?" - FAILED=1 + fail "exitcode" E "Daemon exited with status $?" fi if $PYTHON scripts/powerline-daemon -s$ADDRESS -k ; then : else - echo "powerline-daemon -k failed with exit code $?" - FAILED=1 + fail "-k" F "powerline-daemon -k failed with exit code $?" fi -exit $FAILED + +exit_suite diff --git a/tests/run_lint_tests.sh b/tests/run_lint_tests.sh index 09157910..585e7a03 100755 --- a/tests/run_lint_tests.sh +++ b/tests/run_lint_tests.sh @@ -1,7 +1,10 @@ #!/bin/sh -FAILED=0 +. tests/common.sh + +enter_suite lint + if ! ${PYTHON} scripts/powerline-lint -p powerline/config_files ; then - echo "Failed powerline-lint" - FAILED=1 + fail "test" F "Running powerline-lint failed" fi -exit $FAILED + +exit_suite diff --git a/tests/run_python_tests.sh b/tests/run_python_tests.sh index 62eac30a..f5524142 100755 --- a/tests/run_python_tests.sh +++ b/tests/run_python_tests.sh @@ -1,9 +1,13 @@ #!/bin/sh -FAILED=0 +. tests/common.sh + +enter_suite python + for file in tests/test_*.py ; do + test_name="${file##*/test_}" if ! ${PYTHON} $file --verbose --catch ; then - echo "Failed test(s) from $file" - FAILED=1 + fail "${test_name%.py}" F "Failed test(s) from $file" fi done -exit $FAILED + +exit_suite diff --git a/tests/run_vim_tests.sh b/tests/run_vim_tests.sh index 9d967bd9..c32831db 100755 --- a/tests/run_vim_tests.sh +++ b/tests/run_vim_tests.sh @@ -1,6 +1,7 @@ #!/bin/sh -. tests/bot-ci/scripts/common/main.sh -FAILED=0 +. tests/common.sh + +enter_suite vim if test -z "$VIM" ; then if test -n "$USE_UCS2_PYTHON" ; then @@ -42,28 +43,29 @@ export POWERLINE_THEME_OVERRIDES='default.segments.left=[]' test_script() { local vim="$1" local script="$2" + local test_name_prefix="$3" echo "Running script $script with $vim" if ! test -e "$vim" ; then return 0 fi if ! "$vim" -u NONE -S $script || test -f message.fail ; then - echo "Failed script $script run with $VIM" >&2 + local test_name="$test_name_prefix-${script##*/}" + fail "${test_name%.vim}" F "Failed script $script run with $VIM" cat message.fail >&2 rm message.fail - FAILED=1 fi } for script in tests/test_*.vim ; do if test "${script%.old.vim}" = "${script}" ; then - test_script "$NEW_VIM" "$script" + test_script "$NEW_VIM" "$script" new fi done if test -e "$OLD_VIM" ; then for script in tests/test_*.old.vim ; do - test_script "$OLD_VIM" "$script" + test_script "$OLD_VIM" "$script" old done fi -exit $FAILED +exit_suite diff --git a/tests/run_vterm_tests.sh b/tests/run_vterm_tests.sh index 1368ba66..c918ba32 100755 --- a/tests/run_vterm_tests.sh +++ b/tests/run_vterm_tests.sh @@ -1,8 +1,13 @@ #!/bin/sh -set -e -FAILED=0 -if ! sh tests/test_in_vterm/test_tmux.sh ; then - echo "Failed vterm" - FAILED=1 -fi -exit $FAILED +. tests/common.sh + +enter_suite vterm + +for t in tests/test_in_vterm/test_*.sh ; do + test_name="${t##*/test_}" + if ! sh "$t" ; then + fail "${test_name%.sh}" F "Failed running $t" + fi +done + +exit_suite diff --git a/tests/test.sh b/tests/test.sh index e2e69dc0..68bd9310 100755 --- a/tests/test.sh +++ b/tests/test.sh @@ -1,13 +1,13 @@ #!/bin/bash -. tests/bot-ci/scripts/common/main.sh +. tests/common.sh + +enter_suite root : ${USER:=`id -un`} : ${HOME:=`getent passwd $USER | cut -d: -f6`} export USER HOME -FAILED=0 - if test "$TRAVIS" = true ; then export PATH="$HOME/opt/fish/bin:${PATH}" export PATH="$PWD/tests/bot-ci/deps/rc:$PATH" @@ -34,9 +34,16 @@ fi export PYTHON="${PYTHON:=python}" export PYTHONPATH="${PYTHONPATH}${PYTHONPATH:+:}`realpath .`" for script in tests/run_*_tests.sh ; do + test_name="${script##*/run_}" if ! sh $script ; then - echo "Failed $script" - FAILED=1 + fail "${test_name%_tests.sh}" F "Failed $script" fi done -exit $FAILED + +if test -e tests/failures ; then + echo "Some tests failed. Summary:" + cat tests/failures + rm tests/failures +fi + +exit_suite diff --git a/tests/test_in_vterm/test_tmux.sh b/tests/test_in_vterm/test_tmux.sh index a881485f..c62ce530 100755 --- a/tests/test_in_vterm/test_tmux.sh +++ b/tests/test_in_vterm/test_tmux.sh @@ -1,8 +1,7 @@ #!/bin/sh -. tests/bot-ci/scripts/common/main.sh -set +x +. tests/common.sh -FAILED=0 +enter_suite tmux rm -rf tests/vterm_tmux mkdir tests/vterm_tmux @@ -17,8 +16,6 @@ ln -s "$PWD/scripts/powerline-config" tests/vterm_tmux/path cp -r tests/terminfo tests/vterm_tmux -FAIL_SUMMARY="" - test_tmux() { if test "$PYTHON_IMPLEMENTATION" = PyPy; then # FIXME PyPy3 segfaults for some reason, PyPy does it as well, but @@ -31,9 +28,8 @@ test_tmux() { ln -sf "$(which "${POWERLINE_TMUX_EXE}")" tests/vterm_tmux/path f=tests/test_in_vterm/test_tmux.py if ! "${PYTHON}" $f ; then - echo "Failed vterm test $f" - FAILED=1 - FAIL_SUMMARY="$FAIL_SUMMARY${NL}F $POWERLINE_TMUX_EXE $f" + local test_name="$("$POWERLINE_TMUX_EXE" -V 2>&1 | cut -d' ' -f2)" + fail "$test_name" F "Failed vterm test $f" fi } @@ -48,8 +44,9 @@ else fi if test $FAILED -eq 0 ; then - echo "$FAIL_SUMMARY" rm -rf tests/vterm_tmux +else + echo "$FAIL_SUMMARY" fi -exit $FAILED +exit_suite diff --git a/tests/test_shells/test.sh b/tests/test_shells/test.sh index 0663a6fa..8abc8532 100755 --- a/tests/test_shells/test.sh +++ b/tests/test_shells/test.sh @@ -1,10 +1,8 @@ #!/bin/sh -. tests/bot-ci/scripts/common/main.sh -set +x +. tests/common.sh + +enter_suite shells -: ${PYTHON:=python} -FAIL_SUMMARY="" -FAILED=0 if test "x$1" = "x--fast" ; then FAST=1 shift @@ -285,9 +283,7 @@ check_test_client() { esac expected_mime_type="${expected_mime_type%/*}" if test "$expected_mime_type" != "$actual_mime_type" ; then - echo "Expected $executable to have MIME type $expected_mime_type, but got $actual_mime_type" - FAILED=1 - FAIL_SUMMARY="${FAIL_SUMMARY}${NL}M ${executable}" + fail "MIME-$executable" "M" "Expected $executable to have MIME type $expected_mime_type, but got $actual_mime_type" fi } @@ -382,8 +378,7 @@ if test -z "${ONLY_SHELL}" || test "x${ONLY_SHELL%sh}" != "x${ONLY_SHELL}" || te fi echo ">>> $(readlink "tests/shell/path/$SH")" if ! run_test $TEST_TYPE $TEST_CLIENT $TEST_COMMAND ; then - FAILED=1 - FAIL_SUMMARY="${FAIL_SUMMARY}${NL}T ${TEST_TYPE} ${TEST_CLIENT} ${TEST_COMMAND}" + fail "$SH-$TEST_TYPE-$TEST_CLIENT:test" F "Failed checking $TEST_COMMAND" fi done done @@ -395,8 +390,7 @@ if test -z "${ONLY_SHELL}" || test "x${ONLY_SHELL%sh}" != "x${ONLY_SHELL}" || te echo "Daemon log:" echo '============================================================' cat tests/shell/daemon_log - FAILED=1 - FAIL_SUMMARY="${FAIL_SUMMARY}${NL}L ${TEST_TYPE} ${TEST_CLIENT} ${TEST_COMMAND}" + fail "$SH-$TEST_TYPE-$TEST_CLIENT:log" E "Non-empty daemon log for ${TEST_COMMAND}" fi fi done @@ -406,9 +400,7 @@ if $PYTHON scripts/powerline-daemon -s$ADDRESS > tests/shell/daemon_log_2 2>&1 ; sleep 1 $PYTHON scripts/powerline-daemon -s$ADDRESS -k else - echo "Daemon exited with status $?" - FAILED=1 - FAIL_SUMMARY="${FAIL_SUMMARY}${NL}D" + fail "daemon:run" F "Daemon exited with status $?" fi if ! test -z "$(cat tests/shell/daemon_log_2)" ; then @@ -416,8 +408,7 @@ if ! test -z "$(cat tests/shell/daemon_log_2)" ; then echo "Daemon log (2nd):" echo '============================================================' cat tests/shell/daemon_log_2 - FAILED=1 - FAIL_SUMMARY="${FAIL_SUMMARY}${NL}L" + fail "daemon:log" E "Daemon run with non-empty log" fi if ( test "x${ONLY_SHELL}" = "x" || test "x${ONLY_SHELL}" = "xzsh" ) \ @@ -425,8 +416,7 @@ if ( test "x${ONLY_SHELL}" = "x" || test "x${ONLY_SHELL}" = "xzsh" ) \ && zsh tests/test_shells/zsh_test_script.zsh 2>/dev/null; then echo "> zpython" if ! run_test zpython zpython zsh -f -i ; then - FAILED=1 - FAIL_SUMMARY="${FAIL_SUMMARY}${NL}T zpython zsh -f -i" + fail "zsh-zpython:test" F "Failed checking zsh -f -i" fi fi @@ -435,8 +425,7 @@ if test "x${ONLY_SHELL}" = "x" || test "x${ONLY_SHELL}" = "xpdb" ; then if test "x${ONLY_TEST_TYPE}" = "x" || test "x${ONLY_TEST_TYPE}" = "xsubclass" ; then echo "> pdb subclass" if ! run_test subclass python $PDB_PYTHON "$PWD/tests/test_shells/pdb-main.py" ; then - FAILED=1 - FAIL_SUMMARY="${FAIL_SUMMARY}${NL}T pdb $PDB_PYTHON $PWD/tests/test_shells/pdb-main.py" + fail "pdb-subclass:test" F "Failed checking $PDB_PYTHON $PWD/tests/test_shells/pdb-main.py" fi fi if test "x${ONLY_TEST_TYPE}" = "x" || test "x${ONLY_TEST_TYPE}" = "xmodule" ; then @@ -446,8 +435,7 @@ if test "x${ONLY_SHELL}" = "x" || test "x${ONLY_SHELL}" = "xpdb" ; then MODULE="powerline.bindings.pdb.__main__" fi if ! run_test module python $PDB_PYTHON -m$MODULE "$PWD/tests/test_shells/pdb-script.py" ; then - FAILED=1 - FAIL_SUMMARY="${FAIL_SUMMARY}${NL}T pdb $PDB_PYTHON -m$MODULE $PWD/tests/test_shells/pdb-script" + fail "pdb-module:test" F "Failed checking $PDB_PYTHON -m$MODULE $PWD/tests/test_shells/pdb-script" fi fi fi @@ -460,8 +448,7 @@ if test "x${ONLY_SHELL}" = "x" || test "x${ONLY_SHELL}" = "xipython" ; then export POWERLINE_THEME_OVERRIDES='in.segments.left=[]' echo "> ipython" if ! run_test ipython ipython ${IPYTHON_PYTHON} -mIPython ; then - FAILED=1 - FAIL_SUMMARY="${FAIL_SUMMARY}${NL}T ipython" + fail "ipython:test" F "Failed checking ${IPYTHON_PYTHON} -mIPython" fi unset POWERLINE_THEME_OVERRIDES unset POWERLINE_CONFIG_OVERRIDES @@ -470,7 +457,6 @@ fi if test $FAILED -eq 0 ; then rm -r tests/shell -else - echo "${FAIL_SUMMARY}" fi -exit $FAILED + +exit_suite From 959693fa9707e3aff27baf20475c4e4221eb571b Mon Sep 17 00:00:00 2001 From: Foo Date: Sat, 22 Aug 2015 17:44:57 +0300 Subject: [PATCH 3/3] Temporary fix for failing zsh tests --- tests/test_shells/postproc.py | 6 ++- tests/test_shells/zsh.daemon.ok | 86 +++++++++++++++---------------- tests/test_shells/zsh.nodaemon.ok | 86 +++++++++++++++---------------- 3 files changed, 91 insertions(+), 87 deletions(-) diff --git a/tests/test_shells/postproc.py b/tests/test_shells/postproc.py index 0e7f0923..9b2a19a3 100755 --- a/tests/test_shells/postproc.py +++ b/tests/test_shells/postproc.py @@ -30,6 +30,7 @@ user = os.environ['USER'] REFS_RE = re.compile(r'^\[\d+ refs\]\n') IPYPY_DEANSI_RE = re.compile(r'\033(?:\[(?:\?\d+[lh]|[^a-zA-Z]+[a-ln-zA-Z])|[=>])') +ZSH_HL_RE = re.compile(r'\033\[\?\d+[hl]') start_str = 'cd tests/shell/3rd' if shell == 'pdb': @@ -55,7 +56,10 @@ with codecs.open(fname, 'r', encoding='utf-8') as R: line = line.replace(user, 'USER') if pid is not None: line = line.replace(pid, 'PID') - if shell == 'fish': + if shell == 'zsh': + line = line.replace('\033[0m\033[23m\033[24m\033[J', '') + line = ZSH_HL_RE.subn('', line)[0] + elif shell == 'fish': res = '' try: while line.index('\033[0;'): diff --git a/tests/test_shells/zsh.daemon.ok b/tests/test_shells/zsh.daemon.ok index daf415dc..ae8682e4 100644 --- a/tests/test_shells/zsh.daemon.ok +++ b/tests/test_shells/zsh.daemon.ok @@ -1,52 +1,52 @@ -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  cd .git -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  .git  cd .. -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV="/home/USER/.virtenvs/some-virtual-environment" -  HOSTNAME  USER  ⓔ  some-virtual-environment   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV= -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  bgscript.sh & waitpid.sh +  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  cd .git +  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  .git  cd .. +  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV="/home/USER/.virtenvs/some-virtual-environment" +  HOSTNAME  USER  ⓔ  some-virtual-environment   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV= +  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  bgscript.sh & waitpid.sh [1] PID -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  false -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  1  kill `cat pid` ; sleep 1s +  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  false +  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  1  kill `cat pid` ; sleep 1s [1] + terminated bgscript.sh -  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]' -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  #[bold]  cd ../'(echo)' -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  (echo)  cd ../'$(echo)' -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  $(echo)  cd ../'`echo`' -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  `echo`  cd ../'«Unicode!»' -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  «Unicode!»  cd .. -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  bindkey -v ; set_theme default - INSERT   HOSTNAME  USER  ⋯  tests  shell  3rd   COMMND   HOSTNAME  USER  ⋯  tests  shell  3rd   - INSERT   HOSTNAME  USER  ⋯  tests  shell  3rd   - INSERT   HOSTNAME  USER  ⋯  tests  shell  3rd  echo abc +  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]' +  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  #[bold]  cd ../'(echo)' +  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  (echo)  cd ../'$(echo)' +  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  $(echo)  cd ../'`echo`' +  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  `echo`  cd ../'«Unicode!»' +  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  «Unicode!»  cd .. +  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  bindkey -v ; set_theme default + INSERT   HOSTNAME  USER  ⋯  tests  shell  3rd   COMMND   HOSTNAME  USER  ⋯  tests  shell  3rd   + INSERT   HOSTNAME  USER  ⋯  tests  shell  3rd   + INSERT   HOSTNAME  USER  ⋯  tests  shell  3rd  echo abc abc - INSERT   HOSTNAME  USER  ⋯  tests  shell  3rd  false - INSERT   HOSTNAME  USER  ⋯  tests  shell  3rd  set_theme_option default.segment_data.hostname.display false - INSERT  USER  ⋯  tests  shell  3rd  set_theme_option default.segment_data.user.display false - INSERT  ⋯  tests  shell  3rd  select abc in def ghi jkl - select                            do - select                             echo $abc - select                             break - select                            done + INSERT   HOSTNAME  USER  ⋯  tests  shell  3rd  false + INSERT   HOSTNAME  USER  ⋯  tests  shell  3rd  set_theme_option default.segment_data.hostname.display false + INSERT  USER  ⋯  tests  shell  3rd  set_theme_option default.segment_data.user.display false + INSERT  ⋯  tests  shell  3rd  select abc in def ghi jkl + select                            do + select                             echo $abc + select                             break + select                            done 1) def 2) ghi 3) jkl -                   Select variant  1 +                   Select variant  1 def - INSERT  ⋯  tests  shell  3rd  cd . - INSERT  ⋯  tests  shell  3rd  cd . - INSERT  ⋯  tests  shell  3rd  set_theme_option default.segments.above "$ABOVE_LEFT" - INSERT  ⋯  tests  shell  3rd  export DISPLAYED_ENV_VAR=foo - foo   - INSERT  ⋯  tests  shell  3rd  unset DISPLAYED_ENV_VAR - INSERT  ⋯  tests  shell  3rd  set_theme_option default.segments.above "$ABOVE_FULL" -                                                                                                                                                                                                                                                                                                            + INSERT  ⋯  tests  shell  3rd  cd . + INSERT  ⋯  tests  shell  3rd  cd . + INSERT  ⋯  tests  shell  3rd  set_theme_option default.segments.above "$ABOVE_LEFT"  INSERT  ⋯  tests  shell  3rd  export DISPLAYED_ENV_VAR=foo -                                                                                                                                                                                                                                                                                                      foo  + foo    INSERT  ⋯  tests  shell  3rd  unset DISPLAYED_ENV_VAR -                                                                                                                                                                                                                                                                                                            + INSERT  ⋯  tests  shell  3rd  set_theme_option default.segments.above "$ABOVE_FULL" +                                                                                                                                                                                                                                                                                                            + INSERT  ⋯  tests  shell  3rd  export DISPLAYED_ENV_VAR=foo +                                                                                                                                                                                                                                                                                                      foo  + INSERT  ⋯  tests  shell  3rd  unset DISPLAYED_ENV_VAR +                                                                                                                                                                                                                                                                                                             INSERT  ⋯  tests  shell  3rd  set_theme_option default.segments.above - INSERT  ⋯  tests  shell  3rd  hash -d foo=$PWD:h ; cd . - INSERT  ~foo  3rd  set_theme_option default.dividers.left.hard \$ABC - INSERT $ABC~foo  3rd $ABCtrue + INSERT  ⋯  tests  shell  3rd  hash -d foo=$PWD:h ; cd . + INSERT  ~foo  3rd  set_theme_option default.dividers.left.hard \$ABC + INSERT $ABC~foo  3rd $ABCtrue diff --git a/tests/test_shells/zsh.nodaemon.ok b/tests/test_shells/zsh.nodaemon.ok index 6a813f93..ce35d952 100644 --- a/tests/test_shells/zsh.nodaemon.ok +++ b/tests/test_shells/zsh.nodaemon.ok @@ -1,52 +1,52 @@ -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  cd .git -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  .git  cd .. -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV="/home/USER/.virtenvs/some-virtual-environment" -  HOSTNAME  USER  ⓔ  some-virtual-environment   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV= -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  bgscript.sh & waitpid.sh +  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  cd .git +  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  .git  cd .. +  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV="/home/USER/.virtenvs/some-virtual-environment" +  HOSTNAME  USER  ⓔ  some-virtual-environment   BRANCH  ⋯  tests  shell  3rd  VIRTUAL_ENV= +  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  bgscript.sh & waitpid.sh [1] PID -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  false -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  1  kill `cat pid` ; sleep 1s +  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  false +  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  1  kill `cat pid` ; sleep 1s [1] + terminated bgscript.sh -  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]' -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  #[bold]  cd ../'(echo)' -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  (echo)  cd ../'$(echo)' -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  $(echo)  cd ../'`echo`' -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  `echo`  cd ../'«Unicode!»' -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  «Unicode!»  cd .. -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  bindkey -v ; set_theme default - INSERT   HOSTNAME  USER  ⋯  tests  shell  3rd   COMMND   HOSTNAME  USER  ⋯  tests  shell  3rd   - INSERT   HOSTNAME  USER  ⋯  tests  shell  3rd   - INSERT   HOSTNAME  USER  ⋯  tests  shell  3rd  echo abc +  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]' +  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  #[bold]  cd ../'(echo)' +  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  (echo)  cd ../'$(echo)' +  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  $(echo)  cd ../'`echo`' +  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  `echo`  cd ../'«Unicode!»' +  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  «Unicode!»  cd .. +  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  bindkey -v ; set_theme default + INSERT   HOSTNAME  USER  ⋯  tests  shell  3rd   COMMND   HOSTNAME  USER  ⋯  tests  shell  3rd   + INSERT   HOSTNAME  USER  ⋯  tests  shell  3rd   + INSERT   HOSTNAME  USER  ⋯  tests  shell  3rd  echo abc abc - INSERT   HOSTNAME  USER  ⋯  tests  shell  3rd  false - INSERT   HOSTNAME  USER  ⋯  tests  shell  3rd  set_theme_option default.segment_data.hostname.display false - INSERT  USER  ⋯  tests  shell  3rd  set_theme_option default.segment_data.user.display false - INSERT  ⋯  tests  shell  3rd  select abc in def ghi jkl - select  do - select   echo $abc - select   break - select  done + INSERT   HOSTNAME  USER  ⋯  tests  shell  3rd  false + INSERT   HOSTNAME  USER  ⋯  tests  shell  3rd  set_theme_option default.segment_data.hostname.display false + INSERT  USER  ⋯  tests  shell  3rd  set_theme_option default.segment_data.user.display false + INSERT  ⋯  tests  shell  3rd  select abc in def ghi jkl + select  do + select   echo $abc + select   break + select  done 1) def 2) ghi 3) jkl - Select variant  1 + Select variant  1 def - INSERT  ⋯  tests  shell  3rd  cd . - INSERT  ⋯  tests  shell  3rd  cd . - INSERT  ⋯  tests  shell  3rd  set_theme_option default.segments.above "$ABOVE_LEFT" - INSERT  ⋯  tests  shell  3rd  export DISPLAYED_ENV_VAR=foo - foo   - INSERT  ⋯  tests  shell  3rd  unset DISPLAYED_ENV_VAR - INSERT  ⋯  tests  shell  3rd  set_theme_option default.segments.above "$ABOVE_FULL" -                                                                                                                                                                                                                                                                                                            + INSERT  ⋯  tests  shell  3rd  cd . + INSERT  ⋯  tests  shell  3rd  cd . + INSERT  ⋯  tests  shell  3rd  set_theme_option default.segments.above "$ABOVE_LEFT"  INSERT  ⋯  tests  shell  3rd  export DISPLAYED_ENV_VAR=foo -                                                                                                                                                                                                                                                                                                      foo  + foo    INSERT  ⋯  tests  shell  3rd  unset DISPLAYED_ENV_VAR -                                                                                                                                                                                                                                                                                                            + INSERT  ⋯  tests  shell  3rd  set_theme_option default.segments.above "$ABOVE_FULL" +                                                                                                                                                                                                                                                                                                            + INSERT  ⋯  tests  shell  3rd  export DISPLAYED_ENV_VAR=foo +                                                                                                                                                                                                                                                                                                      foo  + INSERT  ⋯  tests  shell  3rd  unset DISPLAYED_ENV_VAR +                                                                                                                                                                                                                                                                                                             INSERT  ⋯  tests  shell  3rd  set_theme_option default.segments.above - INSERT  ⋯  tests  shell  3rd  hash -d foo=$PWD:h ; cd . - INSERT  ~foo  3rd  set_theme_option default.dividers.left.hard \$ABC - INSERT $ABC~foo  3rd $ABCtrue + INSERT  ⋯  tests  shell  3rd  hash -d foo=$PWD:h ; cd . + INSERT  ~foo  3rd  set_theme_option default.dividers.left.hard \$ABC + INSERT $ABC~foo  3rd $ABCtrue