diff --git a/ex01/hello_world.sh b/ex01/hello_world.sh new file mode 100644 index 0000000..38e1002 --- /dev/null +++ b/ex01/hello_world.sh @@ -0,0 +1,7 @@ +function hello_world() +{ + val='Hello, World!' +} + +hello_world +echo $val diff --git a/ex01/hello_world_test.sh b/ex01/hello_world_test.sh index bc6946b..c2d05f4 100644 --- a/ex01/hello_world_test.sh +++ b/ex01/hello_world_test.sh @@ -20,3 +20,10 @@ [ "$status" -eq 0 ] [ "$output" = "Hello, Bob!" ] } + +@test 'Check called it should print Hello, World!' { + run bash hello_world.sh + + [ "$status" -eq 0 ] + [ "$output" = "Hello, World!" ] +}