|
1 | 1 | package: |
2 | 2 | name: bats |
3 | 3 | version: "1.12.0" |
4 | | - epoch: 2 |
| 4 | + epoch: 3 |
5 | 5 | description: Bash Automated Testing System |
6 | 6 | copyright: |
7 | 7 | - license: MIT |
@@ -29,10 +29,13 @@ pipeline: |
29 | 29 | ./install.sh "${{targets.contextdir}}/usr" |
30 | 30 | mkdir -p "${{targets.contextdir}}/tmp/" |
31 | 31 | cp -r ./docker "${{targets.contextdir}}/tmp/docker" |
| 32 | + # XXX This has to be exported this way, as ${{targets.contextdir}} |
| 33 | + # is not expanded in the environment variable declaration section. |
| 34 | + export BATS_LIBS_DEST_DIR="${{targets.contextdir}}/usr/lib/bats" |
32 | 35 | "${{targets.contextdir}}/tmp/docker/install_libs.sh" support 0.3.0 |
33 | 36 | "${{targets.contextdir}}/tmp/docker/install_libs.sh" file 0.4.0 |
34 | | - "${{targets.contextdir}}/tmp/docker/install_libs.sh" assert 2.1.0 |
35 | | - "${{targets.contextdir}}/tmp/docker/install_libs.sh" detik 1.3.1 |
| 37 | + "${{targets.contextdir}}/tmp/docker/install_libs.sh" assert 2.2.0 |
| 38 | + "${{targets.contextdir}}/tmp/docker/install_libs.sh" detik 1.4.0 |
36 | 39 | find "${{targets.contextdir}}" -type f -perm /2000 -exec chmod g-s {} \; |
37 | 40 | rm -rf "${{targets.contextdir}}/tmp/" |
38 | 41 |
|
|
95 | 98 | cat << 'EOF' > /tmp/inline_test.bats |
96 | 99 | #!/usr/bin/env bats |
97 | 100 |
|
| 101 | + # ensure the included modules can be loaded |
| 102 | + bats_load_library bats-support |
| 103 | + bats_load_library bats-assert |
| 104 | + bats_load_library bats-file |
| 105 | + # bats-detik doesn't include a load.bats |
| 106 | + load "/usr/lib/bats/bats-detik/detik" |
| 107 | +
|
| 108 | + # test that the bats-assert (and bats-support) libs work |
| 109 | + @test 'assert_equal()' { |
| 110 | + assert_equal 'have' 'have' |
| 111 | + } |
| 112 | +
|
98 | 113 | load_file() { |
99 | 114 | source "/tmp/example.sh" |
100 | 115 | } |
|
0 commit comments