- t failing unit test

This commit is contained in:
Nitsan Avni committed 2023-12-23 18:18:38 +01:00
1 parent 56ca5bf411
commit 4490aaa5fd
3 files changed
+57 -3

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
#!/bin/bash
GILDED_ROSE_SCRIPT="./gilded_rose.sh"
get_name() {
grep -o '^[^|]*'
}
assert_equals() {
local expected="$1"
diff -u - <(echo "$expected")
}
test_foo() {
echo "foo|0|0" |
bash "$GILDED_ROSE_SCRIPT" |
get_name |
assert_equals "fixme"
}
test_foo