File: arguments.bats

package info (click to toggle)
pyenv 2.5.5-2
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 8,264 kB
  • sloc: sh: 4,722; python: 402; makefile: 76; ansic: 60
file content (23 lines) | stat: -rw-r--r-- 615 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env bats

load test_helper

@test "not enough arguments for python-build" {
  # use empty inline definition so nothing gets built anyway
  local definition="${TMP}/build-definition"
  echo '' > "$definition"

  run python-build "$definition"
  assert_failure
  assert_output_contains 'Usage: python-build'
}

@test "extra arguments for python-build" {
  # use empty inline definition so nothing gets built anyway
  local definition="${TMP}/build-definition"
  echo '' > "$definition"

  run python-build "$definition" "${TMP}/install" ""
  assert_failure
  assert_output_contains 'Usage: python-build'
}