GildedRose-Refactoring-Kata/bash/unit_test.sh
2023-12-23 18:18:38 +01:00

22 lines
300 B
Bash
Executable File

#!/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