diff options
author | Roger Gonzalez <roger@rogs.me> | 2020-07-17 09:19:06 -0300 |
---|---|---|
committer | Roger Gonzalez <roger@rogs.me> | 2020-07-17 09:19:06 -0300 |
commit | 9fe9310ccf4971f0d1976f9bdaafd04a68ea314b (patch) | |
tree | ff1d5d677d5b3c33ac7eb6252029f2a9d165d9b3 /.config/fisher/github.com/matchai/spacefish/tests/__sf_section_host.test.fish | |
parent | 743caecfc68bb6d28f8de2e80bce671e42601c6a (diff) |
Deleted fisher stuff
Diffstat (limited to '.config/fisher/github.com/matchai/spacefish/tests/__sf_section_host.test.fish')
-rw-r--r-- | .config/fisher/github.com/matchai/spacefish/tests/__sf_section_host.test.fish | 124 |
1 files changed, 0 insertions, 124 deletions
diff --git a/.config/fisher/github.com/matchai/spacefish/tests/__sf_section_host.test.fish b/.config/fisher/github.com/matchai/spacefish/tests/__sf_section_host.test.fish deleted file mode 100644 index a040226d..00000000 --- a/.config/fisher/github.com/matchai/spacefish/tests/__sf_section_host.test.fish +++ /dev/null @@ -1,124 +0,0 @@ -source $DIRNAME/spacefish_test_setup.fish - -function setup - spacefish_test_setup -end - -function teardown - if set -q SSH_CONNECTION; - set --erase SSH_CONNECTION - end -end - -test "Correctly shows hostname upon SSH connection" - ( - set SSH_CONNECTION "192.168.0.100 12345 192.168.0.101 22" - - set_color --bold - echo -n "at " - set_color normal - set_color --bold green - echo -n (hostname) - set_color normal - set_color --bold - echo -n " " - set_color normal - ) = (__sf_section_host) -end - -test "Displays user when SPACEFISH_HOST_SHOW is set to \"always\"" - ( - set SPACEFISH_HOST_SHOW always - - set_color --bold - echo -n "at " - set_color normal - set_color --bold blue - echo -n (hostname) - set_color normal - set_color --bold - echo -n " " - set_color normal - ) = (__sf_section_host) -end - -test "Displays user when SPACEFISH_HOST_SHOW is set to \"always\", over SSH" - ( - set SPACEFISH_HOST_SHOW always - set SSH_CONNECTION "192.168.0.100 12345 192.168.0.101 22" - - set_color --bold - echo -n "at " - set_color normal - set_color --bold green - echo -n (hostname) - set_color normal - set_color --bold - echo -n " " - set_color normal - ) = (__sf_section_host) -end - -test "doesn't display the section when SPACEFISH_HOST_SHOW is set to \"false\"" - ( - set SPACEFISH_HOST_SHOW false - ) = (__sf_section_host) -end - -test "Displays hostname when set different from machine name, over SSH" - ( - mock hostname \* 0 "echo \"spacefish\"" - set SSH_CONNECTION "192.168.0.100 12345 192.168.0.101 22" - - set_color --bold - echo -n "at " - set_color normal - set_color --bold green - echo -n "spacefish" - set_color normal - set_color --bold - echo -n " " - set_color normal - ) = (__sf_section_host) -end - -test "Doesn't display hostname by default, without SSH" - () = (__sf_section_host) -end - -# Color testing; magenta = pass, red = failure. -test "Test color, no SSH." - ( - set SPACEFISH_HOST_COLOR "magenta" # No SSH connection. This should display. - set SPACEFISH_HOST_COLOR_SSH "red" # If red shows, test failed. - set SPACEFISH_HOST_SHOW always - - set_color --bold - echo -n "at " - set_color normal - set_color --bold "magenta" - echo -n (hostname) - set_color normal - set_color --bold - echo -n " " - set_color normal - ) = (__sf_section_host) -end - -test "Test color, with SSH." - ( - set SPACEFISH_HOST_COLOR "red" # If red shows, test failed. - set SPACEFISH_HOST_COLOR_SSH "magenta" # SSH connection exists. This should take precedence. - set SSH_CONNECTION "192.168.0.100 12345 192.168.0.101 22" - - set_color --bold - echo -n "at " - set_color normal - set_color --bold "magenta" - echo -n (hostname) - set_color normal - set_color --bold - echo -n " " - set_color normal - ) = (__sf_section_host) -end |