Skip to content

Commit

Permalink
remove line number in test as line number can change depending on whe…
Browse files Browse the repository at this point in the history
…ther junest is in use

Signed-off-by: Tin Lai <[email protected]>
  • Loading branch information
soraxas committed Aug 24, 2023
1 parent cee7295 commit 7e9488e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/shsh-init.bats
Original file line number Diff line number Diff line change
Expand Up @@ -17,37 +17,37 @@ load test_helper
@test "exports SHSH_PREFIX" {
SHSH_PREFIX=/lol run shsh-init bash
assert_success
assert_line -n 1 'export SHSH_PREFIX="/lol"'
assert_line 'export SHSH_PREFIX="/lol"'
}

@test "exports SHSH_PACKAGES_PATH" {
SHSH_PACKAGES_PATH=/lol/packages run shsh-init bash
assert_success
assert_line -n 2 'export SHSH_PACKAGES_PATH="/lol/packages"'
assert_line 'export SHSH_PACKAGES_PATH="/lol/packages"'
}

@test "adds junest to path" {
run shsh-init bash
assert_success
assert_line -n 3 'export SHSH_JUNEST_BIN="/home/tin/.local/share/shsh/cellar/arch_junest_root/junest_bin"'
assert_line -n 4 'export PATH="$PATH:$SHSH_JUNEST_BIN"'
assert_line 'export SHSH_JUNEST_BIN="/home/tin/.local/share/shsh/cellar/arch_junest_root/junest_bin"'
assert_line 'export PATH="$PATH:$SHSH_JUNEST_BIN"'
}

@test "adds cellar/bin to path" {
run shsh-init bash
assert_success
assert_line -n 5 'export PATH="$SHSH_ROOT/cellar/bin:$PATH"'
assert_line 'export PATH="$SHSH_ROOT/cellar/bin:$PATH"'
}

@test "setup include function if it exists" {
run shsh-init bash
assert_line -n 6 '. "$SHSH_ROOT/lib/include.bash"'
assert_line '. "$SHSH_ROOT/lib/include.bash"'
}

@test "setup shsh completions if available" {
run shsh-init bash
assert_success
assert_line -n 7 '. "$SHSH_ROOT/completions/shsh.bash"'
assert_line '. "$SHSH_ROOT/completions/shsh.bash"'
}

@test "doesn't setup include function if it doesn't exist" {
Expand Down

0 comments on commit 7e9488e

Please sign in to comment.