tests
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
@test 'foo in a' { true; }
|
||||
@test '--bar in a' { true; }
|
||||
@test 'baz in a' { true; }
|
||||
@@ -0,0 +1,3 @@
|
||||
@test 'bar_in_b' { true; }
|
||||
@test '--baz_in_b' { true; }
|
||||
@test 'quux_in_b' { true; }
|
||||
@@ -0,0 +1,3 @@
|
||||
@test 'quux_in c' { true; }
|
||||
@test 'xyzzy in c' { true; }
|
||||
@test 'plugh_in c' { true; }
|
||||
@@ -0,0 +1,3 @@
|
||||
@test "truth" {
|
||||
true
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
@test "more truth" {
|
||||
true
|
||||
}
|
||||
|
||||
@test "quasi-truth" {
|
||||
[ -z "${FLUNK:-}" ]
|
||||
}
|
||||
tests/bats/bats-core/test/fixtures/suite/override_BATS_FILE_EXTENSION/subfolder/test.other_extension
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
@test "test.other_extension" {
|
||||
true
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
@test "test.bats" {
|
||||
true
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
@test "test.test" {
|
||||
true
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
@test "another passing test" {
|
||||
true
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
@test "a passing test" {
|
||||
true
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
../recursive/subsuite/
|
||||
+1
@@ -0,0 +1 @@
|
||||
../recursive/test.bats
|
||||
@@ -0,0 +1,3 @@
|
||||
@test "a passing test" {
|
||||
true
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bats
|
||||
|
||||
setup() {
|
||||
skip "This is not working (https://github.com/kata-containers/runtime/issues/175)"
|
||||
}
|
||||
|
||||
@test "skip in setup and teardown" {
|
||||
true
|
||||
}
|
||||
|
||||
@test "skip in setup, test and teardown" {
|
||||
skip
|
||||
}
|
||||
|
||||
teardown() {
|
||||
skip "This is not working (https://github.com/clearcontainers/runtime/issues/1042)"
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bats
|
||||
|
||||
setup() {
|
||||
skip "This is not working (https://github.com/kata-containers/runtime/issues/175)"
|
||||
}
|
||||
|
||||
@test "skip in setup" {
|
||||
false
|
||||
}
|
||||
|
||||
@test "skip in setup and test" {
|
||||
skip
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env bats
|
||||
|
||||
@test "skip in teardown" {
|
||||
true
|
||||
}
|
||||
|
||||
teardown() {
|
||||
skip "This is not working (https://github.com/clearcontainers/runtime/issues/1042)"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env bats
|
||||
|
||||
teardown() {
|
||||
skip "This is not working (https://github.com/clearcontainers/runtime/issues/1042)"
|
||||
}
|
||||
|
||||
@test "skip in test and teardown" {
|
||||
skip "This is not working (https://github.com/clearcontainers/runtime/issues/1042)"
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bats
|
||||
|
||||
@test "skip in test" {
|
||||
skip "This is not working (https://github.com/clearcontainers/runtime/issues/1042)"
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bats
|
||||
|
||||
@test "first test in file 1" {
|
||||
echo "BATS_TEST_NUMBER=$BATS_TEST_NUMBER"
|
||||
[[ "$BATS_TEST_NUMBER" == 1 ]]
|
||||
echo "BATS_SUITE_TEST_NUMBER=$BATS_SUITE_TEST_NUMBER"
|
||||
[[ "$BATS_SUITE_TEST_NUMBER" == 1 ]]
|
||||
}
|
||||
|
||||
@test "second test in file 1" {
|
||||
[[ "$BATS_TEST_NUMBER" == 2 ]]
|
||||
[[ "$BATS_SUITE_TEST_NUMBER" == 2 ]]
|
||||
}
|
||||
|
||||
@test "BATS_TEST_NAMES is per file" {
|
||||
echo "${#BATS_TEST_NAMES[@]}"
|
||||
[[ "${#BATS_TEST_NAMES[@]}" == 3 ]]
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env bats
|
||||
|
||||
@test "first test in file 2" {
|
||||
echo "BATS_TEST_NUMBER=$BATS_TEST_NUMBER"
|
||||
[ "$BATS_TEST_NUMBER" -eq 1 ]
|
||||
echo "BATS_SUITE_TEST_NUMBER=$BATS_SUITE_TEST_NUMBER"
|
||||
[ "$BATS_SUITE_TEST_NUMBER" -eq 4 ]
|
||||
}
|
||||
|
||||
@test "second test in file 2" {
|
||||
[ "$BATS_TEST_NUMBER" -eq 2 ]
|
||||
[ "$BATS_SUITE_TEST_NUMBER" -eq 5 ]
|
||||
}
|
||||
|
||||
@test "second test in file 3" {
|
||||
[ "$BATS_TEST_NUMBER" -eq 3 ]
|
||||
[ "$BATS_SUITE_TEST_NUMBER" -eq 6 ]
|
||||
}
|
||||
|
||||
@test "BATS_TEST_NAMES is per file" {
|
||||
echo "${#BATS_TEST_NAMES[@]} ${BATS_TEST_NAMES[0]}"
|
||||
[ "${#BATS_TEST_NAMES[@]}" -eq 4 ]
|
||||
[ "${BATS_TEST_NAMES[0]}" == test_first_test_in_file_2 ]
|
||||
}
|
||||
Reference in New Issue
Block a user