17 lines
373 B
Bash
17 lines
373 B
Bash
#!/bin/bash
|
|
bash solution.sh > /dev/null 2>&1
|
|
|
|
if [ -f hello.txt ]; then
|
|
echo "ok 1 - hello.txt is created"
|
|
else
|
|
echo "not ok 1 - hello.txt is created"
|
|
fi
|
|
|
|
ACTUAL=$(cat hello.txt 2>/dev/null)
|
|
ACTUAL="${ACTUAL%$'\n'}"
|
|
if [ "$ACTUAL" = "Hello, World" ]; then
|
|
echo "ok 2 - hello.txt contains 'Hello, World'"
|
|
else
|
|
echo "not ok 2 - hello.txt contains 'Hello, World'"
|
|
fi
|