mirror of
https://github.com/ascii-boxes/boxes.git
synced 2025-01-06 05:58:50 +01:00
Added some test cases for size option
This commit is contained in:
parent
3a50173447
commit
b8f0f6fc2c
3
test/004_missing_option_argument.expected.tmp
Normal file
3
test/004_missing_option_argument.expected.tmp
Normal file
@ -0,0 +1,3 @@
|
||||
../src/boxes: option requires an argument -- 's'
|
||||
Usage: boxes [options] [infile [outfile]]
|
||||
Try `boxes -h' for more information.
|
0
test/004_missing_option_argument.input.tmp
Normal file
0
test/004_missing_option_argument.input.tmp
Normal file
3
test/004_missing_option_argument.out.tmp
Normal file
3
test/004_missing_option_argument.out.tmp
Normal file
@ -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.
|
18
test/053_size_25x10.txt
Normal file
18
test/053_size_25x10.txt
Normal file
@ -0,0 +1,18 @@
|
||||
:ARGS
|
||||
-s 25x10
|
||||
:INPUT
|
||||
aaa
|
||||
bbbb
|
||||
ccccc
|
||||
:EXPECTED
|
||||
/***********************/
|
||||
/* aaa */
|
||||
/* bbbb */
|
||||
/* ccccc */
|
||||
/* */
|
||||
/* */
|
||||
/* */
|
||||
/* */
|
||||
/* */
|
||||
/***********************/
|
||||
:EOF
|
14
test/054_size_vs_padding_1.txt
Normal file
14
test/054_size_vs_padding_1.txt
Normal file
@ -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
|
14
test/055_size_vs_padding_2.txt
Normal file
14
test/055_size_vs_padding_2.txt
Normal file
@ -0,0 +1,14 @@
|
||||
Size takes precedence over padding
|
||||
:ARGS
|
||||
-s 9x5
|
||||
:INPUT
|
||||
aaa
|
||||
bbbb
|
||||
ccccc
|
||||
:EXPECTED
|
||||
/*******/
|
||||
/*aaa */
|
||||
/*bbbb */
|
||||
/*ccccc*/
|
||||
/*******/
|
||||
:EOF
|
14
test/056_input_vs_size.txt
Normal file
14
test/056_input_vs_size.txt
Normal file
@ -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
|
14
test/057_size_vs_padding_2.txt
Normal file
14
test/057_size_vs_padding_2.txt
Normal file
@ -0,0 +1,14 @@
|
||||
:ARGS
|
||||
-p v1h10 -s 30x6
|
||||
:INPUT
|
||||
aaa
|
||||
bbbb
|
||||
ccccc
|
||||
:EXPECTED
|
||||
/****************************/
|
||||
/* aaa */
|
||||
/* bbbb */
|
||||
/* ccccc */
|
||||
/* */
|
||||
/****************************/
|
||||
:EOF
|
24
test/058_size_minimum_by_design.txt
Normal file
24
test/058_size_minimum_by_design.txt
Normal file
@ -0,0 +1,24 @@
|
||||
:ARGS
|
||||
-d diamonds -s 15x7
|
||||
:INPUT
|
||||
aaa
|
||||
bbbb
|
||||
ccccc
|
||||
:EXPECTED
|
||||
/\ /\ /\
|
||||
/\//\\/\ /\//\\/\ /\//\\/\
|
||||
/\//\\\///\\/\//\\\///\\/\//\\\///\\/\
|
||||
//\\\//\/\\///\\\//\/\\///\\\//\/\\///\\
|
||||
\\//\/aaa \/\\//
|
||||
\/ bbbb \/
|
||||
/\ ccccc /\
|
||||
//\\ //\\
|
||||
\\// \\//
|
||||
\/ \/
|
||||
/\ /\
|
||||
//\\/\ /\//\\
|
||||
\\///\\/\//\\\///\\/\//\\\///\\/\//\\\//
|
||||
\/\\///\\\//\/\\///\\\//\/\\///\\\//\/
|
||||
\/\\//\/ \/\\//\/ \/\\//\/
|
||||
\/ \/ \/
|
||||
:EOF
|
24
test/059_size_same_as_design.txt
Normal file
24
test/059_size_same_as_design.txt
Normal file
@ -0,0 +1,24 @@
|
||||
:ARGS
|
||||
-d diamonds -s 40x16
|
||||
:INPUT
|
||||
aaa
|
||||
bbbb
|
||||
ccccc
|
||||
:EXPECTED
|
||||
/\ /\ /\
|
||||
/\//\\/\ /\//\\/\ /\//\\/\
|
||||
/\//\\\///\\/\//\\\///\\/\//\\\///\\/\
|
||||
//\\\//\/\\///\\\//\/\\///\\\//\/\\///\\
|
||||
\\//\/aaa \/\\//
|
||||
\/ bbbb \/
|
||||
/\ ccccc /\
|
||||
//\\ //\\
|
||||
\\// \\//
|
||||
\/ \/
|
||||
/\ /\
|
||||
//\\/\ /\//\\
|
||||
\\///\\/\//\\\///\\/\//\\\///\\/\//\\\//
|
||||
\/\\///\\\//\/\\///\\\//\/\\///\\\//\/
|
||||
\/\\//\/ \/\\//\/ \/\\//\/
|
||||
\/ \/ \/
|
||||
:EOF
|
28
test/060_size_1_extra_line.txt
Normal file
28
test/060_size_1_extra_line.txt
Normal file
@ -0,0 +1,28 @@
|
||||
:ARGS
|
||||
-d diamonds -s 40x17
|
||||
:INPUT
|
||||
aaa
|
||||
bbbb
|
||||
ccccc
|
||||
:EXPECTED
|
||||
/\ /\ /\
|
||||
/\//\\/\ /\//\\/\ /\//\\/\
|
||||
/\//\\\///\\/\//\\\///\\/\//\\\///\\/\
|
||||
//\\\//\/\\///\\\//\/\\///\\\//\/\\///\\
|
||||
\\//\/aaa \/\\//
|
||||
\/ bbbb \/
|
||||
/\ ccccc /\
|
||||
//\\ //\\
|
||||
\\// \\//
|
||||
\/ \/
|
||||
/\ /\
|
||||
//\\ //\\
|
||||
\\// \\//
|
||||
\/ \/
|
||||
/\ /\
|
||||
//\\/\ /\//\\
|
||||
\\///\\/\//\\\///\\/\//\\\///\\/\//\\\//
|
||||
\/\\///\\\//\/\\///\\\//\/\\///\\\//\/
|
||||
\/\\//\/ \/\\//\/ \/\\//\/
|
||||
\/ \/ \/
|
||||
:EOF
|
28
test/061_size_1_extra_line_and_1_extra_column.txt
Normal file
28
test/061_size_1_extra_line_and_1_extra_column.txt
Normal file
@ -0,0 +1,28 @@
|
||||
:ARGS
|
||||
-d diamonds -s 41x17
|
||||
:INPUT
|
||||
aaa
|
||||
bbbb
|
||||
ccccc
|
||||
:EXPECTED
|
||||
/\ /\ /\ /\
|
||||
/\//\\/\ /\//\\/\ /\//\\/\ /\//\\/\
|
||||
/\//\\\///\\/\//\\\///\\/\//\\\///\\/\//\\\///\\/\
|
||||
//\\\//\/\\///\\\//\/\\///\\\//\/\\///\\\//\/\\///\\
|
||||
\\//\/aaa \/\\//
|
||||
\/ bbbb \/
|
||||
/\ ccccc /\
|
||||
//\\ //\\
|
||||
\\// \\//
|
||||
\/ \/
|
||||
/\ /\
|
||||
//\\ //\\
|
||||
\\// \\//
|
||||
\/ \/
|
||||
/\ /\
|
||||
//\\/\ /\//\\
|
||||
\\///\\/\//\\\///\\/\//\\\///\\/\//\\\///\\/\//\\\//
|
||||
\/\\///\\\//\/\\///\\\//\/\\///\\\//\/\\///\\\//\/
|
||||
\/\\//\/ \/\\//\/ \/\\//\/ \/\\//\/
|
||||
\/ \/ \/ \/
|
||||
:EOF
|
15
test/062_size_with_indent.txt
Normal file
15
test/062_size_with_indent.txt
Normal file
@ -0,0 +1,15 @@
|
||||
:ARGS
|
||||
-s 15x7
|
||||
:INPUT
|
||||
aaa
|
||||
bbbb
|
||||
ccccc
|
||||
:EXPECTED
|
||||
/*************/
|
||||
/* aaa */
|
||||
/* bbbb */
|
||||
/* ccccc */
|
||||
/* */
|
||||
/* */
|
||||
/*************/
|
||||
:EOF
|
15
test/063_size_with_indent_and_padding.txt
Normal file
15
test/063_size_with_indent_and_padding.txt
Normal file
@ -0,0 +1,15 @@
|
||||
:ARGS
|
||||
-s 15x7 -p l2
|
||||
:INPUT
|
||||
aaa
|
||||
bbbb
|
||||
ccccc
|
||||
:EXPECTED
|
||||
/*************/
|
||||
/* aaa */
|
||||
/* bbbb */
|
||||
/* ccccc */
|
||||
/* */
|
||||
/* */
|
||||
/*************/
|
||||
:EOF
|
15
test/064_size_with_indent_and_too_much_padding.txt
Normal file
15
test/064_size_with_indent_and_too_much_padding.txt
Normal file
@ -0,0 +1,15 @@
|
||||
:ARGS
|
||||
-s 15x7 -p l10
|
||||
:INPUT
|
||||
aaa
|
||||
bbbb
|
||||
ccccc
|
||||
:EXPECTED
|
||||
/*************/
|
||||
/* aaa */
|
||||
/* bbbb */
|
||||
/* ccccc*/
|
||||
/* */
|
||||
/* */
|
||||
/*************/
|
||||
:EOF
|
3
test/065_size_missing_argument.expected.tmp
Normal file
3
test/065_size_missing_argument.expected.tmp
Normal file
@ -0,0 +1,3 @@
|
||||
..\src\boxes: option requires an argument -- 's'
|
||||
Usage: boxes [options] [infile [outfile]]
|
||||
Try `boxes -h' for more information.
|
1
test/065_size_missing_argument.input.tmp
Normal file
1
test/065_size_missing_argument.input.tmp
Normal file
@ -0,0 +1 @@
|
||||
foo
|
3
test/065_size_missing_argument.out.tmp
Normal file
3
test/065_size_missing_argument.out.tmp
Normal file
@ -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.
|
9
test/065_size_missing_argument.txt
Normal file
9
test/065_size_missing_argument.txt
Normal file
@ -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
|
7
test/066_size_invalid_spec.txt
Normal file
7
test/066_size_invalid_spec.txt
Normal file
@ -0,0 +1,7 @@
|
||||
:ARGS
|
||||
-s -2x3
|
||||
:INPUT
|
||||
foo
|
||||
:EXPECTED-ERROR 1
|
||||
boxes: invalid box size specification -- -2x3
|
||||
:EOF
|
13
test/067_size_as_small_as_possible_vertical.txt
Normal file
13
test/067_size_as_small_as_possible_vertical.txt
Normal file
@ -0,0 +1,13 @@
|
||||
:ARGS
|
||||
-s 0x1
|
||||
:INPUT
|
||||
aaa
|
||||
bbbb
|
||||
ccccc
|
||||
:EXPECTED
|
||||
/*********/
|
||||
/* aaa */
|
||||
/* bbbb */
|
||||
/* ccccc */
|
||||
/*********/
|
||||
:EOF
|
13
test/068_size_single_argument.txt
Normal file
13
test/068_size_single_argument.txt
Normal file
@ -0,0 +1,13 @@
|
||||
:ARGS
|
||||
-s 15
|
||||
:INPUT
|
||||
aaa
|
||||
bbbb
|
||||
ccccc
|
||||
:EXPECTED
|
||||
/*************/
|
||||
/* aaa */
|
||||
/* bbbb */
|
||||
/* ccccc */
|
||||
/*************/
|
||||
:EOF
|
15
test/069_size_single_argument_x.txt
Normal file
15
test/069_size_single_argument_x.txt
Normal file
@ -0,0 +1,15 @@
|
||||
:ARGS
|
||||
-s x7
|
||||
:INPUT
|
||||
aaa
|
||||
bbbb
|
||||
ccccc
|
||||
:EXPECTED
|
||||
/*********/
|
||||
/* aaa */
|
||||
/* bbbb */
|
||||
/* ccccc */
|
||||
/* */
|
||||
/* */
|
||||
/*********/
|
||||
:EOF
|
13
test/070_size_as_small_as_possible_horiz.txt
Normal file
13
test/070_size_as_small_as_possible_horiz.txt
Normal file
@ -0,0 +1,13 @@
|
||||
:ARGS
|
||||
-s 1x0
|
||||
:INPUT
|
||||
aaa
|
||||
bbbb
|
||||
ccccc
|
||||
:EXPECTED
|
||||
/*******/
|
||||
/*aaa */
|
||||
/*bbbb */
|
||||
/*ccccc*/
|
||||
/*******/
|
||||
:EOF
|
7
test/071_size_invalid_spec_0x0.txt
Normal file
7
test/071_size_invalid_spec_0x0.txt
Normal file
@ -0,0 +1,7 @@
|
||||
:ARGS
|
||||
-s 0x0
|
||||
:INPUT
|
||||
foo
|
||||
:EXPECTED-ERROR 1
|
||||
boxes: invalid box size specification -- 0x0
|
||||
:EOF
|
Loading…
Reference in New Issue
Block a user