Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions jury/alpha.bats
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bats

load 'jury/test_libs/bats-support-0.3.0/load.bash'
load 'jury/test_libs/bats-assert-2.2.0/load.bash'
load "$BATS_TEST_DIRNAME/test_libs/bats-support-0.3.0/load.bash"
load "$BATS_TEST_DIRNAME/test_libs/bats-assert-2.2.0/load.bash"

SCRIPT="gallery/alpha/alpha.sh"
SCRIPT="$BATS_TEST_DIRNAME/../gallery/alpha/alpha.sh"

@test "alpha: should be executable" {
assert [ -x "$SCRIPT" ]
Expand Down
3 changes: 2 additions & 1 deletion jury/assemble-the-jury.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/bash


TEST_LIBS_DIR="jury/test_libs"
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
TEST_LIBS_DIR="${SCRIPT_DIR}/test_libs"

# Create a directory for the test dependencies
mkdir -p ${TEST_LIBS_DIR}
Expand Down
6 changes: 3 additions & 3 deletions jury/bouncing.bats
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bats

load 'jury/test_libs/bats-support-0.3.0/load.bash'
load 'jury/test_libs/bats-assert-2.2.0/load.bash'
load "$BATS_TEST_DIRNAME/test_libs/bats-support-0.3.0/load.bash"
load "$BATS_TEST_DIRNAME/test_libs/bats-assert-2.2.0/load.bash"

SCRIPT="gallery/bouncing/bouncing.sh"
SCRIPT="$BATS_TEST_DIRNAME/../gallery/bouncing/bouncing.sh"

@test "bouncing: should be executable" {
assert [ -x "$SCRIPT" ]
Expand Down
6 changes: 3 additions & 3 deletions jury/cutesaver.bats
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bats

load 'jury/test_libs/bats-support-0.3.0/load.bash'
load 'jury/test_libs/bats-assert-2.2.0/load.bash'
load "$BATS_TEST_DIRNAME/test_libs/bats-support-0.3.0/load.bash"
load "$BATS_TEST_DIRNAME/test_libs/bats-assert-2.2.0/load.bash"

SCRIPT="gallery/cutesaver/cutesaver.sh"
SCRIPT="$BATS_TEST_DIRNAME/../gallery/cutesaver/cutesaver.sh"

@test "cutesaver: main script should be executable" {
assert [ -x "$SCRIPT" ]
Expand Down
6 changes: 3 additions & 3 deletions jury/fireworks.bats
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bats

load 'jury/test_libs/bats-support-0.3.0/load.bash'
load 'jury/test_libs/bats-assert-2.2.0/load.bash'
load "$BATS_TEST_DIRNAME/test_libs/bats-support-0.3.0/load.bash"
load "$BATS_TEST_DIRNAME/test_libs/bats-assert-2.2.0/load.bash"

SCRIPT="gallery/fireworks/fireworks.sh"
SCRIPT="$BATS_TEST_DIRNAME/../gallery/fireworks/fireworks.sh"

@test "fireworks: should be executable" {
assert [ -x "$SCRIPT" ]
Expand Down
4 changes: 2 additions & 2 deletions jury/library-of-voices.bats
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bats

load 'jury/test_libs/bats-support-0.3.0/load.bash'
load 'jury/test_libs/bats-assert-2.2.0/load.bash'
load "$BATS_TEST_DIRNAME/test_libs/bats-support-0.3.0/load.bash"
load "$BATS_TEST_DIRNAME/test_libs/bats-assert-2.2.0/load.bash"

setup() {
source "$(dirname "$BATS_TEST_FILENAME")/../library/library-of-voices.sh"
Expand Down
6 changes: 3 additions & 3 deletions jury/matrix.bats
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bats

load 'jury/test_libs/bats-support-0.3.0/load.bash'
load 'jury/test_libs/bats-assert-2.2.0/load.bash'
load "$BATS_TEST_DIRNAME/test_libs/bats-support-0.3.0/load.bash"
load "$BATS_TEST_DIRNAME/test_libs/bats-assert-2.2.0/load.bash"

SCRIPT="gallery/matrix/matrix.sh"
SCRIPT="$BATS_TEST_DIRNAME/../gallery/matrix/matrix.sh"

@test "matrix: should be executable" {
assert [ -x "$SCRIPT" ]
Expand Down
6 changes: 3 additions & 3 deletions jury/pipes.bats
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bats

load 'jury/test_libs/bats-support-0.3.0/load.bash'
load 'jury/test_libs/bats-assert-2.2.0/load.bash'
load "$BATS_TEST_DIRNAME/test_libs/bats-support-0.3.0/load.bash"
load "$BATS_TEST_DIRNAME/test_libs/bats-assert-2.2.0/load.bash"

SCRIPT="gallery/pipes/pipes.sh"
SCRIPT="$BATS_TEST_DIRNAME/../gallery/pipes/pipes.sh"

@test "pipes: should be executable" {
assert [ -x "$SCRIPT" ]
Expand Down
6 changes: 3 additions & 3 deletions jury/rain.bats
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bats

load 'jury/test_libs/bats-support-0.3.0/load.bash'
load 'jury/test_libs/bats-assert-2.2.0/load.bash'
load "$BATS_TEST_DIRNAME/test_libs/bats-support-0.3.0/load.bash"
load "$BATS_TEST_DIRNAME/test_libs/bats-assert-2.2.0/load.bash"

SCRIPT="gallery/rain/rain.sh"
SCRIPT="$BATS_TEST_DIRNAME/../gallery/rain/rain.sh"

@test "rain: should be executable" {
assert [ -x "$SCRIPT" ]
Expand Down
4 changes: 2 additions & 2 deletions jury/spread-the-word.bats
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bats

load 'jury/test_libs/bats-support-0.3.0/load.bash'
load 'jury/test_libs/bats-assert-2.2.0/load.bash'
load "$BATS_TEST_DIRNAME/test_libs/bats-support-0.3.0/load.bash"
load "$BATS_TEST_DIRNAME/test_libs/bats-assert-2.2.0/load.bash"

setup() {
# Get the repo root, which is the current working directory for the test runner
Expand Down
6 changes: 3 additions & 3 deletions jury/stars.bats
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bats

load 'jury/test_libs/bats-support-0.3.0/load.bash'
load 'jury/test_libs/bats-assert-2.2.0/load.bash'
load "$BATS_TEST_DIRNAME/test_libs/bats-support-0.3.0/load.bash"
load "$BATS_TEST_DIRNAME/test_libs/bats-assert-2.2.0/load.bash"

SCRIPT="gallery/stars/stars.sh"
SCRIPT="$BATS_TEST_DIRNAME/../gallery/stars/stars.sh"

@test "stars: should be executable" {
assert [ -x "$SCRIPT" ]
Expand Down
8 changes: 4 additions & 4 deletions jury/tests.bats
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/usr/bin/env bats

load 'jury/test_libs/bats-support-0.3.0/load.bash'
load 'jury/test_libs/bats-assert-2.2.0/load.bash'
load "$BATS_TEST_DIRNAME/test_libs/bats-support-0.3.0/load.bash"
load "$BATS_TEST_DIRNAME/test_libs/bats-assert-2.2.0/load.bash"

@test "displays usage and lists screensavers" {
run ./screensaver.sh
assert_success
run timeout 3s ./screensaver.sh
assert_failure # It will be killed by timeout, so it's a failure
assert_output --partial "Bash Screensavers"
assert_output --partial "1. alpha"
assert_output --partial "10. tunnel"
Expand Down
107 changes: 53 additions & 54 deletions jury/verdict.tap
Original file line number Diff line number Diff line change
@@ -1,148 +1,147 @@
1..54
1..53
not ok 1 alpha: should be executable
# (from function `assert' in file ./test_libs/bats-assert-2.2.0/src/assert.bash, line 40,
# in test file ./alpha.bats, line 9)
# (from function `assert' in file /app/jury/test_libs/bats-assert-2.2.0/src/assert.bash, line 40,
# in test file /app/jury/alpha.bats, line 9)
# `assert [ -x "$SCRIPT" ]' failed
#
# -- assertion failed --
# expression : [ -x gallery/alpha/alpha.sh ]
# --
#
ok 2 alpha: runs without errors for 1 second
ok 3 beta screensaver runs
not ok 4 bouncing: should be executable
# (from function `assert' in file ./test_libs/bats-assert-2.2.0/src/assert.bash, line 40,
# in test file ./bouncing.bats, line 9)
not ok 3 bouncing: should be executable
# (from function `assert' in file /app/jury/test_libs/bats-assert-2.2.0/src/assert.bash, line 40,
# in test file /app/jury/bouncing.bats, line 9)
# `assert [ -x "$SCRIPT" ]' failed
#
# -- assertion failed --
# expression : [ -x gallery/bouncing/bouncing.sh ]
# --
#
not ok 5 bouncing: runs without errors for 1 second
# (from function `assert_success' in file ./test_libs/bats-assert-2.2.0/src/assert_success.bash, line 45,
# in test file ./bouncing.bats, line 14)
not ok 4 bouncing: runs without errors for 1 second
# (from function `assert_success' in file /app/jury/test_libs/bats-assert-2.2.0/src/assert_success.bash, line 45,
# in test file /app/jury/bouncing.bats, line 14)
# `assert_success' failed
#
# -- command failed --
# status : 127
# output : timeout: failed to run command ‘gallery/bouncing/bouncing.sh’: No such file or directory
# --
#
not ok 6 cutesaver: main script should be executable
# (from function `assert' in file ./test_libs/bats-assert-2.2.0/src/assert.bash, line 40,
# in test file ./cutesaver.bats, line 9)
not ok 5 cutesaver: main script should be executable
# (from function `assert' in file /app/jury/test_libs/bats-assert-2.2.0/src/assert.bash, line 40,
# in test file /app/jury/cutesaver.bats, line 9)
# `assert [ -x "$SCRIPT" ]' failed
#
# -- assertion failed --
# expression : [ -x gallery/cutesaver/cutesaver.sh ]
# --
#
not ok 7 cutesaver: runs without errors for 1 second
# (from function `assert_success' in file ./test_libs/bats-assert-2.2.0/src/assert_success.bash, line 45,
# in test file ./cutesaver.bats, line 14)
not ok 6 cutesaver: runs without errors for 1 second
# (from function `assert_success' in file /app/jury/test_libs/bats-assert-2.2.0/src/assert_success.bash, line 45,
# in test file /app/jury/cutesaver.bats, line 14)
# `assert_success' failed
#
# -- command failed --
# status : 127
# output : timeout: failed to run command ‘gallery/cutesaver/cutesaver.sh’: No such file or directory
# --
#
not ok 8 fireworks: should be executable
# (from function `assert' in file ./test_libs/bats-assert-2.2.0/src/assert.bash, line 40,
# in test file ./fireworks.bats, line 9)
not ok 7 fireworks: should be executable
# (from function `assert' in file /app/jury/test_libs/bats-assert-2.2.0/src/assert.bash, line 40,
# in test file /app/jury/fireworks.bats, line 9)
# `assert [ -x "$SCRIPT" ]' failed
#
# -- assertion failed --
# expression : [ -x gallery/fireworks/fireworks.sh ]
# --
#
not ok 9 fireworks: runs without errors for 1 second
# (from function `assert_success' in file ./test_libs/bats-assert-2.2.0/src/assert_success.bash, line 45,
# in test file ./fireworks.bats, line 14)
not ok 8 fireworks: runs without errors for 1 second
# (from function `assert_success' in file /app/jury/test_libs/bats-assert-2.2.0/src/assert_success.bash, line 45,
# in test file /app/jury/fireworks.bats, line 14)
# `assert_success' failed
#
# -- command failed --
# status : 127
# output : timeout: failed to run command ‘gallery/fireworks/fireworks.sh’: No such file or directory
# --
#
ok 10 library-of-voices: can be sourced
ok 11 library-of-voices: lov_detect_engine function exists
ok 12 library-of-voices: lov_say function exists
ok 13 library-of-voices: lov_kill_speech function exists
not ok 14 library-of-voices: lov_detect_engine sets a TTS engine
# (from function `assert' in file ./test_libs/bats-assert-2.2.0/src/assert.bash, line 40,
# in test file ./library-of-voices.bats, line 34)
ok 9 library-of-voices: can be sourced
ok 10 library-of-voices: lov_detect_engine function exists
ok 11 library-of-voices: lov_say function exists
ok 12 library-of-voices: lov_kill_speech function exists
not ok 13 library-of-voices: lov_detect_engine sets a TTS engine
# (from function `assert' in file /app/jury/test_libs/bats-assert-2.2.0/src/assert.bash, line 40,
# in test file /app/jury/library-of-voices.bats, line 34)
# `assert [ -n "$LOV_TTS_ENGINE" ]' failed
#
# -- assertion failed --
# expression : [ -n ]
# --
#
not ok 15 matrix: should be executable
# (from function `assert' in file ./test_libs/bats-assert-2.2.0/src/assert.bash, line 40,
# in test file ./matrix.bats, line 9)
not ok 14 matrix: should be executable
# (from function `assert' in file /app/jury/test_libs/bats-assert-2.2.0/src/assert.bash, line 40,
# in test file /app/jury/matrix.bats, line 9)
# `assert [ -x "$SCRIPT" ]' failed
#
# -- assertion failed --
# expression : [ -x gallery/matrix/matrix.sh ]
# --
#
not ok 16 matrix: runs without errors for 1 second
# (from function `assert_success' in file ./test_libs/bats-assert-2.2.0/src/assert_success.bash, line 45,
# in test file ./matrix.bats, line 14)
not ok 15 matrix: runs without errors for 1 second
# (from function `assert_success' in file /app/jury/test_libs/bats-assert-2.2.0/src/assert_success.bash, line 45,
# in test file /app/jury/matrix.bats, line 14)
# `assert_success' failed
#
# -- command failed --
# status : 127
# output : timeout: failed to run command ‘gallery/matrix/matrix.sh’: No such file or directory
# --
#
not ok 17 pipes: should be executable
# (from function `assert' in file ./test_libs/bats-assert-2.2.0/src/assert.bash, line 40,
# in test file ./pipes.bats, line 9)
not ok 16 pipes: should be executable
# (from function `assert' in file /app/jury/test_libs/bats-assert-2.2.0/src/assert.bash, line 40,
# in test file /app/jury/pipes.bats, line 9)
# `assert [ -x "$SCRIPT" ]' failed
#
# -- assertion failed --
# expression : [ -x gallery/pipes/pipes.sh ]
# --
#
not ok 18 pipes: runs without errors for 1 second
# (from function `assert_success' in file ./test_libs/bats-assert-2.2.0/src/assert_success.bash, line 45,
# in test file ./pipes.bats, line 14)
not ok 17 pipes: runs without errors for 1 second
# (from function `assert_success' in file /app/jury/test_libs/bats-assert-2.2.0/src/assert_success.bash, line 45,
# in test file /app/jury/pipes.bats, line 14)
# `assert_success' failed
#
# -- command failed --
# status : 127
# output : timeout: failed to run command ‘gallery/pipes/pipes.sh’: No such file or directory
# --
#
not ok 19 rain: should be executable
# (from function `assert' in file ./test_libs/bats-assert-2.2.0/src/assert.bash, line 40,
# in test file ./rain.bats, line 9)
not ok 18 rain: should be executable
# (from function `assert' in file /app/jury/test_libs/bats-assert-2.2.0/src/assert.bash, line 40,
# in test file /app/jury/rain.bats, line 9)
# `assert [ -x "$SCRIPT" ]' failed
#
# -- assertion failed --
# expression : [ -x gallery/rain/rain.sh ]
# --
#
not ok 20 rain: runs without errors for 1 second
# (from function `assert_success' in file ./test_libs/bats-assert-2.2.0/src/assert_success.bash, line 45,
# in test file ./rain.bats, line 14)
not ok 19 rain: runs without errors for 1 second
# (from function `assert_success' in file /app/jury/test_libs/bats-assert-2.2.0/src/assert_success.bash, line 45,
# in test file /app/jury/rain.bats, line 14)
# `assert_success' failed
#
# -- command failed --
# status : 127
# output : timeout: failed to run command ‘gallery/rain/rain.sh’: No such file or directory
# --
#
not ok 21 smile-for-the-camera: exits if asciinema is not found
# (from function `setup' in test file ./smile-for-the-camera.bats, line 5)
not ok 20 smile-for-the-camera: exits if asciinema is not found
# (from function `setup' in test file /app/jury/smile-for-the-camera.bats, line 5)
# `chmod +x "$SCRIPT"' failed
not ok 24 teardown_file failed
# (from function `source' in file ./smile-for-the-camera.bats, line 39,
# from function `bats_run_setup_file' in file test_libs/bats-core-1.12.0/libexec/bats-core/bats-exec-file, line 99,
# from function `main' in test file test_libs/bats-core-1.12.0/libexec/bats-core/bats-exec-file, line 382)
not ok 23 teardown_file failed
# (from function `source' in file /app/jury/smile-for-the-camera.bats, line 39,
# from function `bats_run_setup_file' in file /app/jury/test_libs/bats-core-1.12.0/libexec/bats-core/bats-exec-file, line 99,
# from function `main' in test file /app/jury/test_libs/bats-core-1.12.0/libexec/bats-core/bats-exec-file, line 382)
# `bats_run_setup_file' failed
# bats warning: Executed 22 instead of expected 54 tests
# bats warning: Executed 21 instead of expected 53 tests
Loading
Loading