Skip to content

Commit 7ce824c

Browse files
committed
PR cleanups
1 parent 4b40233 commit 7ce824c

File tree

8 files changed

+51
-9
lines changed

8 files changed

+51
-9
lines changed

examples/commands/test.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,3 @@ bashly generate
1717
./cli upload --help
1818
./cli upload sourcefile
1919
./cli upload sourcefile -u username
20-
./cli upload sourcefile -u username -p ''

spec/approvals/examples/commands

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,3 @@ missing required flag: --user, -u USER
116116
args:
117117
- ${args[source]} = sourcefile
118118
- ${args[--user]} = username
119-
+ ./cli upload sourcefile -u username -p ''
120-
# this file is located in 'src/upload_command.sh'
121-
# code for 'cli upload' goes here
122-
# you can edit it freely and regenerate (it will not be overwritten)
123-
args:
124-
- ${args[--password]} =
125-
- ${args[source]} = sourcefile
126-
- ${args[--user]} = username

spec/approvals/examples/empty-args

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
creating user files in src
2+
skipped src/initialize.sh (exists)
3+
skipped src/test_command.sh (exists)
4+
created ./cli
5+
run ./cli --help to test your bash script
6+
+ ./cli test ''
7+
# this file is located in 'src/test_command.sh'
8+
# code for 'cli test' goes here
9+
# you can edit it freely and regenerate (it will not be overwritten)
10+
args:
11+
- ${args[arg]} =
12+
+ ./cli test --flag ''
13+
# this file is located in 'src/test_command.sh'
14+
# code for 'cli test' goes here
15+
# you can edit it freely and regenerate (it will not be overwritten)
16+
args:
17+
- ${args[--flag]} =
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
cli
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: cli
2+
help: Sample application
3+
version: 0.1.0
4+
5+
commands:
6+
- name: test
7+
help: Run test
8+
flags:
9+
- long: --flag
10+
arg: value
11+
args:
12+
- name: arg
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Code here runs inside the initialize() function
2+
# Use it for anything that you need to run before any other function, like
3+
# setting environment vairables:
4+
# CONFIG_FILE=settings.ini
5+
#
6+
# Feel free to empty (but not delete) this file.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
echo "# this file is located in 'src/test_command.sh'"
2+
echo "# code for 'cli test' goes here"
3+
echo "# you can edit it freely and regenerate (it will not be overwritten)"
4+
inspect_args
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env bash
2+
3+
# This fixture tests Bash 4+-only syntax
4+
# It is executed as part of the Runfile examples test
5+
6+
bundle exec bashly generate
7+
8+
set -x
9+
10+
./cli test ''
11+
./cli test --flag ''

0 commit comments

Comments
 (0)