Skip to content

Commit da94863

Browse files
Fix non executable report formatter under windows
1 parent f7799ca commit da94863

File tree

3 files changed

+8
-16
lines changed

3 files changed

+8
-16
lines changed

test/bats.bats

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1547,15 +1547,7 @@ enforce_own_process_group() {
15471547
}
15481548

15491549
@test "Bats waits for report formatter to finish" {
1550-
local REPORT_FORMATTER="$BATS_TEST_TMPDIR/report-formatter"
1551-
cat - >"$REPORT_FORMATTER" <<HEREDOC
1552-
#!/usr/bin/bash
1553-
cat >/dev/null # eat up all input
1554-
sleep 1
1555-
echo "Finished" # mark finish
1556-
HEREDOC
1557-
chmod a+x "$REPORT_FORMATTER"
1558-
1550+
REPORT_FORMATTER=$FIXTURE_ROOT/gobble_up_stdin_sleep_and_print_finish.bash
15591551
bats_require_minimum_version 1.5.0
15601552
reentrant_run -0 bats "$FIXTURE_ROOT/passing.bats" --report-formatter "$REPORT_FORMATTER" --output "$BATS_TEST_TMPDIR"
15611553

@@ -1564,13 +1556,7 @@ HEREDOC
15641556
}
15651557

15661558
@test "Failing report formatter fails test run" {
1567-
local REPORT_FORMATTER="$BATS_TEST_TMPDIR/report-formatter"
1568-
cat - >"$REPORT_FORMATTER" <<HEREDOC
1569-
#!/usr/bin/bash
1570-
exit 11
1571-
HEREDOC
1572-
chmod a+x "$REPORT_FORMATTER"
1573-
1559+
REPORT_FORMATTER=$FIXTURE_ROOT/exit_11.bash
15741560
bats_require_minimum_version 1.5.0
15751561
reentrant_run ! bats "$FIXTURE_ROOT/passing.bats" --report-formatter "$REPORT_FORMATTER" --output "$BATS_TEST_TMPDIR"
15761562

test/fixtures/bats/exit_11.bash

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/usr/bin/bash
2+
exit 11
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/bash
2+
cat >/dev/null # eat up all input
3+
sleep 1
4+
echo "Finished" # mark finish

0 commit comments

Comments
 (0)