From 28aee92c517d5e8758a47dc7543ba19aeca6f6b8 Mon Sep 17 00:00:00 2001 From: ZyX Date: Sat, 2 Aug 2014 21:56:37 +0400 Subject: [PATCH] Fix zsh daemon tests: disable hostname and user before testing select Reason: hostname and user do not have stable width and select prompt width with daemon depends on previous prompt width. --- tests/test_shells/input.zsh | 16 ++++++++------ tests/test_shells/zsh.daemon.ok | Bin 11672 -> 11878 bytes tests/test_shells/{zsh.ok => zsh.nodaemon.ok} | 20 ++++++++++-------- 3 files changed, 20 insertions(+), 16 deletions(-) rename tests/test_shells/{zsh.ok => zsh.nodaemon.ok} (90%) diff --git a/tests/test_shells/input.zsh b/tests/test_shells/input.zsh index 952ee756..51095f5f 100644 --- a/tests/test_shells/input.zsh +++ b/tests/test_shells/input.zsh @@ -1,4 +1,4 @@ -unsetopt promptsp transientrprompt +unsetopt promptsp notransientrprompt setopt interactivecomments # POWERLINE_CONFIG_PATH=$PWD/powerline/config_files # POWERLINE_THEME_CONFIG=( default_leftonly.segment_data.hostname.args.only_if_ssh=false ) @@ -16,12 +16,6 @@ VIRTUAL_ENV="$HOME/.virtenvs/some-virtual-environment" VIRTUAL_ENV= bash -c 'echo $$>pid ; while true ; do sleep 0.1s ; done' & false -select abc in def ghi jkl -do - echo $abc - break -done -1 kill `cat pid` ; sleep 1s cd "$DIR1" cd ../"$DIR2" @@ -37,5 +31,13 @@ POWERLINE_COMMAND=( $POWERLINE_COMMAND[1,4] ${${POWERLINE_COMMAND[5]}/_leftonly} echo abc false +POWERLINE_COMMAND=( $POWERLINE_COMMAND -t default.segment_data.hostname.display=false ) +POWERLINE_COMMAND=( $POWERLINE_COMMAND -t default.segment_data.user.display=false ) +select abc in def ghi jkl +do + echo $abc + break +done +1 true is the last line exit diff --git a/tests/test_shells/zsh.daemon.ok b/tests/test_shells/zsh.daemon.ok index 3e4000aed992ae14f684fbc9e44e4f914e4d5377..7469e23b61ee6790cceceee1aa8a298fed046535 100644 GIT binary patch delta 203 zcmbOc{VZm~eBRAlg&#{!uI6r;yg>8Ifxv6<2@hOQV ziFz6N#U*)(xv6?7nZ*S;iIui#i8;lo3YwD-GRjP@7U5+&v|ux%HV-4n6kVLAloqEJ zVVDreFFWxLH_(8|2Q@EGp3j>4agI1L@IKpL|Ov8Lxb_Zag0OCfss5T$7FT YOg0~4lxLi*z}P)mpWAKoeBQ^B0Eapid ; while true ; do sleep 0.1s ; done' & [1] PID   HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  false -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  1  select abc in def ghi jkl - select  do - select   echo $abc - select   break - select  done -1) def 2) ghi 3) jkl - Select variant  1 -def -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1  kill `cat pid` ; sleep 1s +  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 "$DIR1"   HOSTNAME  USER   BRANCH  ⋯  shell  3rd  ^[[32m  cd ../"$DIR2" @@ -31,3 +23,13 @@ def  INSERT   HOSTNAME  USER  ⋯  tests  shell  3rd  echo abc abc  INSERT   HOSTNAME  USER  ⋯  tests  shell  3rd  false + INSERT   HOSTNAME  USER  ⋯  tests  shell  3rd  POWERLINE_COMMAND=( $POWERLINE_COMMAND -t default.segment_data.hostname.display=false ) + INSERT  USER  ⋯  tests  shell  3rd  POWERLINE_COMMAND=( $POWERLINE_COMMAND -t 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 +def