Skip to content

Commit

Permalink
Bash/R: Add test making sure port4me --prepend=2000-2009 --include=1-…
Browse files Browse the repository at this point in the history
…1023 returns 2000
  • Loading branch information
HenrikBengtsson committed Jan 11, 2024
1 parent a7318b5 commit 7eea126
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions bash/tests/port4me.bats
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,14 @@ setup() {
[[ ${port} -le 1023 ]]
}

@test "<CLI call> --user=alice --prepend=2000-2009 --include=1-1023 returns 2000" {
local -i port
export _PORT4ME_CHECK_AVAILABLE_PORTS_=any
run "${cli_call[@]}" --user=alice --prepend=2000-2009 --include=1-1023
assert_success
assert_output "2000"
}

@test "<CLI call> --user=alice --tool=jupyter-notebook" {
export _PORT4ME_CHECK_AVAILABLE_PORTS_=any
run "${cli_call[@]}" --user=alice --tool=jupyter-notebook
Expand Down
8 changes: 8 additions & 0 deletions r/tests/port4me.bats
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,14 @@ setup() {
[[ ${port} -le 1023 ]]
}

@test "<CLI call> --user=alice --prepend=2000-2009 --include=1-1023 returns 2000" {
local -i port
export _PORT4ME_CHECK_AVAILABLE_PORTS_=any
run "${cli_call[@]}" --user=alice --prepend=2000-2009 --include=1-1023
assert_success
assert_output "2000"
}

@test "<CLI call> --user=alice --tool=jupyter-notebook" {
export _PORT4ME_CHECK_AVAILABLE_PORTS_=any
run "${cli_call[@]}" --user=alice --tool=jupyter-notebook
Expand Down

0 comments on commit 7eea126

Please sign in to comment.