Skip to content

Commit d699003

Browse files
committed
chore: update console_header with --init
1 parent c2268fa commit d699003

File tree

4 files changed

+20
-0
lines changed

4 files changed

+20
-0
lines changed

src/console_header.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ Options:
9797
--upgrade
9898
Upgrade to latest version of bashunit.
9999
100+
--init [dir]
101+
Generate a tests folder (or the provided directory) with a sample test
102+
and bootstrap file to get you started quickly.
103+
100104
-h, --help
101105
This message.
102106

tests/acceptance/bashunit_init_test.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,11 @@ function test_bashunit_init_custom_directory() {
3030
assert_file_exists custom/bootstrap.sh
3131
popd >/dev/null
3232
}
33+
34+
function test_bashunit_init_custom_directory() {
35+
pushd "$TMP_DIR" >/dev/null
36+
../../bashunit --init custom > /tmp/init.log
37+
assert_file_exists custom/example_test.sh
38+
assert_file_exists custom/bootstrap.sh
39+
popd >/dev/null
40+
}

tests/acceptance/snapshots/bashunit_path_test_sh.test_bashunit_without_path_env_nor_argument.snapshot

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ Options:
4444
--upgrade
4545
Upgrade to latest version of bashunit.
4646

47+
--init [dir]
48+
Generate a tests folder (or the provided directory) with a sample test
49+
and bootstrap file to get you started quickly.
50+
4751
-h, --help
4852
This message.
4953

tests/acceptance/snapshots/bashunit_test_sh.test_bashunit_should_display_help.snapshot

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ Options:
4343
--upgrade
4444
Upgrade to latest version of bashunit.
4545

46+
--init [dir]
47+
Generate a tests folder (or the provided directory) with a sample test
48+
and bootstrap file to get you started quickly.
49+
4650
-h, --help
4751
This message.
4852

0 commit comments

Comments
 (0)