Sha256: 3a0384d1ecda3798c5cf5f62a8c4b3c472bd2a6b5743a7eaa2d26a328438bb46

Contents?: true

Size: 564 Bytes

Versions: 92

Compression:

Stored size: 564 Bytes

Contents

#!/usr/bin/env bats

@test "correct arguments" {
  #skip
  run bash error_handling.sh Alice

  [ "$status" -eq 0 ]
  [ "$output" = "Hello, Alice" ]
}

@test "one long argument" {
  skip
  run bash error_handling.sh "Alice and Bob"

  [ "$status" -eq 0 ]
  [ "$output" = "Hello, Alice and Bob" ]
}

@test "incorrect arguments" {
  skip
  run bash error_handling.sh Alice Bob

  [ "$status" -ne 0 ]
}

@test "print usage banner with no value given" {
  skip
  run bash error_handling.sh

  [ "$status" -eq 1 ]
  [ "$output" = "Usage: ./error_handling <greetee>" ]
}

Version data entries

92 entries across 92 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/bash/exercises/error-handling/error_handling_test.sh
trackler-2.2.1.179 tracks/bash/exercises/error-handling/error_handling_test.sh
trackler-2.2.1.178 tracks/bash/exercises/error-handling/error_handling_test.sh
trackler-2.2.1.177 tracks/bash/exercises/error-handling/error_handling_test.sh
trackler-2.2.1.176 tracks/bash/exercises/error-handling/error_handling_test.sh
trackler-2.2.1.175 tracks/bash/exercises/error-handling/error_handling_test.sh
trackler-2.2.1.174 tracks/bash/exercises/error-handling/error_handling_test.sh
trackler-2.2.1.173 tracks/bash/exercises/error-handling/error_handling_test.sh
trackler-2.2.1.172 tracks/bash/exercises/error-handling/error_handling_test.sh
trackler-2.2.1.171 tracks/bash/exercises/error-handling/error_handling_test.sh
trackler-2.2.1.170 tracks/bash/exercises/error-handling/error_handling_test.sh
trackler-2.2.1.169 tracks/bash/exercises/error-handling/error_handling_test.sh
trackler-2.2.1.167 tracks/bash/exercises/error-handling/error_handling_test.sh
trackler-2.2.1.166 tracks/bash/exercises/error-handling/error_handling_test.sh
trackler-2.2.1.165 tracks/bash/exercises/error-handling/error_handling_test.sh
trackler-2.2.1.164 tracks/bash/exercises/error-handling/error_handling_test.sh
trackler-2.2.1.163 tracks/bash/exercises/error-handling/error_handling_test.sh
trackler-2.2.1.162 tracks/bash/exercises/error-handling/error_handling_test.sh
trackler-2.2.1.161 tracks/bash/exercises/error-handling/error_handling_test.sh
trackler-2.2.1.160 tracks/bash/exercises/error-handling/error_handling_test.sh