Skip to content

Commit

Permalink
add dir to / that will match $e1
Browse files Browse the repository at this point in the history
  • Loading branch information
ghthor committed Feb 23, 2024
1 parent 25a6e44 commit a66c58d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/lib/git/shell_shortcuts_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ oneTimeSetUp() {
# Test already wrapped commands
alias cat="exec_scmb_expand_args $cat_path"

sudo mkdir /aaa

# Run shortcut wrapping
source "$scmbDir/lib/git/shell_shortcuts.sh"

Expand Down Expand Up @@ -142,11 +144,13 @@ test_ls_with_file_shortcuts() {

# Files under the root directory
assertTrue 'Shortcuts under /' 'ls_with_file_shortcuts / >/dev/null && [[ $e1 =~ ^/[^/]+$ ]]'

ls_with_file_shortcuts /
assertTrue "$e1 == /bin" '[[ "$e1" == "/bin" ]]'
assertTrue "$e1 == /aaa" '[[ "$e1" == "/aaa" ]]'

cd -
rm -r "$TEST_DIR" "$temp_file"
sudo rmdir /aaa
}

# load and run shUnit2
Expand Down

0 comments on commit a66c58d

Please sign in to comment.