add tests
authorLaurent Mazet <mazet@softndesign.org>
Sat, 24 Aug 2024 21:04:54 +0000 (23:04 +0200)
committerLaurent Mazet <mazet@softndesign.org>
Sat, 24 Aug 2024 21:06:40 +0000 (23:06 +0200)
bogus.pen [new file with mode: 0644]
pentomino.c

diff --git a/bogus.pen b/bogus.pen
new file mode 100644 (file)
index 0000000..f452f34
--- /dev/null
+++ b/bogus.pen
@@ -0,0 +1,55 @@
+width: 10
+height: 6
+tab: "   ;;;;'     ;AA&'     AA &''     A &,'       &,,       &,, "
+nb: 12
+x: "363770000000"
+y: "110030000000"
+settle: "111110000000"
+width[0]: 3
+height[0]: 3
+color[0]: 88
+block[0]: " ....  . "
+width[1]: 1
+height[1]: 5
+color[1]: 54
+block[1]: "....."
+width[2]: 4
+height[2]: 2
+color[2]: 82
+block[2]: ".....   "
+width[3]: 2
+height[3]: 4
+color[3]: 55
+block[3]: ". . .. ."
+width[4]: 2
+height[4]: 3
+color[4]: 67
+block[4]: ". ...."
+width[5]: 3
+height[5]: 3
+color[5]: 72
+block[5]: "... .  . "
+width[6]: 3
+height[6]: 2
+color[6]: 81
+block[6]: ". ...."
+width[7]: 3
+height[7]: 3
+color[7]: 71
+block[7]: ".  .  ..."
+width[8]: 3
+height[8]: 3
+color[8]: 68
+block[8]: ".  ..  .."
+width[9]: 3
+height[9]: 2
+color[9]: 76
+block[9]: " . ... . "
+width[10]: 2
+height[10]: 4
+color[10]: 53
+block[10]: " ... . ."
+width[11]: 3
+height[11]: 3
+color[11]: 85
+block[11]: "..  .  .."
index f1d985b4a363920ae81af1ca88a0736d9c21aa0c..61ccf7570a7a990e10285e512b7ee80995ea6b50 100644 (file)
@@ -405,7 +405,7 @@ int main (int argc, char *argv[])
 /* test: pentomino.exe -b list | grep '^board:' */
 /* test: pentomino.exe -f 2>&1 | grep 'no file' */
 /* test: pentomino.exe -f nofile.pen 2>&1 | grep "can't read file" */
-/* test~: pentomino.exe -f bogus.pen 2>&1 | grep 'incorrect file' */
+/* test: pentomino.exe -f bogus.pen 2>&1 | grep 'incorrect file' */
 /* test: pentomino.exe -h | grep usage */
 /* test: pentomino.exe -r 2>&1 | grep 'missing max' */
 /* test: pentomino.exe -s 2>&1 | grep 'no scale' */
@@ -415,8 +415,11 @@ int main (int argc, char *argv[])
 /* test: { sleep 1; echo -n omupijkhyoi; sleep 1; echo q; } | pentomino.exe -s 3 -b 6x10 */
 /* test: { sleep 1; echo -n omupijkhyoi; sleep 1; echo q; } | pentomino.exe -s 2 -b 5x12 */
 /* test: { sleep 1; echo -n omupijkhyoi; sleep 1; echo q; } | pentomino.exe -s 1 -b 4x15 */
-/* test: { sleep 1; echo -n omupijkhyoi; sleep 1; echo q; } | pentomino.exe -s 0 -b 3x20*/
-/* test: { sleep 1; echo -n omupijkhyoi; sleep 1; echo q; } | pentomino.exe -r 12 | grep omupijkhyoiq */
+/* test: { sleep 1; echo -n omupijkhyoi; sleep 1; echo -n yyyyyyyyyyyyy; sleep 1; echo q; } | pentomino.exe -s 0 -b 3x20*/
+/* test: { sleep 1; echo -n omupijkhyoi; sleep 1; echo q; } | pentomino.exe -r 10 | grep 'records: upijkhyoiq' */
+/* test: { sleep 1; echo -en 'sa.pen\e'; sleep 1; echo -e '\nq'; } | pentomino.exe && test \! -f a.pen */
+/* test: { sleep 1; echo -n hyyllkhymlh; sleep 1; echo -en 'sab\b.pen'; sleep 1; echo -e '\nq'; } | pentomino.exe -v 2 */
+/* test: { sleep 1; echo -n hyy; sleep 1; echo q; } | pentomino.exe -f a.pen && rm a.pen */
 /* test: { echo -n olkh; sleep 1; echo -n yiijjjjh; sleep 1; echo -n yllllomoolkh; sleep 1; echo -n yukkkjh; sleep 1; echo -n yiioojjjiih; sleep 1; echo -n yljookkkjh; sleep 1; echo -n ylllllulllh; sleep 1; echo -n yoojiiih; sleep 1; echo -n yjjjjjkkkh; sleep 1; echo -n yiih; sleep 1; echo -n yulih; sleep 1; echo -n ylkkllh; sleep 3; echo -n q; } | pentomino.exe */
 
 /* vim: set ts=4 sw=4 et: */