From 3b9a50cccccbff88b93202e8c1d1fc3ada8228ec Mon Sep 17 00:00:00 2001 From: Greg Date: Sun, 3 Oct 2021 15:04:11 +0000 Subject: [PATCH] ex01 --- ex01/hello_world.sh | 6 ++++++ ex01/hello_world_test.sh | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 ex01/hello_world.sh diff --git a/ex01/hello_world.sh b/ex01/hello_world.sh new file mode 100644 index 0000000..ad52e87 --- /dev/null +++ b/ex01/hello_world.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bats +if [ -n "$1" ]; then +echo "Hello, $1!" +else +echo "Hello, World!" +fi diff --git a/ex01/hello_world_test.sh b/ex01/hello_world_test.sh index bc6946b..7355ca2 100644 --- a/ex01/hello_world_test.sh +++ b/ex01/hello_world_test.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bats +#!/usr/local/bin/bats @test "When given no name, it should greet the world!" { run bash hello_world.sh