diff --git a/test/004_missing_option_argument.expected.tmp b/test/004_missing_option_argument.expected.tmp new file mode 100644 index 0000000..7e8f762 --- /dev/null +++ b/test/004_missing_option_argument.expected.tmp @@ -0,0 +1,3 @@ +../src/boxes: option requires an argument -- 's' +Usage: boxes [options] [infile [outfile]] +Try `boxes -h' for more information. diff --git a/test/004_missing_option_argument.input.tmp b/test/004_missing_option_argument.input.tmp new file mode 100644 index 0000000..e69de29 diff --git a/test/004_missing_option_argument.out.tmp b/test/004_missing_option_argument.out.tmp new file mode 100644 index 0000000..8dfe38c --- /dev/null +++ b/test/004_missing_option_argument.out.tmp @@ -0,0 +1,3 @@ +c:\Users\Thomas\Projects\boxes\src\boxes.exe: option requires an argument -- s +Usage: boxes [options] [infile [outfile]] +Try `boxes -h' for more information. diff --git a/test/053_size_25x10.txt b/test/053_size_25x10.txt new file mode 100644 index 0000000..e23d3ba --- /dev/null +++ b/test/053_size_25x10.txt @@ -0,0 +1,18 @@ +:ARGS +-s 25x10 +:INPUT +aaa +bbbb +ccccc +:EXPECTED +/***********************/ +/* aaa */ +/* bbbb */ +/* ccccc */ +/* */ +/* */ +/* */ +/* */ +/* */ +/***********************/ +:EOF \ No newline at end of file diff --git a/test/054_size_vs_padding_1.txt b/test/054_size_vs_padding_1.txt new file mode 100644 index 0000000..1ca9cb6 --- /dev/null +++ b/test/054_size_vs_padding_1.txt @@ -0,0 +1,14 @@ +Size takes precedence over padding, left padding is killed first +:ARGS +-s 10x5 +:INPUT +aaa +bbbb +ccccc +:EXPECTED +/********/ +/*aaa */ +/*bbbb */ +/*ccccc */ +/********/ +:EOF \ No newline at end of file diff --git a/test/055_size_vs_padding_2.txt b/test/055_size_vs_padding_2.txt new file mode 100644 index 0000000..cc83e69 --- /dev/null +++ b/test/055_size_vs_padding_2.txt @@ -0,0 +1,14 @@ +Size takes precedence over padding +:ARGS +-s 9x5 +:INPUT +aaa +bbbb +ccccc +:EXPECTED +/*******/ +/*aaa */ +/*bbbb */ +/*ccccc*/ +/*******/ +:EOF \ No newline at end of file diff --git a/test/056_input_vs_size.txt b/test/056_input_vs_size.txt new file mode 100644 index 0000000..c1df554 --- /dev/null +++ b/test/056_input_vs_size.txt @@ -0,0 +1,14 @@ +Input length takes precedence over size option +:ARGS +-s 2x2 -p a2 +:INPUT +aaa +bbbb +ccccc +:EXPECTED +/*******/ +/*aaa */ +/*bbbb */ +/*ccccc*/ +/*******/ +:EOF \ No newline at end of file diff --git a/test/057_size_vs_padding_2.txt b/test/057_size_vs_padding_2.txt new file mode 100644 index 0000000..ef0dffe --- /dev/null +++ b/test/057_size_vs_padding_2.txt @@ -0,0 +1,14 @@ +:ARGS +-p v1h10 -s 30x6 +:INPUT +aaa +bbbb +ccccc +:EXPECTED +/****************************/ +/* aaa */ +/* bbbb */ +/* ccccc */ +/* */ +/****************************/ +:EOF \ No newline at end of file diff --git a/test/058_size_minimum_by_design.txt b/test/058_size_minimum_by_design.txt new file mode 100644 index 0000000..b820266 --- /dev/null +++ b/test/058_size_minimum_by_design.txt @@ -0,0 +1,24 @@ +:ARGS +-d diamonds -s 15x7 +:INPUT +aaa +bbbb +ccccc +:EXPECTED + /\ /\ /\ + /\//\\/\ /\//\\/\ /\//\\/\ + /\//\\\///\\/\//\\\///\\/\//\\\///\\/\ +//\\\//\/\\///\\\//\/\\///\\\//\/\\///\\ +\\//\/aaa \/\\// + \/ bbbb \/ + /\ ccccc /\ +//\\ //\\ +\\// \\// + \/ \/ + /\ /\ +//\\/\ /\//\\ +\\///\\/\//\\\///\\/\//\\\///\\/\//\\\// + \/\\///\\\//\/\\///\\\//\/\\///\\\//\/ + \/\\//\/ \/\\//\/ \/\\//\/ + \/ \/ \/ +:EOF \ No newline at end of file diff --git a/test/059_size_same_as_design.txt b/test/059_size_same_as_design.txt new file mode 100644 index 0000000..8a96cac --- /dev/null +++ b/test/059_size_same_as_design.txt @@ -0,0 +1,24 @@ +:ARGS +-d diamonds -s 40x16 +:INPUT +aaa +bbbb +ccccc +:EXPECTED + /\ /\ /\ + /\//\\/\ /\//\\/\ /\//\\/\ + /\//\\\///\\/\//\\\///\\/\//\\\///\\/\ +//\\\//\/\\///\\\//\/\\///\\\//\/\\///\\ +\\//\/aaa \/\\// + \/ bbbb \/ + /\ ccccc /\ +//\\ //\\ +\\// \\// + \/ \/ + /\ /\ +//\\/\ /\//\\ +\\///\\/\//\\\///\\/\//\\\///\\/\//\\\// + \/\\///\\\//\/\\///\\\//\/\\///\\\//\/ + \/\\//\/ \/\\//\/ \/\\//\/ + \/ \/ \/ +:EOF \ No newline at end of file diff --git a/test/060_size_1_extra_line.txt b/test/060_size_1_extra_line.txt new file mode 100644 index 0000000..d56ea67 --- /dev/null +++ b/test/060_size_1_extra_line.txt @@ -0,0 +1,28 @@ +:ARGS +-d diamonds -s 40x17 +:INPUT +aaa +bbbb +ccccc +:EXPECTED + /\ /\ /\ + /\//\\/\ /\//\\/\ /\//\\/\ + /\//\\\///\\/\//\\\///\\/\//\\\///\\/\ +//\\\//\/\\///\\\//\/\\///\\\//\/\\///\\ +\\//\/aaa \/\\// + \/ bbbb \/ + /\ ccccc /\ +//\\ //\\ +\\// \\// + \/ \/ + /\ /\ +//\\ //\\ +\\// \\// + \/ \/ + /\ /\ +//\\/\ /\//\\ +\\///\\/\//\\\///\\/\//\\\///\\/\//\\\// + \/\\///\\\//\/\\///\\\//\/\\///\\\//\/ + \/\\//\/ \/\\//\/ \/\\//\/ + \/ \/ \/ +:EOF \ No newline at end of file diff --git a/test/061_size_1_extra_line_and_1_extra_column.txt b/test/061_size_1_extra_line_and_1_extra_column.txt new file mode 100644 index 0000000..e82721d --- /dev/null +++ b/test/061_size_1_extra_line_and_1_extra_column.txt @@ -0,0 +1,28 @@ +:ARGS +-d diamonds -s 41x17 +:INPUT +aaa +bbbb +ccccc +:EXPECTED + /\ /\ /\ /\ + /\//\\/\ /\//\\/\ /\//\\/\ /\//\\/\ + /\//\\\///\\/\//\\\///\\/\//\\\///\\/\//\\\///\\/\ +//\\\//\/\\///\\\//\/\\///\\\//\/\\///\\\//\/\\///\\ +\\//\/aaa \/\\// + \/ bbbb \/ + /\ ccccc /\ +//\\ //\\ +\\// \\// + \/ \/ + /\ /\ +//\\ //\\ +\\// \\// + \/ \/ + /\ /\ +//\\/\ /\//\\ +\\///\\/\//\\\///\\/\//\\\///\\/\//\\\///\\/\//\\\// + \/\\///\\\//\/\\///\\\//\/\\///\\\//\/\\///\\\//\/ + \/\\//\/ \/\\//\/ \/\\//\/ \/\\//\/ + \/ \/ \/ \/ +:EOF \ No newline at end of file diff --git a/test/062_size_with_indent.txt b/test/062_size_with_indent.txt new file mode 100644 index 0000000..62203b9 --- /dev/null +++ b/test/062_size_with_indent.txt @@ -0,0 +1,15 @@ +:ARGS +-s 15x7 +:INPUT + aaa + bbbb + ccccc +:EXPECTED + /*************/ + /* aaa */ + /* bbbb */ + /* ccccc */ + /* */ + /* */ + /*************/ +:EOF \ No newline at end of file diff --git a/test/063_size_with_indent_and_padding.txt b/test/063_size_with_indent_and_padding.txt new file mode 100644 index 0000000..fb69d26 --- /dev/null +++ b/test/063_size_with_indent_and_padding.txt @@ -0,0 +1,15 @@ +:ARGS +-s 15x7 -p l2 +:INPUT + aaa + bbbb + ccccc +:EXPECTED + /*************/ + /* aaa */ + /* bbbb */ + /* ccccc */ + /* */ + /* */ + /*************/ +:EOF \ No newline at end of file diff --git a/test/064_size_with_indent_and_too_much_padding.txt b/test/064_size_with_indent_and_too_much_padding.txt new file mode 100644 index 0000000..4f5ebe3 --- /dev/null +++ b/test/064_size_with_indent_and_too_much_padding.txt @@ -0,0 +1,15 @@ +:ARGS +-s 15x7 -p l10 +:INPUT + aaa + bbbb + ccccc +:EXPECTED + /*************/ + /* aaa */ + /* bbbb */ + /* ccccc*/ + /* */ + /* */ + /*************/ +:EOF \ No newline at end of file diff --git a/test/065_size_missing_argument.expected.tmp b/test/065_size_missing_argument.expected.tmp new file mode 100644 index 0000000..9531e1a --- /dev/null +++ b/test/065_size_missing_argument.expected.tmp @@ -0,0 +1,3 @@ +..\src\boxes: option requires an argument -- 's' +Usage: boxes [options] [infile [outfile]] +Try `boxes -h' for more information. diff --git a/test/065_size_missing_argument.input.tmp b/test/065_size_missing_argument.input.tmp new file mode 100644 index 0000000..257cc56 --- /dev/null +++ b/test/065_size_missing_argument.input.tmp @@ -0,0 +1 @@ +foo diff --git a/test/065_size_missing_argument.out.tmp b/test/065_size_missing_argument.out.tmp new file mode 100644 index 0000000..8dfe38c --- /dev/null +++ b/test/065_size_missing_argument.out.tmp @@ -0,0 +1,3 @@ +c:\Users\Thomas\Projects\boxes\src\boxes.exe: option requires an argument -- s +Usage: boxes [options] [infile [outfile]] +Try `boxes -h' for more information. diff --git a/test/065_size_missing_argument.txt b/test/065_size_missing_argument.txt new file mode 100644 index 0000000..d278256 --- /dev/null +++ b/test/065_size_missing_argument.txt @@ -0,0 +1,9 @@ +:ARGS +-s +:INPUT +foo +:EXPECTED-ERROR 1 +..\src\boxes: option requires an argument -- 's' +Usage: boxes [options] [infile [outfile]] +Try `boxes -h' for more information. +:EOF \ No newline at end of file diff --git a/test/066_size_invalid_spec.txt b/test/066_size_invalid_spec.txt new file mode 100644 index 0000000..e43412d --- /dev/null +++ b/test/066_size_invalid_spec.txt @@ -0,0 +1,7 @@ +:ARGS +-s -2x3 +:INPUT +foo +:EXPECTED-ERROR 1 +boxes: invalid box size specification -- -2x3 +:EOF \ No newline at end of file diff --git a/test/067_size_as_small_as_possible_vertical.txt b/test/067_size_as_small_as_possible_vertical.txt new file mode 100644 index 0000000..e1fd8aa --- /dev/null +++ b/test/067_size_as_small_as_possible_vertical.txt @@ -0,0 +1,13 @@ +:ARGS +-s 0x1 +:INPUT +aaa +bbbb +ccccc +:EXPECTED +/*********/ +/* aaa */ +/* bbbb */ +/* ccccc */ +/*********/ +:EOF \ No newline at end of file diff --git a/test/068_size_single_argument.txt b/test/068_size_single_argument.txt new file mode 100644 index 0000000..f85d3af --- /dev/null +++ b/test/068_size_single_argument.txt @@ -0,0 +1,13 @@ +:ARGS +-s 15 +:INPUT +aaa +bbbb +ccccc +:EXPECTED +/*************/ +/* aaa */ +/* bbbb */ +/* ccccc */ +/*************/ +:EOF \ No newline at end of file diff --git a/test/069_size_single_argument_x.txt b/test/069_size_single_argument_x.txt new file mode 100644 index 0000000..437e7a3 --- /dev/null +++ b/test/069_size_single_argument_x.txt @@ -0,0 +1,15 @@ +:ARGS +-s x7 +:INPUT +aaa +bbbb +ccccc +:EXPECTED +/*********/ +/* aaa */ +/* bbbb */ +/* ccccc */ +/* */ +/* */ +/*********/ +:EOF \ No newline at end of file diff --git a/test/070_size_as_small_as_possible_horiz.txt b/test/070_size_as_small_as_possible_horiz.txt new file mode 100644 index 0000000..9cad9d7 --- /dev/null +++ b/test/070_size_as_small_as_possible_horiz.txt @@ -0,0 +1,13 @@ +:ARGS +-s 1x0 +:INPUT +aaa +bbbb +ccccc +:EXPECTED +/*******/ +/*aaa */ +/*bbbb */ +/*ccccc*/ +/*******/ +:EOF \ No newline at end of file diff --git a/test/071_size_invalid_spec_0x0.txt b/test/071_size_invalid_spec_0x0.txt new file mode 100644 index 0000000..46dab0b --- /dev/null +++ b/test/071_size_invalid_spec_0x0.txt @@ -0,0 +1,7 @@ +:ARGS +-s 0x0 +:INPUT +foo +:EXPECTED-ERROR 1 +boxes: invalid box size specification -- 0x0 +:EOF \ No newline at end of file