mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2025-12-12 04:12:13 +00:00
22 lines
300 B
Bash
Executable File
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
|