Some ex19 extra credit
This commit is contained in:
parent
bc195dec65
commit
b3665e0bca
@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
for f in *.c ; do
|
for f in ex*.c ; do
|
||||||
echo "${f/.c/}"
|
echo "${f/.c/}"
|
||||||
done
|
done
|
||||||
|
@ -15,7 +15,6 @@ test_ex17-ec() {
|
|||||||
./ex17-ec "${testdb}" d 1
|
./ex17-ec "${testdb}" d 1
|
||||||
./ex17-ec "${testdb}" s 1 portia wanda@aeromar.mx "Fancy town"
|
./ex17-ec "${testdb}" s 1 portia wanda@aeromar.mx "Fancy town"
|
||||||
./ex17-ec "${testdb}" f nest &>/dev/null
|
./ex17-ec "${testdb}" f nest &>/dev/null
|
||||||
echo "OK"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
test_ex18() {
|
test_ex18() {
|
||||||
@ -23,7 +22,15 @@ test_ex18() {
|
|||||||
[[ "${output}" =~ '0 1 2 3 4 7 8' ]]
|
[[ "${output}" =~ '0 1 2 3 4 7 8' ]]
|
||||||
[[ "${output}" =~ '8 7 4 3 2 1 0' ]]
|
[[ "${output}" =~ '8 7 4 3 2 1 0' ]]
|
||||||
[[ "${output}" =~ '3 4 2 7 1 0 8' ]]
|
[[ "${output}" =~ '3 4 2 7 1 0 8' ]]
|
||||||
echo "OK"
|
}
|
||||||
|
|
||||||
|
test_ex19() {
|
||||||
|
printf "l\nn\nl\ne\nw\nw\nl\na\na\na\na\na\na\na\na\na\na\n" \
|
||||||
|
| ./ex19 &>/dev/null
|
||||||
|
printf "l\nl\nl\nl\na\na\nx\nq\nz\nn\n" | ./ex19 &>/dev/null
|
||||||
|
for i in {0..20} ; do
|
||||||
|
echo "${RANDOM}" | md5sum | ./ex19 &>/dev/null
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
@ -32,6 +39,7 @@ main() {
|
|||||||
if type "${func_name}" &>/dev/null ; then
|
if type "${func_name}" &>/dev/null ; then
|
||||||
echo -en "---> ${ex}: "
|
echo -en "---> ${ex}: "
|
||||||
"${func_name}"
|
"${func_name}"
|
||||||
|
echo "OK"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user