diff --git a/tests/test_shells/postproc.py b/tests/test_shells/postproc.py index 9696b5b9..2da1fbc7 100755 --- a/tests/test_shells/postproc.py +++ b/tests/test_shells/postproc.py @@ -41,4 +41,11 @@ with codecs.open(fname, 'r', encoding='utf-8') as R: line = line[start : end+4] + '\n' except ValueError: line = '' + elif shell == 'tcsh': + try: + start = line.index('\033[0;') + end = line.index(' ', start) + line = line[start : end] + '\033[0m\n' + except ValueError: + line = '' W.write(line) diff --git a/tests/test_shells/tcsh.ok b/tests/test_shells/tcsh.ok index cea0c31a..cf87b8f9 100644 --- a/tests/test_shells/tcsh.ok +++ b/tests/test_shells/tcsh.ok @@ -1,19 +1,16 @@ - -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd    cd .git -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  .git    cd .. -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd    setenv VIRTUAL_ENV $HOME:q"/.virtenvs/some-virtual-environment" -  HOSTNAME  USER  ⓔ  some-virtual-environment   BRANCH  ⋯  tests  shell  3rd    unsetenv VIRTUAL_ENV -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd    bash -c 'echo $$>pid ; while true ; do sleep 0.1s ; done' & -[1] PID -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd    false # Warning: currently tcsh bindings do not support job count -  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  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:q -  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  ^[[32m    cd ../$DIR2:q -  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`    false +  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd   +  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  .git   +  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd   +  HOSTNAME  USER  ⓔ  some-virtual-environment   BRANCH  ⋯  tests  shell  3rd   +  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd   +  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd   +  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd  1   +  HOSTNAME  USER   BRANCH  ⋯  tests  shell  3rd   +  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  ^[[32m   +  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  ^H   +  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  \[\]   +  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  %%   +  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  #[bold]   +  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  (echo)   +  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  $(echo)   +  HOSTNAME  USER   BRANCH  ⋯  shell  3rd  `echo` 