├── utest ├── dummy_in.txt ├── global_mock.h └── regulex_test.h ├── README-0.gif ├── test ├── 111_manual_encoding_iso.txt ├── 001_trivial.txt ├── 151_tag_query_no_results.txt ├── 164_tag_query_empty.txt ├── 144_tag_query_minus2.txt ├── 142_tag_query_plus2.txt ├── 049_alignment_illegal_format.txt ├── 066_size_invalid_spec.txt ├── 071_size_invalid_spec_0x0.txt ├── 003_no_config_file.txt ├── 129_data │ ├── D.cfg │ ├── A.cfg │ ├── C.cfg │ └── B.cfg ├── 146_tag_query_invalid.txt ├── 095_ansi_basic.txt ├── 096_ansi_within.txt ├── 172_c_centering.txt ├── 052_simple_line_comment.txt ├── 141_tag_query_plus.txt ├── 002_trivial_10x5.txt ├── 163_tag_query_minus3.txt ├── 127_data │ ├── A.cfg │ ├── C.cfg │ └── B.cfg ├── 143_tag_query_minus.txt ├── 148_tag_query_duplicate_expression.txt ├── 149_tag_query_duplicate_expression2.txt ├── 191_data │ ├── parent_ü.cfg │ └── main.cfg ├── 130_data │ ├── A.cfg │ └── B.cfg ├── 070_size_as_small_as_possible_horiz.txt ├── 171_c_right_justify.txt ├── 014_alignment_single_line_l.txt ├── 015_alignment_single_line_c.txt ├── 016_alignment_single_line_r.txt ├── 128_data │ ├── C.cfg │ ├── A.cfg │ └── B.cfg ├── 005_alignment_single_line_hlvt.txt ├── 006_alignment_single_line_hlvc.txt ├── 007_alignment_single_line_hlvb.txt ├── 008_alignment_single_line_hcvt.txt ├── 009_alignment_single_line_hcvc.txt ├── 010_alignment_single_line_hcvb.txt ├── 011_alignment_single_line_hrvt.txt ├── 012_alignment_single_line_hrvc.txt ├── 013_alignment_single_line_hrvb.txt ├── 050_alignment_multiline_nop1.txt ├── 067_size_as_small_as_possible_vertical.txt ├── 051_alignment_multiline_nop2.txt ├── 068_size_single_argument.txt ├── 075_tab_unexpand.txt ├── 140_tag_query_normal.txt ├── 166_design_alias_parent_clash.parent.cfg ├── 145_tag_query_all.txt ├── 165_design_alias_parent_override.parent.cfg ├── 174_non_ascii_design_name.cfg ├── 055_size_vs_padding_2.txt ├── 074_tab_keep_size4.txt ├── 080_tab_expand_size4.txt ├── 069_size_single_argument_x.txt ├── 081_tab_unexpand_size4_fromNone.txt ├── 073_tab_expanded_size4.txt ├── 155_eol_control_invalid.txt ├── 056_input_vs_size.txt ├── 072_tab_expanded_split.txt ├── 076_tab_keep_size4_withContent.txt ├── 082_tab_unexpand_size4_split.txt ├── 132_data │ ├── A.cfg │ └── B.cfg ├── 194_logging_with_parent_configs.txt ├── 054_size_vs_padding_1.txt ├── 122_no_config_file_dir.txt ├── 045_alignment_multiline_c.txt ├── 046_alignment_multiline_r.txt ├── 078_tab_unexpand_size8_withContent2.txt ├── 132_parent_configs_speedmode.txt ├── sunny-day │ ├── _input.txt │ ├── f90-cmt.create.txt │ ├── pound-cmt.create.txt │ ├── tex-cmt.create.txt │ ├── vim-cmt.create.txt │ ├── ada-cmt.create.txt │ ├── java-cmt.create.txt │ ├── lisp-cmt.create.txt │ ├── f90-cmt.mend.txt │ ├── pound-cmt.mend.txt │ ├── tex-cmt.mend.txt │ ├── vim-cmt.mend.txt │ ├── ada-cmt.mend.txt │ ├── java-cmt.mend.txt │ ├── javadoc.create.txt │ ├── lisp-cmt.mend.txt │ ├── boxquote.create.txt │ ├── c-cmt2.create.txt │ ├── javadoc.mend.txt │ ├── boxquote.mend.txt │ ├── c-cmt2.mend.txt │ ├── c-cmt.create.txt │ ├── underline.create.txt │ ├── html-cmt.create.txt │ ├── right.create.txt │ ├── underline.mend.txt │ ├── c-cmt.mend.txt │ ├── html-cmt.mend.txt │ ├── right.mend.txt │ ├── ansi.create.txt │ ├── f90-box.create.txt │ ├── shell.create.txt │ ├── simple.create.txt │ ├── stone.create.txt │ ├── tex-box.create.txt │ ├── vim-box.create.txt │ ├── ansi-dashed.create.txt │ ├── ansi-double.create.txt │ ├── ansi-heavy.create.txt │ ├── ansi-rounded.create.txt │ ├── cc.create.txt │ ├── ansi-heavy-dashed.create.txt │ ├── c.create.txt │ ├── jstone.create.txt │ ├── stark1.create.txt │ ├── ada-box.create.txt │ ├── ansi-rounded-dashed.create.txt │ ├── caml.create.txt │ ├── html.create.txt │ ├── peek.create.txt │ ├── ansi.mend.txt │ ├── shell.mend.txt │ ├── stone.mend.txt │ ├── ansi-heavy.mend.txt │ ├── cc.mend.txt │ ├── f90-box.mend.txt │ ├── simple.mend.txt │ ├── tex-box.mend.txt │ ├── vim-box.mend.txt │ ├── ansi-dashed.mend.txt │ ├── ansi-double.mend.txt │ ├── ansi-rounded.mend.txt │ ├── c.mend.txt │ ├── jstone.mend.txt │ ├── ansi-heavy-dashed.mend.txt │ ├── ansi-rounded-dashed.mend.txt │ ├── caml.mend.txt │ ├── stark1.mend.txt │ ├── ada-box.mend.txt │ ├── html.mend.txt │ ├── peek.mend.txt │ ├── columns.create.txt │ ├── parchment.create.txt │ ├── important.create.txt │ ├── whirly.create.txt │ ├── face.create.txt │ ├── columns.mend.txt │ ├── scroll-akn.create.txt │ ├── parchment.mend.txt │ ├── cowsay.create.txt │ ├── fence.create.txt │ ├── important.mend.txt │ ├── whirly.mend.txt │ ├── tux.create.txt │ ├── face.mend.txt │ ├── scroll-akn.mend.txt │ ├── cowsay.mend.txt │ ├── nuke.create.txt │ ├── fence.mend.txt │ ├── xes.create.txt │ ├── stark2.create.txt │ ├── headline.create.txt │ ├── tux.mend.txt │ ├── ian_jones.create.txt │ ├── important2.create.txt │ ├── mouse.create.txt │ ├── scroll.create.txt │ ├── boy.create.txt │ ├── girl.create.txt │ ├── sunset.create.txt │ ├── dog.create.txt │ ├── nuke.mend.txt │ ├── santa.create.txt │ ├── stark2.mend.txt │ ├── capgirl.create.txt │ ├── cat.create.txt │ ├── xes.mend.txt │ ├── important2.mend.txt │ ├── scroll.mend.txt │ ├── headline.mend.txt │ ├── ian_jones.mend.txt │ ├── mouse.mend.txt │ ├── boy.mend.txt │ ├── girl.mend.txt │ ├── sunset.mend.txt │ ├── dog.mend.txt │ ├── unicornsay.create.txt │ ├── unicornthink.create.txt │ ├── cat.mend.txt │ ├── santa.mend.txt │ ├── capgirl.mend.txt │ ├── important3.create.txt │ ├── spring.create.txt │ ├── diamonds.create.txt │ ├── spring.mend.txt │ ├── important3.mend.txt │ ├── unicornsay.mend.txt │ └── unicornthink.mend.txt ├── 188_design_not_detectable.txt ├── 017_alignment_multiline_hlvtjl.txt ├── 019_alignment_multiline_hlvtjr.txt ├── 020_alignment_multiline_hlvcjl.txt ├── 021_alignment_multiline_hlvcjc.txt ├── 022_alignment_multiline_hlvcjr.txt ├── 023_alignment_multiline_hlvbjl.txt ├── 024_alignment_multiline_hlvbjc.txt ├── 025_alignment_multiline_hlvbjr.txt ├── 026_alignment_multiline_hcvtjl.txt ├── 027_alignment_multiline_hcvtjc.txt ├── 028_alignment_multiline_hcvtjr.txt ├── 029_alignment_multiline_hcvcjl.txt ├── 030_alignment_multiline_hcvcjc.txt ├── 031_alignment_multiline_hcvcjr.txt ├── 032_alignment_multiline_hcvbjl.txt ├── 033_alignment_multiline_hcvbjc.txt ├── 034_alignment_multiline_hcvbjr.txt ├── 035_alignment_multiline_hrvtjl.txt ├── 036_alignment_multiline_hrvtjc.txt ├── 037_alignment_multiline_hrvtjr.txt ├── 038_alignment_multiline_hrvcjl.txt ├── 039_alignment_multiline_hrvcjc.txt ├── 040_alignment_multiline_hrvcjr.txt ├── 041_alignment_multiline_hrvbjl.txt ├── 042_alignment_multiline_hrvbjc.txt ├── 043_alignment_multiline_hrvbjr.txt ├── 048_alignment_multiline_vertical_round_down.txt ├── 079_tab_keep_size8.txt ├── 135_design_alias_by_design.cfg ├── 044_alignment_multiline_l.txt ├── 191_unicode_parent_config.txt ├── 062_size_with_indent.txt ├── 125_config_file_wrong_BOXES_var.txt ├── 130_multiple_parent_configs_inherited_design.txt ├── 063_size_with_indent_and_padding.txt ├── 064_size_with_indent_and_too_much_padding.txt ├── 004_missing_option_argument.txt ├── 057_size_vs_padding_2.txt ├── 065_size_missing_argument.txt ├── 131_data │ ├── C.cfg │ ├── A.cfg │ └── B.cfg ├── 133_comments_in_strings.cfg ├── 133_comments_in_strings.txt ├── 134_comments_in_sample.cfg ├── 193_logging2.txt ├── 018_alignment_multiline_hlvtjc.txt ├── 047_alignment_multiline_none.txt ├── 165_design_alias_parent_override.cfg ├── 166_design_alias_parent_clash.cfg ├── 077_tab_unexpand_size8_withContent.txt ├── 126_config_file_xdg3.txt ├── 187_remove_line_comments_killblank.txt ├── 167_duplicate_primary_name.cfg ├── 123_config_file_xdg1.txt ├── 189_blank_lines_surrounding_box.txt ├── 153_eol_control_lf.txt ├── 154_eol_control_cr.txt ├── 159_eol_control_lf_remove.txt ├── 120_parser_unterminated_string.cfg ├── 158_eol_control_crlf_remove.txt ├── 053_size_25x10.txt ├── 112_manual_encoding_invalid.txt ├── 126_data │ ├── xdg │ │ └── boxes │ │ │ └── boxes-config │ └── home │ │ └── boxes-config ├── 177_utf8_generate_box.txt ├── 124_config_file_xdg2.txt ├── 124_data │ ├── home │ │ └── .config │ │ │ └── boxes │ │ │ └── boxes-config │ └── xdg │ │ └── boxes │ │ └── boxes-config ├── 168_parent_keyword_in_sample_ok.cfg ├── 174_non_ascii_design_name.txt ├── 097_ansi_mixed.txt ├── 169_peek_escape_comments.txt ├── 099_ansi_align_left.txt ├── 100_ansi_align_center.txt ├── 101_ansi_align_right.txt ├── 134_comments_in_sample.txt ├── 152_eol_control_crlf.txt ├── 186_remove_line_comments.txt ├── 120_parser_unterminated_string.txt ├── 098_ansi_mixed_indent.txt ├── 170_forbid_blank_box.cfg ├── 176_utf8_design_list.txt ├── 113_headline_ansi_unicode.txt ├── 123_data │ └── .config │ │ └── boxes │ │ └── boxes-config ├── 128_multiple_parent_configs_cycle.txt ├── 147_tag_stats_list.txt ├── 167_duplicate_primary_name.txt ├── 102_ansi_size.txt ├── 136_design_alias_by_alias.txt ├── 138_design_alias_duplicate_name.txt ├── 166_design_alias_parent_clash.txt ├── 127_multiple_parent_configs.txt ├── 170_forbid_blank_box.txt ├── 160_list_designs_author_designer.txt ├── 192_logging1.txt ├── 139_parent_config_without_file.txt ├── 129_multiple_parent_configs_empty_base.txt ├── 139_parent_config_without_file.cfg ├── 182_remove_box_ignore_invisible_shape.txt ├── 084_list_design_info_for_cmdline_definition.txt ├── 058_size_minimum_by_design.txt ├── 059_size_same_as_design.txt ├── 114_headline_ansi_unicode_remove.txt ├── 184_create_box_colored_contents.txt ├── 135_design_alias_by_design.txt ├── 168_parent_keyword_in_sample_ok.txt ├── 190_remove_blank_nw_lines.txt ├── 137_design_alias_no_accumulation.txt ├── 103_ansi_pad.txt ├── 185_remove_box_uncolor_contents.txt ├── 138_design_alias_duplicate_name.cfg ├── 165_design_alias_parent_override.txt ├── 060_size_1_extra_line.txt ├── 083_list_design_info.txt ├── 175_utf8_happy_design_info.cfg ├── 150_tag_config_invalid_tags.txt ├── 131_multiple_parent_configs_ref_after_broken.txt ├── 177_utf8_generate_box.cfg ├── 137_design_alias_no_accumulation.cfg ├── 150_tag_config_invalid_tags.cfg ├── 106_unicode_align_center.txt ├── 136_design_alias_by_alias.cfg ├── 175_utf8_happy_design_info.txt └── 061_size_1_extra_line_and_1_extra_column.txt ├── .vscode ├── extensions.json └── c_cpp_properties.json ├── .github └── CONTRIBUTING.md ├── tools └── VERIFICATION.txt ├── src ├── generate.h └── discovery.h ├── .gitattributes └── README.Win32.md /utest/dummy_in.txt: -------------------------------------------------------------------------------- 1 | Test fixture. Do not remove. 2 | -------------------------------------------------------------------------------- /README-0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ascii-boxes/boxes/HEAD/README-0.gif -------------------------------------------------------------------------------- /test/111_manual_encoding_iso.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ascii-boxes/boxes/HEAD/test/111_manual_encoding_iso.txt -------------------------------------------------------------------------------- /test/001_trivial.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | :INPUT 3 | foo 4 | :OUTPUT-FILTER 5 | :EXPECTED 6 | /*******/ 7 | /* foo */ 8 | /*******/ 9 | :EOF -------------------------------------------------------------------------------- /test/151_tag_query_no_results.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -f 14x_tag_query.cfg -q non-existent 3 | :INPUT 4 | :OUTPUT-FILTER 5 | :EXPECTED 6 | :EOF 7 | -------------------------------------------------------------------------------- /test/164_tag_query_empty.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -q ,, 3 | :INPUT 4 | :OUTPUT-FILTER 5 | :EXPECTED-ERROR 1 6 | boxes: empty tag query -- ,, 7 | :EOF 8 | -------------------------------------------------------------------------------- /test/144_tag_query_minus2.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -f 14x_tag_query.cfg -q -tag1,-tag2 3 | :INPUT 4 | :OUTPUT-FILTER 5 | :EXPECTED 6 | designD 7 | :EOF 8 | -------------------------------------------------------------------------------- /test/142_tag_query_plus2.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -f 14x_tag_query.cfg -q +tag1,+tag3 3 | :INPUT 4 | :OUTPUT-FILTER 5 | :EXPECTED 6 | designA 7 | aliasA1 (alias) 8 | :EOF 9 | -------------------------------------------------------------------------------- /test/049_alignment_illegal_format.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -a mistake 3 | :INPUT 4 | foo 5 | :OUTPUT-FILTER 6 | :EXPECTED-ERROR 1 7 | boxes: Illegal text format -- mistake 8 | :EOF -------------------------------------------------------------------------------- /test/066_size_invalid_spec.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s -2x3 3 | :INPUT 4 | foo 5 | :OUTPUT-FILTER 6 | :EXPECTED-ERROR 1 7 | boxes: invalid box size specification -- -2x3 8 | :EOF -------------------------------------------------------------------------------- /test/071_size_invalid_spec_0x0.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 0x0 3 | :INPUT 4 | foo 5 | :OUTPUT-FILTER 6 | :EXPECTED-ERROR 1 7 | boxes: invalid box size specification -- 0x0 8 | :EOF -------------------------------------------------------------------------------- /test/003_no_config_file.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -f nonexistent 3 | :INPUT 4 | :OUTPUT-FILTER 5 | :EXPECTED-ERROR 1 6 | boxes: Couldn't find config file at 'nonexistent' 7 | :EOF 8 | -------------------------------------------------------------------------------- /test/129_data/D.cfg: -------------------------------------------------------------------------------- 1 | # This file has only parent definitions, but no box designs at all. 2 | 3 | parent 129_data/A.cfg 4 | parent 129_data/B.cfg 5 | parent 129_data/C.cfg -------------------------------------------------------------------------------- /test/146_tag_query_invalid.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -f 146_tag_query.cfg -q INVALID 3 | :INPUT 4 | :OUTPUT-FILTER 5 | :EXPECTED-ERROR 1 6 | boxes: not a tag -- INVALID 7 | :EOF 8 | -------------------------------------------------------------------------------- /test/095_ansi_basic.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | :INPUT 3 | abcdef 4 | :OUTPUT-FILTER 5 | :EXPECTED 6 | /**********/ 7 | /* abcdef */ 8 | /**********/ 9 | :EOF 10 | -------------------------------------------------------------------------------- /test/096_ansi_within.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | :INPUT 3 | abcdef 4 | :OUTPUT-FILTER 5 | :EXPECTED 6 | /**********/ 7 | /* abcdef */ 8 | /**********/ 9 | :EOF 10 | -------------------------------------------------------------------------------- /test/172_c_centering.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 100 -a hcvc -c " " 3 | :INPUT 4 | foo 5 | :OUTPUT-FILTER 6 | :EXPECTED 7 | foo 8 | :EOF 9 | -------------------------------------------------------------------------------- /test/052_simple_line_comment.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -c "#" 3 | :INPUT 4 | a 5 | 6 | bbb 7 | 8 | 9 | :OUTPUT-FILTER 10 | :EXPECTED 11 | # a 12 | # 13 | # bbb 14 | # 15 | # 16 | :EOF -------------------------------------------------------------------------------- /test/141_tag_query_plus.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -f 14x_tag_query.cfg -q +tag1,tag2 3 | :INPUT 4 | :OUTPUT-FILTER 5 | :EXPECTED 6 | designA 7 | aliasA1 (alias) 8 | designC 9 | :EOF 10 | -------------------------------------------------------------------------------- /test/002_trivial_10x5.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 10x5 3 | :INPUT 4 | foo 5 | :OUTPUT-FILTER 6 | :EXPECTED 7 | /********/ 8 | /* foo */ 9 | /* */ 10 | /* */ 11 | /********/ 12 | :EOF -------------------------------------------------------------------------------- /test/163_tag_query_minus3.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -f 14x_tag_query.cfg -q -tag1,tag2 3 | :INPUT 4 | :OUTPUT-FILTER 5 | :EXPECTED 6 | designB 7 | aliasB1 (alias) 8 | aliasB2 (alias) 9 | :EOF 10 | -------------------------------------------------------------------------------- /test/127_data/A.cfg: -------------------------------------------------------------------------------- 1 | BOX designA 2 | 3 | sample 4 | A from config file A 5 | ends 6 | 7 | shapes { 8 | w ("A") 9 | } 10 | 11 | elastic ( 12 | w 13 | ) 14 | 15 | END designA 16 | -------------------------------------------------------------------------------- /test/143_tag_query_minus.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -f 14x_tag_query.cfg -q -tag1 3 | :INPUT 4 | :OUTPUT-FILTER 5 | :EXPECTED 6 | designB 7 | aliasB1 (alias) 8 | aliasB2 (alias) 9 | designD 10 | :EOF 11 | -------------------------------------------------------------------------------- /test/148_tag_query_duplicate_expression.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -f 14x_tag_query.cfg -q -tag1,+tag1 3 | :INPUT 4 | :OUTPUT-FILTER 5 | :EXPECTED-ERROR 1 6 | boxes: duplicate query expression -- +tag1 7 | :EOF 8 | -------------------------------------------------------------------------------- /test/149_tag_query_duplicate_expression2.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -f 14x_tag_query.cfg -q -tag1,tag1 3 | :INPUT 4 | :OUTPUT-FILTER 5 | :EXPECTED-ERROR 1 6 | boxes: duplicate query expression -- tag1 7 | :EOF 8 | -------------------------------------------------------------------------------- /test/129_data/A.cfg: -------------------------------------------------------------------------------- 1 | 2 | BOX designA 3 | 4 | sample 5 | A from config file A 6 | ends 7 | 8 | shapes { 9 | w ("A") 10 | } 11 | 12 | elastic ( 13 | w 14 | ) 15 | 16 | END designA 17 | -------------------------------------------------------------------------------- /test/129_data/C.cfg: -------------------------------------------------------------------------------- 1 | 2 | BOX designC 3 | 4 | sample 5 | C from config file C 6 | ends 7 | 8 | shapes { 9 | w ("C") 10 | } 11 | 12 | elastic ( 13 | w 14 | ) 15 | 16 | END designC 17 | -------------------------------------------------------------------------------- /test/191_data/parent_ü.cfg: -------------------------------------------------------------------------------- 1 | BOX designB 2 | 3 | sample 4 | B from config file parent_ü 5 | ends 6 | 7 | shapes { 8 | w ("BBB") 9 | } 10 | 11 | elastic ( 12 | w 13 | ) 14 | 15 | END designB 16 | -------------------------------------------------------------------------------- /test/130_data/A.cfg: -------------------------------------------------------------------------------- 1 | 2 | BOX designA 3 | 4 | sample 5 | A from config file A 6 | ends 7 | 8 | shapes { 9 | w ("AAA", "AAA", "AAA") 10 | } 11 | 12 | elastic ( 13 | w 14 | ) 15 | 16 | END designA 17 | -------------------------------------------------------------------------------- /test/070_size_as_small_as_possible_horiz.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 1x0 3 | :INPUT 4 | aaa 5 | bbbb 6 | ccccc 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /*******/ 10 | /*aaa */ 11 | /*bbbb */ 12 | /*ccccc*/ 13 | /*******/ 14 | :EOF -------------------------------------------------------------------------------- /test/171_c_right_justify.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 100 -a hr -c " " 3 | :INPUT 4 | foo 5 | :OUTPUT-FILTER 6 | :EXPECTED 7 | foo 8 | :EOF 9 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "ms-vscode.cpptools", 4 | "gruntfuggly.todo-tree", 5 | "daohong-emilio.yash", 6 | "dunstontc.viml", 7 | "ban.troff" 8 | ] 9 | } -------------------------------------------------------------------------------- /test/014_alignment_single_line_l.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 15x5 -a l 3 | :INPUT 4 | foo 5 | :OUTPUT-FILTER 6 | :EXPECTED 7 | /*************/ 8 | /* */ 9 | /* foo */ 10 | /* */ 11 | /*************/ 12 | :EOF -------------------------------------------------------------------------------- /test/015_alignment_single_line_c.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 15x5 -a c 3 | :INPUT 4 | foo 5 | :OUTPUT-FILTER 6 | :EXPECTED 7 | /*************/ 8 | /* */ 9 | /* foo */ 10 | /* */ 11 | /*************/ 12 | :EOF -------------------------------------------------------------------------------- /test/016_alignment_single_line_r.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 15x5 -a r 3 | :INPUT 4 | foo 5 | :OUTPUT-FILTER 6 | :EXPECTED 7 | /*************/ 8 | /* */ 9 | /* foo */ 10 | /* */ 11 | /*************/ 12 | :EOF -------------------------------------------------------------------------------- /test/127_data/C.cfg: -------------------------------------------------------------------------------- 1 | parent 127_data/B.cfg 2 | 3 | BOX designC 4 | 5 | sample 6 | C from config file C 7 | ends 8 | 9 | shapes { 10 | w ("C") 11 | } 12 | 13 | elastic ( 14 | w 15 | ) 16 | 17 | END designC 18 | -------------------------------------------------------------------------------- /test/128_data/C.cfg: -------------------------------------------------------------------------------- 1 | parent 128_data/B.cfg 2 | 3 | BOX designC 4 | 5 | sample 6 | C from config file C 7 | ends 8 | 9 | shapes { 10 | w ("C") 11 | } 12 | 13 | elastic ( 14 | w 15 | ) 16 | 17 | END designC 18 | -------------------------------------------------------------------------------- /test/005_alignment_single_line_hlvt.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 15x5 -a hlvt 3 | :INPUT 4 | foo 5 | :OUTPUT-FILTER 6 | :EXPECTED 7 | /*************/ 8 | /* foo */ 9 | /* */ 10 | /* */ 11 | /*************/ 12 | :EOF -------------------------------------------------------------------------------- /test/006_alignment_single_line_hlvc.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 15x5 -a hlvc 3 | :INPUT 4 | foo 5 | :OUTPUT-FILTER 6 | :EXPECTED 7 | /*************/ 8 | /* */ 9 | /* foo */ 10 | /* */ 11 | /*************/ 12 | :EOF -------------------------------------------------------------------------------- /test/007_alignment_single_line_hlvb.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 15x5 -a hlvb 3 | :INPUT 4 | foo 5 | :OUTPUT-FILTER 6 | :EXPECTED 7 | /*************/ 8 | /* */ 9 | /* */ 10 | /* foo */ 11 | /*************/ 12 | :EOF -------------------------------------------------------------------------------- /test/008_alignment_single_line_hcvt.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 15x5 -a hcvt 3 | :INPUT 4 | foo 5 | :OUTPUT-FILTER 6 | :EXPECTED 7 | /*************/ 8 | /* foo */ 9 | /* */ 10 | /* */ 11 | /*************/ 12 | :EOF -------------------------------------------------------------------------------- /test/009_alignment_single_line_hcvc.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 15x5 -a hcvc 3 | :INPUT 4 | foo 5 | :OUTPUT-FILTER 6 | :EXPECTED 7 | /*************/ 8 | /* */ 9 | /* foo */ 10 | /* */ 11 | /*************/ 12 | :EOF -------------------------------------------------------------------------------- /test/010_alignment_single_line_hcvb.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 15x5 -a hcvb 3 | :INPUT 4 | foo 5 | :OUTPUT-FILTER 6 | :EXPECTED 7 | /*************/ 8 | /* */ 9 | /* */ 10 | /* foo */ 11 | /*************/ 12 | :EOF -------------------------------------------------------------------------------- /test/011_alignment_single_line_hrvt.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 15x5 -a hrvt 3 | :INPUT 4 | foo 5 | :OUTPUT-FILTER 6 | :EXPECTED 7 | /*************/ 8 | /* foo */ 9 | /* */ 10 | /* */ 11 | /*************/ 12 | :EOF -------------------------------------------------------------------------------- /test/012_alignment_single_line_hrvc.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 15x5 -a hrvc 3 | :INPUT 4 | foo 5 | :OUTPUT-FILTER 6 | :EXPECTED 7 | /*************/ 8 | /* */ 9 | /* foo */ 10 | /* */ 11 | /*************/ 12 | :EOF -------------------------------------------------------------------------------- /test/013_alignment_single_line_hrvb.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 15x5 -a hrvb 3 | :INPUT 4 | foo 5 | :OUTPUT-FILTER 6 | :EXPECTED 7 | /*************/ 8 | /* */ 9 | /* */ 10 | /* foo */ 11 | /*************/ 12 | :EOF -------------------------------------------------------------------------------- /test/050_alignment_multiline_nop1.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 11x5 -a c 3 | :INPUT 4 | XXXXX 5 | XXXXX 6 | XXXXX 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /*********/ 10 | /* XXXXX */ 11 | /* XXXXX */ 12 | /* XXXXX */ 13 | /*********/ 14 | :EOF -------------------------------------------------------------------------------- /test/067_size_as_small_as_possible_vertical.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 0x1 3 | :INPUT 4 | aaa 5 | bbbb 6 | ccccc 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /*********/ 10 | /* aaa */ 11 | /* bbbb */ 12 | /* ccccc */ 13 | /*********/ 14 | :EOF -------------------------------------------------------------------------------- /test/051_alignment_multiline_nop2.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 11x5 -a hrvbjr 3 | :INPUT 4 | XXXXX 5 | XXXXX 6 | XXXXX 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /*********/ 10 | /* XXXXX */ 11 | /* XXXXX */ 12 | /* XXXXX */ 13 | /*********/ 14 | :EOF -------------------------------------------------------------------------------- /test/068_size_single_argument.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 15 3 | :INPUT 4 | aaa 5 | bbbb 6 | ccccc 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /*************/ 10 | /* aaa */ 11 | /* bbbb */ 12 | /* ccccc */ 13 | /*************/ 14 | :EOF -------------------------------------------------------------------------------- /test/075_tab_unexpand.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -t 4u 3 | :INPUT 4 | XXXXXX 5 | XXXXXX 6 | XXXXXX 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /**********/ 10 | /* XXXXXX */ 11 | /* XXXXXX */ 12 | /* XXXXXX */ 13 | /**********/ 14 | :EOF -------------------------------------------------------------------------------- /test/130_data/B.cfg: -------------------------------------------------------------------------------- 1 | parent 130_data/A.cfg 2 | 3 | 4 | BOX designB 5 | 6 | sample 7 | B from config file B 8 | ends 9 | 10 | shapes { 11 | w ("BBB") 12 | } 13 | 14 | elastic ( 15 | w 16 | ) 17 | 18 | END designB 19 | -------------------------------------------------------------------------------- /test/140_tag_query_normal.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -f 14x_tag_query.cfg -q tag1,tag2 3 | :INPUT 4 | :OUTPUT-FILTER 5 | :EXPECTED 6 | designA 7 | aliasA1 (alias) 8 | designB 9 | aliasB1 (alias) 10 | aliasB2 (alias) 11 | designC 12 | :EOF 13 | -------------------------------------------------------------------------------- /test/166_design_alias_parent_clash.parent.cfg: -------------------------------------------------------------------------------- 1 | BOX designA, alias1, alias2 2 | 3 | sample 4 | A from parent config 5 | ends 6 | 7 | shapes { 8 | w ("A") 9 | } 10 | 11 | elastic ( 12 | w 13 | ) 14 | 15 | END designA 16 | -------------------------------------------------------------------------------- /test/128_data/A.cfg: -------------------------------------------------------------------------------- 1 | 2 | parent 128_data/B.cfg 3 | 4 | 5 | BOX designA 6 | 7 | sample 8 | A from config file A 9 | ends 10 | 11 | shapes { 12 | w ("A") 13 | } 14 | 15 | elastic ( 16 | w 17 | ) 18 | 19 | END designA 20 | -------------------------------------------------------------------------------- /test/145_tag_query_all.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -f 14x_tag_query.cfg -q "(all)" 3 | :INPUT 4 | :OUTPUT-FILTER 5 | :EXPECTED 6 | designA 7 | aliasA1 (alias) 8 | designB 9 | aliasB1 (alias) 10 | aliasB2 (alias) 11 | designC 12 | designD 13 | :EOF 14 | -------------------------------------------------------------------------------- /test/165_design_alias_parent_override.parent.cfg: -------------------------------------------------------------------------------- 1 | BOX designA, alias1, alias2 2 | 3 | sample 4 | A from parent config 5 | ends 6 | 7 | shapes { 8 | w ("A") 9 | } 10 | 11 | elastic ( 12 | w 13 | ) 14 | 15 | END designA 16 | -------------------------------------------------------------------------------- /test/174_non_ascii_design_name.cfg: -------------------------------------------------------------------------------- 1 | 2 | BOX käse 3 | 4 | sample 5 | cheese 6 | ends 7 | 8 | shapes { 9 | w ("cheese") 10 | } 11 | 12 | elastic ( 13 | w 14 | ) 15 | 16 | padding { 17 | left 1 18 | } 19 | 20 | END käse 21 | -------------------------------------------------------------------------------- /test/055_size_vs_padding_2.txt: -------------------------------------------------------------------------------- 1 | Size takes precedence over padding 2 | :ARGS 3 | -s 9x5 4 | :INPUT 5 | aaa 6 | bbbb 7 | ccccc 8 | :OUTPUT-FILTER 9 | :EXPECTED 10 | /*******/ 11 | /*aaa */ 12 | /*bbbb */ 13 | /*ccccc*/ 14 | /*******/ 15 | :EOF -------------------------------------------------------------------------------- /test/074_tab_keep_size4.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -t 4k 3 | :INPUT 4 | XXXXXX 5 | XXXXXX 6 | XXXXXX 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /**********/ 10 | /* XXXXXX */ 11 | /* XXXXXX */ 12 | /* XXXXXX */ 13 | /**********/ 14 | :EOF -------------------------------------------------------------------------------- /test/080_tab_expand_size4.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -t 4 3 | :INPUT 4 | XXXXXX 5 | XXXXXX 6 | XXXXXX 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /**********/ 10 | /* XXXXXX */ 11 | /* XXXXXX */ 12 | /* XXXXXX */ 13 | /**********/ 14 | :EOF -------------------------------------------------------------------------------- /test/069_size_single_argument_x.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s x7 3 | :INPUT 4 | aaa 5 | bbbb 6 | ccccc 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /*********/ 10 | /* aaa */ 11 | /* bbbb */ 12 | /* ccccc */ 13 | /* */ 14 | /* */ 15 | /*********/ 16 | :EOF -------------------------------------------------------------------------------- /test/081_tab_unexpand_size4_fromNone.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -t 4u 3 | :INPUT 4 | XXXXXX 5 | XXXXXX 6 | XXXXXX 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /**********/ 10 | /* XXXXXX */ 11 | /* XXXXXX */ 12 | /* XXXXXX */ 13 | /**********/ 14 | :EOF -------------------------------------------------------------------------------- /test/073_tab_expanded_size4.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -t 4 3 | :INPUT 4 | XXXXXX 5 | XXXXXX 6 | XXXXXX 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /**********/ 10 | /* XXXXXX */ 11 | /* XXXXXX */ 12 | /* XXXXXX */ 13 | /**********/ 14 | :EOF -------------------------------------------------------------------------------- /test/155_eol_control_invalid.txt: -------------------------------------------------------------------------------- 1 | :DESC 2 | Test that invalid line terminator specs are properly reported. 3 | 4 | :ARGS 5 | -e INVALID 6 | :INPUT 7 | foo 8 | :OUTPUT-FILTER 9 | :EXPECTED-ERROR 1 10 | boxes: invalid eol spec -- INVALID 11 | :EOF 12 | -------------------------------------------------------------------------------- /test/056_input_vs_size.txt: -------------------------------------------------------------------------------- 1 | Input length takes precedence over size option 2 | :ARGS 3 | -s 2x2 -p a2 4 | :INPUT 5 | aaa 6 | bbbb 7 | ccccc 8 | :OUTPUT-FILTER 9 | :EXPECTED 10 | /*******/ 11 | /*aaa */ 12 | /*bbbb */ 13 | /*ccccc*/ 14 | /*******/ 15 | :EOF -------------------------------------------------------------------------------- /test/191_data/main.cfg: -------------------------------------------------------------------------------- 1 | 2 | parent 191_data/parent_ü.cfg 3 | 4 | BOX designA 5 | 6 | sample 7 | A from config file main 8 | ends 9 | 10 | shapes { 11 | w ("AAA", "AAA", "AAA") 12 | } 13 | 14 | elastic ( 15 | w 16 | ) 17 | 18 | END designA 19 | -------------------------------------------------------------------------------- /test/072_tab_expanded_split.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | :INPUT 3 | XXXXXX 4 | XXXXXX 5 | XXXXXX 6 | :OUTPUT-FILTER 7 | :EXPECTED 8 | /**************/ 9 | /* XXXXXX */ 10 | /* XXXXXX */ 11 | /* XXXXXX */ 12 | /**************/ 13 | :EOF -------------------------------------------------------------------------------- /test/076_tab_keep_size4_withContent.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -t 4k 3 | :INPUT 4 | XXXXXX 5 | XXX XXX 6 | XXXXXX 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /***********/ 10 | /* XXXXXX */ 11 | /* XXX XXX */ 12 | /* XXXXXX */ 13 | /***********/ 14 | :EOF -------------------------------------------------------------------------------- /test/082_tab_unexpand_size4_split.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -t 4u 3 | :INPUT 4 | XXXXXX 5 | XXXXXX 6 | XXXXXX 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /**********/ 10 | /* XXXXXX */ 11 | /* XXXXXX */ 12 | /* XXXXXX */ 13 | /**********/ 14 | :EOF -------------------------------------------------------------------------------- /test/132_data/A.cfg: -------------------------------------------------------------------------------- 1 | 2 | BOX designD 3 | 4 | sample 5 | DDD 6 | DDD foo 7 | DDD 8 | ends 9 | 10 | shapes { 11 | w ("DDD", "DDD", "DDD") 12 | } 13 | 14 | elastic ( 15 | w 16 | ) 17 | 18 | padding { 19 | left 1 20 | } 21 | 22 | END designD 23 | -------------------------------------------------------------------------------- /test/194_logging_with_parent_configs.txt: -------------------------------------------------------------------------------- 1 | :DESC 2 | Test case 130 with logging turned on. 3 | 4 | :ARGS 5 | -f 130_data/B.cfg -d designA -p l1 -a vc -x debug:all 6 | :INPUT 7 | foo 8 | :OUTPUT-FILTER 9 | :EXPECTED discard-stderr 10 | AAA 11 | AAA foo 12 | AAA 13 | :EOF 14 | -------------------------------------------------------------------------------- /test/054_size_vs_padding_1.txt: -------------------------------------------------------------------------------- 1 | Size takes precedence over padding, left padding is killed first 2 | :ARGS 3 | -s 10x5 4 | :INPUT 5 | aaa 6 | bbbb 7 | ccccc 8 | :OUTPUT-FILTER 9 | :EXPECTED 10 | /********/ 11 | /*aaa */ 12 | /*bbbb */ 13 | /*ccccc */ 14 | /********/ 15 | :EOF -------------------------------------------------------------------------------- /test/122_no_config_file_dir.txt: -------------------------------------------------------------------------------- 1 | :DESC 2 | Like 003, but the argument to -f exists and is a directory, but does not contain the config. 3 | 4 | :ARGS 5 | -f . 6 | :INPUT 7 | :OUTPUT-FILTER 8 | :EXPECTED-ERROR 1 9 | boxes: Couldn't find config file in directory '.' 10 | :EOF 11 | -------------------------------------------------------------------------------- /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Boxes 2 | 3 | :+1::tada: First off, thanks for taking the time to contribute! :tada::+1: 4 | 5 | Our contribution guidelines and information are on the *boxes* website and may be found here: 6 | https://boxes.thomasjensen.com/contributing.html 7 | -------------------------------------------------------------------------------- /test/045_alignment_multiline_c.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 15x7 -a c 3 | :INPUT 4 | aaa 5 | bbbb 6 | ccccc 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /*************/ 10 | /* */ 11 | /* aaa */ 12 | /* bbbb */ 13 | /* ccccc */ 14 | /* */ 15 | /*************/ 16 | :EOF -------------------------------------------------------------------------------- /test/046_alignment_multiline_r.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 15x7 -a r 3 | :INPUT 4 | aaa 5 | bbbb 6 | ccccc 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /*************/ 10 | /* */ 11 | /* aaa */ 12 | /* bbbb */ 13 | /* ccccc */ 14 | /* */ 15 | /*************/ 16 | :EOF -------------------------------------------------------------------------------- /test/078_tab_unexpand_size8_withContent2.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -t 8u 3 | :INPUT 4 | XXXXXX 5 | XXX XXX 6 | XXXXXX 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /***************/ 10 | /* XXXXXX */ 11 | /* XXX XXX */ 12 | /* XXXXXX */ 13 | /***************/ 14 | :EOF -------------------------------------------------------------------------------- /test/132_parent_configs_speedmode.txt: -------------------------------------------------------------------------------- 1 | :DESC 2 | The parent ref is found even while skipping over designs to find the specified one. 3 | 4 | :ARGS 5 | -f 132_data/B.cfg -avc -d designD 6 | :INPUT 7 | foo 8 | :OUTPUT-FILTER 9 | :EXPECTED 10 | DDD 11 | DDD foo 12 | DDD 13 | :EOF 14 | -------------------------------------------------------------------------------- /test/sunny-day/_input.txt: -------------------------------------------------------------------------------- 1 | (includes some Unicode characters) 2 | Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, 3 | sed diam nonumy éirmod tempor invidunt ut labore 4 | et dolore magna aliquyam erat, sed diam voluptua. 5 | At vero eos et accusam et justo duo dolores et ea rebum. 6 | -------------------------------------------------------------------------------- /test/188_design_not_detectable.txt: -------------------------------------------------------------------------------- 1 | :DESC 2 | Tests that a proper error message is produced when the box design cannot be detected. 3 | 4 | :ARGS 5 | -r 6 | :INPUT 7 | foo 8 | :OUTPUT-FILTER 9 | :EXPECTED-ERROR 1 10 | boxes: Box design autodetection failed. Use -d option. 11 | :EOF 12 | -------------------------------------------------------------------------------- /test/017_alignment_multiline_hlvtjl.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 15x7 -a hlvtjl 3 | :INPUT 4 | aaa 5 | bbbb 6 | ccccc 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /*************/ 10 | /* aaa */ 11 | /* bbbb */ 12 | /* ccccc */ 13 | /* */ 14 | /* */ 15 | /*************/ 16 | :EOF -------------------------------------------------------------------------------- /test/019_alignment_multiline_hlvtjr.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 15x7 -a hlvtjr 3 | :INPUT 4 | aaa 5 | bbbb 6 | ccccc 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /*************/ 10 | /* aaa */ 11 | /* bbbb */ 12 | /* ccccc */ 13 | /* */ 14 | /* */ 15 | /*************/ 16 | :EOF -------------------------------------------------------------------------------- /test/020_alignment_multiline_hlvcjl.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 15x7 -a hlvcjl 3 | :INPUT 4 | aaa 5 | bbbb 6 | ccccc 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /*************/ 10 | /* */ 11 | /* aaa */ 12 | /* bbbb */ 13 | /* ccccc */ 14 | /* */ 15 | /*************/ 16 | :EOF -------------------------------------------------------------------------------- /test/021_alignment_multiline_hlvcjc.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 15x7 -a hlvcjc 3 | :INPUT 4 | aaa 5 | bbbb 6 | ccccc 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /*************/ 10 | /* */ 11 | /* aaa */ 12 | /* bbbb */ 13 | /* ccccc */ 14 | /* */ 15 | /*************/ 16 | :EOF -------------------------------------------------------------------------------- /test/022_alignment_multiline_hlvcjr.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 15x7 -a hlvcjr 3 | :INPUT 4 | aaa 5 | bbbb 6 | ccccc 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /*************/ 10 | /* */ 11 | /* aaa */ 12 | /* bbbb */ 13 | /* ccccc */ 14 | /* */ 15 | /*************/ 16 | :EOF -------------------------------------------------------------------------------- /test/023_alignment_multiline_hlvbjl.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 15x7 -a hlvbjl 3 | :INPUT 4 | aaa 5 | bbbb 6 | ccccc 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /*************/ 10 | /* */ 11 | /* */ 12 | /* aaa */ 13 | /* bbbb */ 14 | /* ccccc */ 15 | /*************/ 16 | :EOF -------------------------------------------------------------------------------- /test/024_alignment_multiline_hlvbjc.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 15x7 -a hlvbjc 3 | :INPUT 4 | aaa 5 | bbbb 6 | ccccc 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /*************/ 10 | /* */ 11 | /* */ 12 | /* aaa */ 13 | /* bbbb */ 14 | /* ccccc */ 15 | /*************/ 16 | :EOF -------------------------------------------------------------------------------- /test/025_alignment_multiline_hlvbjr.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 15x7 -a hlvbjr 3 | :INPUT 4 | aaa 5 | bbbb 6 | ccccc 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /*************/ 10 | /* */ 11 | /* */ 12 | /* aaa */ 13 | /* bbbb */ 14 | /* ccccc */ 15 | /*************/ 16 | :EOF -------------------------------------------------------------------------------- /test/026_alignment_multiline_hcvtjl.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 15x7 -a hcvtjl 3 | :INPUT 4 | aaa 5 | bbbb 6 | ccccc 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /*************/ 10 | /* aaa */ 11 | /* bbbb */ 12 | /* ccccc */ 13 | /* */ 14 | /* */ 15 | /*************/ 16 | :EOF -------------------------------------------------------------------------------- /test/027_alignment_multiline_hcvtjc.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 15x7 -a hcvtjc 3 | :INPUT 4 | aaa 5 | bbbb 6 | ccccc 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /*************/ 10 | /* aaa */ 11 | /* bbbb */ 12 | /* ccccc */ 13 | /* */ 14 | /* */ 15 | /*************/ 16 | :EOF -------------------------------------------------------------------------------- /test/028_alignment_multiline_hcvtjr.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 15x7 -a hcvtjr 3 | :INPUT 4 | aaa 5 | bbbb 6 | ccccc 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /*************/ 10 | /* aaa */ 11 | /* bbbb */ 12 | /* ccccc */ 13 | /* */ 14 | /* */ 15 | /*************/ 16 | :EOF -------------------------------------------------------------------------------- /test/029_alignment_multiline_hcvcjl.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 15x7 -a hcvcjl 3 | :INPUT 4 | aaa 5 | bbbb 6 | ccccc 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /*************/ 10 | /* */ 11 | /* aaa */ 12 | /* bbbb */ 13 | /* ccccc */ 14 | /* */ 15 | /*************/ 16 | :EOF -------------------------------------------------------------------------------- /test/030_alignment_multiline_hcvcjc.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 15x7 -a hcvcjc 3 | :INPUT 4 | aaa 5 | bbbb 6 | ccccc 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /*************/ 10 | /* */ 11 | /* aaa */ 12 | /* bbbb */ 13 | /* ccccc */ 14 | /* */ 15 | /*************/ 16 | :EOF -------------------------------------------------------------------------------- /test/031_alignment_multiline_hcvcjr.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 15x7 -a hcvcjr 3 | :INPUT 4 | aaa 5 | bbbb 6 | ccccc 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /*************/ 10 | /* */ 11 | /* aaa */ 12 | /* bbbb */ 13 | /* ccccc */ 14 | /* */ 15 | /*************/ 16 | :EOF -------------------------------------------------------------------------------- /test/032_alignment_multiline_hcvbjl.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 15x7 -a hcvbjl 3 | :INPUT 4 | aaa 5 | bbbb 6 | ccccc 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /*************/ 10 | /* */ 11 | /* */ 12 | /* aaa */ 13 | /* bbbb */ 14 | /* ccccc */ 15 | /*************/ 16 | :EOF -------------------------------------------------------------------------------- /test/033_alignment_multiline_hcvbjc.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 15x7 -a hcvbjc 3 | :INPUT 4 | aaa 5 | bbbb 6 | ccccc 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /*************/ 10 | /* */ 11 | /* */ 12 | /* aaa */ 13 | /* bbbb */ 14 | /* ccccc */ 15 | /*************/ 16 | :EOF -------------------------------------------------------------------------------- /test/034_alignment_multiline_hcvbjr.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 15x7 -a hcvbjr 3 | :INPUT 4 | aaa 5 | bbbb 6 | ccccc 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /*************/ 10 | /* */ 11 | /* */ 12 | /* aaa */ 13 | /* bbbb */ 14 | /* ccccc */ 15 | /*************/ 16 | :EOF -------------------------------------------------------------------------------- /test/035_alignment_multiline_hrvtjl.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 15x7 -a hrvtjl 3 | :INPUT 4 | aaa 5 | bbbb 6 | ccccc 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /*************/ 10 | /* aaa */ 11 | /* bbbb */ 12 | /* ccccc */ 13 | /* */ 14 | /* */ 15 | /*************/ 16 | :EOF -------------------------------------------------------------------------------- /test/036_alignment_multiline_hrvtjc.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 15x7 -a hrvtjc 3 | :INPUT 4 | aaa 5 | bbbb 6 | ccccc 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /*************/ 10 | /* aaa */ 11 | /* bbbb */ 12 | /* ccccc */ 13 | /* */ 14 | /* */ 15 | /*************/ 16 | :EOF -------------------------------------------------------------------------------- /test/037_alignment_multiline_hrvtjr.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 15x7 -a hrvtjr 3 | :INPUT 4 | aaa 5 | bbbb 6 | ccccc 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /*************/ 10 | /* aaa */ 11 | /* bbbb */ 12 | /* ccccc */ 13 | /* */ 14 | /* */ 15 | /*************/ 16 | :EOF -------------------------------------------------------------------------------- /test/038_alignment_multiline_hrvcjl.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 15x7 -a hrvcjl 3 | :INPUT 4 | aaa 5 | bbbb 6 | ccccc 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /*************/ 10 | /* */ 11 | /* aaa */ 12 | /* bbbb */ 13 | /* ccccc */ 14 | /* */ 15 | /*************/ 16 | :EOF -------------------------------------------------------------------------------- /test/039_alignment_multiline_hrvcjc.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 15x7 -a hrvcjc 3 | :INPUT 4 | aaa 5 | bbbb 6 | ccccc 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /*************/ 10 | /* */ 11 | /* aaa */ 12 | /* bbbb */ 13 | /* ccccc */ 14 | /* */ 15 | /*************/ 16 | :EOF -------------------------------------------------------------------------------- /test/040_alignment_multiline_hrvcjr.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 15x7 -a hrvcjr 3 | :INPUT 4 | aaa 5 | bbbb 6 | ccccc 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /*************/ 10 | /* */ 11 | /* aaa */ 12 | /* bbbb */ 13 | /* ccccc */ 14 | /* */ 15 | /*************/ 16 | :EOF -------------------------------------------------------------------------------- /test/041_alignment_multiline_hrvbjl.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 15x7 -a hrvbjl 3 | :INPUT 4 | aaa 5 | bbbb 6 | ccccc 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /*************/ 10 | /* */ 11 | /* */ 12 | /* aaa */ 13 | /* bbbb */ 14 | /* ccccc */ 15 | /*************/ 16 | :EOF -------------------------------------------------------------------------------- /test/042_alignment_multiline_hrvbjc.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 15x7 -a hrvbjc 3 | :INPUT 4 | aaa 5 | bbbb 6 | ccccc 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /*************/ 10 | /* */ 11 | /* */ 12 | /* aaa */ 13 | /* bbbb */ 14 | /* ccccc */ 15 | /*************/ 16 | :EOF -------------------------------------------------------------------------------- /test/043_alignment_multiline_hrvbjr.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 15x7 -a hrvbjr 3 | :INPUT 4 | aaa 5 | bbbb 6 | ccccc 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /*************/ 10 | /* */ 11 | /* */ 12 | /* aaa */ 13 | /* bbbb */ 14 | /* ccccc */ 15 | /*************/ 16 | :EOF -------------------------------------------------------------------------------- /test/048_alignment_multiline_vertical_round_down.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 15x7 -a c 3 | :INPUT 4 | aaa 5 | bbbb 6 | :OUTPUT-FILTER 7 | :EXPECTED 8 | /*************/ 9 | /* */ 10 | /* aaa */ 11 | /* bbbb */ 12 | /* */ 13 | /* */ 14 | /*************/ 15 | :EOF -------------------------------------------------------------------------------- /test/079_tab_keep_size8.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -t 8k 3 | :INPUT 4 | XXXXXX 5 | XXX XXX 6 | XXXXXX 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /***************/ 10 | /* XXXXXX */ 11 | /* XXX XXX */ 12 | /* XXXXXX */ 13 | /***************/ 14 | :EOF -------------------------------------------------------------------------------- /test/135_design_alias_by_design.cfg: -------------------------------------------------------------------------------- 1 | 2 | BOX design, alias1, alias2 3 | 4 | sample 5 | X your text X 6 | ends 7 | 8 | shapes { 9 | w ("X") 10 | e ("X") 11 | } 12 | 13 | elastic ( 14 | e, w 15 | ) 16 | 17 | padding { 18 | horizontal 1 19 | } 20 | 21 | END design 22 | -------------------------------------------------------------------------------- /test/044_alignment_multiline_l.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 15x7 -a l 3 | :INPUT 4 | aaa 5 | bbbb 6 | ccccc 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /*************/ 10 | /* */ 11 | /* aaa */ 12 | /* bbbb */ 13 | /* ccccc */ 14 | /* */ 15 | /*************/ 16 | :EOF 17 | -------------------------------------------------------------------------------- /test/191_unicode_parent_config.txt: -------------------------------------------------------------------------------- 1 | :DESC 2 | Reference a design from a parent config defined in a config file with a UTF-8 file name. 3 | 4 | :ARGS 5 | -f 191_data/main.cfg -d designB -p l1 -s x3 -a vc 6 | :INPUT 7 | foo 8 | :OUTPUT-FILTER 9 | :EXPECTED 10 | BBB 11 | BBB foo 12 | BBB 13 | :EOF 14 | -------------------------------------------------------------------------------- /test/sunny-day/f90-cmt.create.txt: -------------------------------------------------------------------------------- 1 | ! (includes some Unicode characters) 2 | ! Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, 3 | ! sed diam nonumy éirmod tempor invidunt ut labore 4 | ! et dolore magna aliquyam erat, sed diam voluptua. 5 | ! At vero eos et accusam et justo duo dolores et ea rebum. 6 | -------------------------------------------------------------------------------- /test/sunny-day/pound-cmt.create.txt: -------------------------------------------------------------------------------- 1 | # (includes some Unicode characters) 2 | # Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, 3 | # sed diam nonumy éirmod tempor invidunt ut labore 4 | # et dolore magna aliquyam erat, sed diam voluptua. 5 | # At vero eos et accusam et justo duo dolores et ea rebum. 6 | -------------------------------------------------------------------------------- /test/sunny-day/tex-cmt.create.txt: -------------------------------------------------------------------------------- 1 | % (includes some Unicode characters) 2 | % Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, 3 | % sed diam nonumy éirmod tempor invidunt ut labore 4 | % et dolore magna aliquyam erat, sed diam voluptua. 5 | % At vero eos et accusam et justo duo dolores et ea rebum. 6 | -------------------------------------------------------------------------------- /test/sunny-day/vim-cmt.create.txt: -------------------------------------------------------------------------------- 1 | " (includes some Unicode characters) 2 | " Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, 3 | " sed diam nonumy éirmod tempor invidunt ut labore 4 | " et dolore magna aliquyam erat, sed diam voluptua. 5 | " At vero eos et accusam et justo duo dolores et ea rebum. 6 | -------------------------------------------------------------------------------- /test/sunny-day/ada-cmt.create.txt: -------------------------------------------------------------------------------- 1 | -- (includes some Unicode characters) 2 | -- Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, 3 | -- sed diam nonumy éirmod tempor invidunt ut labore 4 | -- et dolore magna aliquyam erat, sed diam voluptua. 5 | -- At vero eos et accusam et justo duo dolores et ea rebum. 6 | -------------------------------------------------------------------------------- /test/sunny-day/java-cmt.create.txt: -------------------------------------------------------------------------------- 1 | // (includes some Unicode characters) 2 | // Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, 3 | // sed diam nonumy éirmod tempor invidunt ut labore 4 | // et dolore magna aliquyam erat, sed diam voluptua. 5 | // At vero eos et accusam et justo duo dolores et ea rebum. 6 | -------------------------------------------------------------------------------- /test/sunny-day/lisp-cmt.create.txt: -------------------------------------------------------------------------------- 1 | ;; (includes some Unicode characters) 2 | ;; Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, 3 | ;; sed diam nonumy éirmod tempor invidunt ut labore 4 | ;; et dolore magna aliquyam erat, sed diam voluptua. 5 | ;; At vero eos et accusam et justo duo dolores et ea rebum. 6 | -------------------------------------------------------------------------------- /test/062_size_with_indent.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 15x7 3 | :INPUT 4 | aaa 5 | bbbb 6 | ccccc 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /*************/ 10 | /* aaa */ 11 | /* bbbb */ 12 | /* ccccc */ 13 | /* */ 14 | /* */ 15 | /*************/ 16 | :EOF -------------------------------------------------------------------------------- /test/sunny-day/f90-cmt.mend.txt: -------------------------------------------------------------------------------- 1 | ! (includes some Unicode characters) 2 | ! Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, 3 | ! sed diam nonumy éirmod tempor invidunt ut labore 4 | ! __ET__ dolore magna aliquyam erat, sed diam voluptua. 5 | ! At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. 6 | -------------------------------------------------------------------------------- /test/sunny-day/pound-cmt.mend.txt: -------------------------------------------------------------------------------- 1 | # (includes some Unicode characters) 2 | # Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, 3 | # sed diam nonumy éirmod tempor invidunt ut labore 4 | # __ET__ dolore magna aliquyam erat, sed diam voluptua. 5 | # At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. 6 | -------------------------------------------------------------------------------- /test/sunny-day/tex-cmt.mend.txt: -------------------------------------------------------------------------------- 1 | % (includes some Unicode characters) 2 | % Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, 3 | % sed diam nonumy éirmod tempor invidunt ut labore 4 | % __ET__ dolore magna aliquyam erat, sed diam voluptua. 5 | % At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. 6 | -------------------------------------------------------------------------------- /test/sunny-day/vim-cmt.mend.txt: -------------------------------------------------------------------------------- 1 | " (includes some Unicode characters) 2 | " Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, 3 | " sed diam nonumy éirmod tempor invidunt ut labore 4 | " __ET__ dolore magna aliquyam erat, sed diam voluptua. 5 | " At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. 6 | -------------------------------------------------------------------------------- /test/125_config_file_wrong_BOXES_var.txt: -------------------------------------------------------------------------------- 1 | :DESC 2 | When $BOXES points to the wrong place, that's always an error. 3 | 4 | :ENV 5 | export BOXES=non-existent 6 | :ARGS 7 | :INPUT 8 | :OUTPUT-FILTER 9 | :EXPECTED-ERROR 1 10 | boxes: Couldn't find config file at 'non-existent' from BOXES environment variable 11 | :EOF 12 | -------------------------------------------------------------------------------- /test/130_multiple_parent_configs_inherited_design.txt: -------------------------------------------------------------------------------- 1 | :DESC 2 | Reference a design defined in a parent file, so that no match is found after parsing the first file. 3 | 4 | :ARGS 5 | -f 130_data/B.cfg -d designA -p l1 -a vc 6 | :INPUT 7 | foo 8 | :OUTPUT-FILTER 9 | :EXPECTED 10 | AAA 11 | AAA foo 12 | AAA 13 | :EOF 14 | -------------------------------------------------------------------------------- /test/sunny-day/ada-cmt.mend.txt: -------------------------------------------------------------------------------- 1 | -- (includes some Unicode characters) 2 | -- Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, 3 | -- sed diam nonumy éirmod tempor invidunt ut labore 4 | -- __ET__ dolore magna aliquyam erat, sed diam voluptua. 5 | -- At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. 6 | -------------------------------------------------------------------------------- /test/sunny-day/java-cmt.mend.txt: -------------------------------------------------------------------------------- 1 | // (includes some Unicode characters) 2 | // Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, 3 | // sed diam nonumy éirmod tempor invidunt ut labore 4 | // __ET__ dolore magna aliquyam erat, sed diam voluptua. 5 | // At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. 6 | -------------------------------------------------------------------------------- /test/sunny-day/javadoc.create.txt: -------------------------------------------------------------------------------- 1 | /** 2 | * (includes some Unicode characters) 3 | * Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, 4 | * sed diam nonumy éirmod tempor invidunt ut labore 5 | * et dolore magna aliquyam erat, sed diam voluptua. 6 | * At vero eos et accusam et justo duo dolores et ea rebum. 7 | */ 8 | -------------------------------------------------------------------------------- /test/sunny-day/lisp-cmt.mend.txt: -------------------------------------------------------------------------------- 1 | ;; (includes some Unicode characters) 2 | ;; Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, 3 | ;; sed diam nonumy éirmod tempor invidunt ut labore 4 | ;; __ET__ dolore magna aliquyam erat, sed diam voluptua. 5 | ;; At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. 6 | -------------------------------------------------------------------------------- /test/sunny-day/boxquote.create.txt: -------------------------------------------------------------------------------- 1 | ,---- [ ] 2 | | (includes some Unicode characters) 3 | | Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, 4 | | sed diam nonumy éirmod tempor invidunt ut labore 5 | | et dolore magna aliquyam erat, sed diam voluptua. 6 | | At vero eos et accusam et justo duo dolores et ea rebum. 7 | `---- 8 | -------------------------------------------------------------------------------- /test/sunny-day/c-cmt2.create.txt: -------------------------------------------------------------------------------- 1 | /* 2 | * (includes some Unicode characters) 3 | * Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, 4 | * sed diam nonumy éirmod tempor invidunt ut labore 5 | * et dolore magna aliquyam erat, sed diam voluptua. 6 | * At vero eos et accusam et justo duo dolores et ea rebum. 7 | */ 8 | -------------------------------------------------------------------------------- /test/063_size_with_indent_and_padding.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 15x7 -p l2 3 | :INPUT 4 | aaa 5 | bbbb 6 | ccccc 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /*************/ 10 | /* aaa */ 11 | /* bbbb */ 12 | /* ccccc */ 13 | /* */ 14 | /* */ 15 | /*************/ 16 | :EOF -------------------------------------------------------------------------------- /test/sunny-day/javadoc.mend.txt: -------------------------------------------------------------------------------- 1 | /** 2 | * (includes some Unicode characters) 3 | * Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, 4 | * sed diam nonumy éirmod tempor invidunt ut labore 5 | * __ET__ dolore magna aliquyam erat, sed diam voluptua. 6 | * At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. 7 | */ 8 | -------------------------------------------------------------------------------- /test/064_size_with_indent_and_too_much_padding.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 15x7 -p l10 3 | :INPUT 4 | aaa 5 | bbbb 6 | ccccc 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /*************/ 10 | /* aaa */ 11 | /* bbbb */ 12 | /* ccccc*/ 13 | /* */ 14 | /* */ 15 | /*************/ 16 | :EOF -------------------------------------------------------------------------------- /test/sunny-day/boxquote.mend.txt: -------------------------------------------------------------------------------- 1 | ,---- [ ] 2 | | (includes some Unicode characters) 3 | | Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, 4 | | sed diam nonumy éirmod tempor invidunt ut labore 5 | | __ET__ dolore magna aliquyam erat, sed diam voluptua. 6 | | At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. 7 | `---- 8 | -------------------------------------------------------------------------------- /test/sunny-day/c-cmt2.mend.txt: -------------------------------------------------------------------------------- 1 | /* 2 | * (includes some Unicode characters) 3 | * Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, 4 | * sed diam nonumy éirmod tempor invidunt ut labore 5 | * __ET__ dolore magna aliquyam erat, sed diam voluptua. 6 | * At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. 7 | */ 8 | -------------------------------------------------------------------------------- /test/004_missing_option_argument.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 3 | :INPUT 4 | :OUTPUT-FILTER 5 | 1s/:\\/\\/ 6 | 1s/^[^:]+: /boxes: / 7 | 1s/argument: s/argument -- s/ 8 | 1s/-- s$/-- 's'/ 9 | :EXPECTED-ERROR 1 10 | boxes: option requires an argument -- 's' 11 | Usage: boxes [options] [infile [outfile]] 12 | Try `boxes -h' for more information. 13 | :EOF 14 | -------------------------------------------------------------------------------- /test/057_size_vs_padding_2.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -p v1h10 -s 30x6 3 | :INPUT 4 | aaa 5 | bbbb 6 | ccccc 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /****************************/ 10 | /* aaa */ 11 | /* bbbb */ 12 | /* ccccc */ 13 | /* */ 14 | /****************************/ 15 | :EOF -------------------------------------------------------------------------------- /test/065_size_missing_argument.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 3 | :INPUT 4 | foo 5 | :OUTPUT-FILTER 6 | 1s/:\\/\\/ 7 | 1s/^[^:]+: /boxes: / 8 | 1s/argument: s/argument -- s/ 9 | 1s/-- s$/-- 's'/ 10 | :EXPECTED-ERROR 1 11 | boxes: option requires an argument -- 's' 12 | Usage: boxes [options] [infile [outfile]] 13 | Try `boxes -h' for more information. 14 | :EOF 15 | -------------------------------------------------------------------------------- /test/131_data/C.cfg: -------------------------------------------------------------------------------- 1 | # This config file is valid by itself, but should never be referenced. 2 | 3 | BOX designD 4 | 5 | sample 6 | D from config file C (ERROR!) 7 | ends 8 | 9 | 10 | shapes { 11 | w ("ERROR", "ERROR", "ERROR") 12 | } 13 | 14 | elastic ( 15 | w 16 | ) 17 | 18 | padding { 19 | left 1 20 | } 21 | 22 | END designD 23 | -------------------------------------------------------------------------------- /test/133_comments_in_strings.cfg: -------------------------------------------------------------------------------- 1 | 2 | BOX design 3 | 4 | sample 5 | # looks like a comment - your text here 6 | fooooooooooooooooooooo 7 | ends 8 | 9 | shapes { 10 | w ("# looks like a comment", "fooooooooooooooooooooo") 11 | } 12 | 13 | elastic ( 14 | w 15 | ) 16 | 17 | padding { 18 | left 1 19 | } 20 | 21 | END design 22 | -------------------------------------------------------------------------------- /test/133_comments_in_strings.txt: -------------------------------------------------------------------------------- 1 | :DESC 2 | Strings or sample content which looks like a comment must be treated as a string instead (not a comment). 3 | 4 | :ARGS 5 | -f 133_comments_in_strings.cfg 6 | :INPUT 7 | - your text here 8 | :OUTPUT-FILTER 9 | :EXPECTED 10 | # looks like a comment - your text here 11 | fooooooooooooooooooooo 12 | :EOF 13 | -------------------------------------------------------------------------------- /test/134_comments_in_sample.cfg: -------------------------------------------------------------------------------- 1 | 2 | BOX design 3 | 4 | sample 5 | # looks like a comment - your text here 6 | fooooooooooooooooooooo 7 | ends 8 | 9 | shapes { 10 | w ("# looks like a comment", "fooooooooooooooooooooo") 11 | } 12 | 13 | elastic ( 14 | w 15 | ) 16 | 17 | padding { 18 | left 1 19 | } 20 | 21 | END design 22 | -------------------------------------------------------------------------------- /test/193_logging2.txt: -------------------------------------------------------------------------------- 1 | :DESC 2 | Test case which checks some logging features. 3 | 4 | :ARGS 5 | -d headline -x debug:main,regexp,parser,lexer,DISCOVERY 6 | :INPUT 7 | Hello World! 8 | :OUTPUT-FILTER 9 | :EXPECTED discard-stderr 10 | /*****************************/ 11 | /* H e l l o W o r l d ! */ 12 | /*****************************/ 13 | :EOF 14 | -------------------------------------------------------------------------------- /test/sunny-day/c-cmt.create.txt: -------------------------------------------------------------------------------- 1 | /* (includes some Unicode characters) */ 2 | /* Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, */ 3 | /* sed diam nonumy éirmod tempor invidunt ut labore */ 4 | /* et dolore magna aliquyam erat, sed diam voluptua. */ 5 | /* At vero eos et accusam et justo duo dolores et ea rebum. */ 6 | -------------------------------------------------------------------------------- /test/018_alignment_multiline_hlvtjc.txt: -------------------------------------------------------------------------------- 1 | The row of 'b's shows how position is rounded down if necessary. 2 | :ARGS 3 | -s 15x7 -a hlvtjc 4 | :INPUT 5 | aaa 6 | bbbb 7 | ccccc 8 | :OUTPUT-FILTER 9 | :EXPECTED 10 | /*************/ 11 | /* aaa */ 12 | /* bbbb */ 13 | /* ccccc */ 14 | /* */ 15 | /* */ 16 | /*************/ 17 | :EOF -------------------------------------------------------------------------------- /test/047_alignment_multiline_none.txt: -------------------------------------------------------------------------------- 1 | If no alignment option is given, text is aligned left and put in the top left corner. 2 | :ARGS 3 | -s 15x7 4 | :INPUT 5 | aaa 6 | bbbb 7 | ccccc 8 | :OUTPUT-FILTER 9 | :EXPECTED 10 | /*************/ 11 | /* aaa */ 12 | /* bbbb */ 13 | /* ccccc */ 14 | /* */ 15 | /* */ 16 | /*************/ 17 | :EOF -------------------------------------------------------------------------------- /test/165_design_alias_parent_override.cfg: -------------------------------------------------------------------------------- 1 | parent 165_design_alias_parent_override.parent.cfg 2 | 3 | # the following designA will have these 2 alias names. alias2 will be gone 4 | BOX designA, alias1, alias3 5 | 6 | sample 7 | A from regular config 8 | ends 9 | 10 | shapes { 11 | w ("Ab") 12 | } 13 | 14 | elastic ( 15 | w 16 | ) 17 | 18 | END designA 19 | -------------------------------------------------------------------------------- /test/166_design_alias_parent_clash.cfg: -------------------------------------------------------------------------------- 1 | parent 166_design_alias_parent_clash.parent.cfg 2 | 3 | # the following designB claims alias1, which means designA from the parent config loses it 4 | BOX designB, alias1 5 | 6 | sample 7 | B from regular config 8 | ends 9 | 10 | shapes { 11 | w ("B") 12 | } 13 | 14 | elastic ( 15 | w 16 | ) 17 | 18 | END designB 19 | -------------------------------------------------------------------------------- /test/sunny-day/underline.create.txt: -------------------------------------------------------------------------------- 1 | // (includes some Unicode characters) 2 | // Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, 3 | // sed diam nonumy éirmod tempor invidunt ut labore 4 | // et dolore magna aliquyam erat, sed diam voluptua. 5 | // At vero eos et accusam et justo duo dolores et ea rebum. 6 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7 | -------------------------------------------------------------------------------- /test/sunny-day/html-cmt.create.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /test/077_tab_unexpand_size8_withContent.txt: -------------------------------------------------------------------------------- 1 | Because input lines 1 and 3 are only 4 spaces, no tabs can be unexpanded! 2 | :ARGS 3 | -t 8u 4 | :INPUT 5 | XXXXXX 6 | XXX XXX 7 | XXXXXX 8 | :OUTPUT-FILTER 9 | :EXPECTED 10 | /*******************/ 11 | /* XXXXXX */ 12 | /* XXX XXX */ 13 | /* XXXXXX */ 14 | /*******************/ 15 | :EOF -------------------------------------------------------------------------------- /test/126_config_file_xdg3.txt: -------------------------------------------------------------------------------- 1 | :DESC 2 | Because of historic boxes behavior, a config file in $HOME has precedence over one in $XDG_CONFIG_HOME/boxes. 3 | 4 | :ENV 5 | export HOME="`pwd`/126_data/home" 6 | export XDG_CONFIG_HOME="`pwd`/126_data/xdg" 7 | :ARGS 8 | :INPUT 9 | foo 10 | :OUTPUT-FILTER 11 | :EXPECTED 12 | #123123---456# 13 | #foo # 14 | #12345<>67890# 15 | :EOF 16 | -------------------------------------------------------------------------------- /test/129_data/B.cfg: -------------------------------------------------------------------------------- 1 | BOX Designa 2 | 3 | sample 4 | A from config file B 5 | ends 6 | 7 | shapes { 8 | w ("Ab") 9 | } 10 | 11 | elastic ( 12 | w 13 | ) 14 | 15 | END Designa 16 | 17 | 18 | 19 | BOX designB 20 | 21 | sample 22 | B from config file B 23 | ends 24 | 25 | shapes { 26 | w ("B") 27 | } 28 | 29 | elastic ( 30 | w 31 | ) 32 | 33 | END designB 34 | -------------------------------------------------------------------------------- /test/187_remove_line_comments_killblank.txt: -------------------------------------------------------------------------------- 1 | :DESC 2 | Removes 'ada-cmt' line comments. Resulting three blank lines at top and bottom are removed ("killblank"). 3 | 4 | :ARGS 5 | --design ada-cmt --remove --kill-blank 6 | :INPUT 7 | -- 8 | -- 9 | -- 10 | -- foo 11 | -- bar 12 | -- boo 13 | -- 14 | -- 15 | -- 16 | :OUTPUT-FILTER 17 | :EXPECTED 18 | foo 19 | bar 20 | boo 21 | :EOF 22 | -------------------------------------------------------------------------------- /test/sunny-day/right.create.txt: -------------------------------------------------------------------------------- 1 | (includes some Unicode characters) /* XX */ 2 | Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, /* XX */ 3 | sed diam nonumy éirmod tempor invidunt ut labore /* XX */ 4 | et dolore magna aliquyam erat, sed diam voluptua. /* XX */ 5 | At vero eos et accusam et justo duo dolores et ea rebum. /* XX */ 6 | -------------------------------------------------------------------------------- /test/sunny-day/underline.mend.txt: -------------------------------------------------------------------------------- 1 | // (includes some Unicode characters) 2 | // Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, 3 | // sed diam nonumy éirmod tempor invidunt ut labore 4 | // __ET__ dolore magna aliquyam erat, sed diam voluptua. 5 | // At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. 6 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7 | -------------------------------------------------------------------------------- /test/167_duplicate_primary_name.cfg: -------------------------------------------------------------------------------- 1 | 2 | BOX designA 3 | 4 | sample 5 | designA 6 | ends 7 | 8 | shapes { 9 | w ("A") 10 | } 11 | 12 | elastic ( 13 | w 14 | ) 15 | 16 | END designA 17 | 18 | 19 | 20 | 21 | BOX designA 22 | 23 | sample 24 | designA (duplicate) 25 | ends 26 | 27 | shapes { 28 | w ("A-dup") 29 | } 30 | 31 | elastic ( 32 | w 33 | ) 34 | 35 | END designA 36 | -------------------------------------------------------------------------------- /test/123_config_file_xdg1.txt: -------------------------------------------------------------------------------- 1 | :DESC 2 | Tests that the config file is found by looking in $HOME/.config/boxes. 3 | Also tests a shape length problem, where the least common multiple must be found (here: 3 x 5 = 15). 4 | 5 | :ENV 6 | export HOME="`pwd`/123_data" 7 | :ARGS 8 | :INPUT 9 | foo 10 | :OUTPUT-FILTER 11 | :EXPECTED 12 | #123123123123123# 13 | #foo # 14 | #123451234512345# 15 | :EOF 16 | -------------------------------------------------------------------------------- /test/189_blank_lines_surrounding_box.txt: -------------------------------------------------------------------------------- 1 | :DESC 2 | Blank lines above and below the box are retained when the box is removed. 3 | There are some spaces in the line just above the box. 4 | 5 | :ARGS 6 | -r -d jstone 7 | :INPUT 8 | 9 | 10 | /*-------------+ 11 | | Lorem Ipsum | 12 | +-------------*/ 13 | 14 | 15 | :OUTPUT-FILTER 16 | :EXPECTED 17 | 18 | 19 | Lorem Ipsum 20 | 21 | 22 | :EOF 23 | -------------------------------------------------------------------------------- /test/sunny-day/c-cmt.mend.txt: -------------------------------------------------------------------------------- 1 | /* (includes some Unicode characters) */ 2 | /* Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, */ 3 | /* sed diam nonumy éirmod tempor invidunt ut labore */ 4 | /* __ET__ dolore magna aliquyam erat, sed diam voluptua. */ 5 | /* At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. */ 6 | -------------------------------------------------------------------------------- /test/153_eol_control_lf.txt: -------------------------------------------------------------------------------- 1 | :DESC 2 | Test that the line terminator can be forced to LF. 3 | 4 | :ENV 5 | export BOXES_TEST_XXD=1 6 | :ARGS 7 | -f ../boxes-config -d c -e lf 8 | :INPUT 9 | foo 10 | :OUTPUT-FILTER 11 | s/^.*([0-9a-fA-F]{4}):/0000\1:/ 12 | :EXPECTED 13 | 00000000: 2f2a 2a2a 2a2a 2a2a 2f0a 2f2a 2066 6f6f /*******/./* foo 14 | 00000010: 202a 2f0a 2f2a 2a2a 2a2a 2a2a 2f0a */./*******/. 15 | :EOF 16 | -------------------------------------------------------------------------------- /test/154_eol_control_cr.txt: -------------------------------------------------------------------------------- 1 | :DESC 2 | Test that the line terminator can be forced to CR. 3 | 4 | :ENV 5 | export BOXES_TEST_XXD=1 6 | :ARGS 7 | -f ../boxes-config -d c -e Cr 8 | :INPUT 9 | foo 10 | :OUTPUT-FILTER 11 | s/^.*([0-9a-fA-F]{4}):/0000\1:/ 12 | :EXPECTED 13 | 00000000: 2f2a 2a2a 2a2a 2a2a 2f0d 2f2a 2066 6f6f /*******/./* foo 14 | 00000010: 202a 2f0d 2f2a 2a2a 2a2a 2a2a 2f0d */./*******/. 15 | :EOF 16 | -------------------------------------------------------------------------------- /test/159_eol_control_lf_remove.txt: -------------------------------------------------------------------------------- 1 | :DESC 2 | Test that the line terminator can be forced to LF on box removal. 3 | 4 | :ENV 5 | export BOXES_TEST_XXD=1 6 | :ARGS 7 | -f ../boxes-config -d c -e lf -r 8 | :INPUT 9 | /*******/ 10 | /* foo */ 11 | /* bar */ 12 | /*******/ 13 | :OUTPUT-FILTER 14 | s/^.*([0-9a-fA-F]{4}):/0000\1:/ 15 | :EXPECTED 16 | 00000000: 666f 6f0a 6261 720a foo.bar. 17 | :EOF 18 | -------------------------------------------------------------------------------- /test/120_parser_unterminated_string.cfg: -------------------------------------------------------------------------------- 1 | BOX testbox1 2 | 3 | escaped "aaa\"bbb\\\"ccc#" # the string aaa"bbb\"ccc# 4 | errored "aaa\\"bbb" # unterminated! 5 | 6 | sample 7 | # 8 | # regular comments used in Perl, Shell scripts, etc. 9 | # 10 | ends 11 | 12 | shapes { 13 | w ("#") 14 | } 15 | 16 | elastic ( 17 | w 18 | ) 19 | 20 | padding { 21 | left 1 22 | } 23 | 24 | END testbox1 25 | -------------------------------------------------------------------------------- /test/127_data/B.cfg: -------------------------------------------------------------------------------- 1 | parent 127_data/A.cfg 2 | 3 | 4 | BOX designA 5 | 6 | sample 7 | A from config file B 8 | ends 9 | 10 | shapes { 11 | w ("Ab") 12 | } 13 | 14 | elastic ( 15 | w 16 | ) 17 | 18 | END designA 19 | 20 | 21 | 22 | BOX designB 23 | 24 | sample 25 | B from config file B 26 | ends 27 | 28 | shapes { 29 | w ("B") 30 | } 31 | 32 | elastic ( 33 | w 34 | ) 35 | 36 | END designB 37 | -------------------------------------------------------------------------------- /test/128_data/B.cfg: -------------------------------------------------------------------------------- 1 | parent 128_data/A.cfg 2 | 3 | 4 | BOX designA 5 | 6 | sample 7 | A from config file B 8 | ends 9 | 10 | shapes { 11 | w ("Ab") 12 | } 13 | 14 | elastic ( 15 | w 16 | ) 17 | 18 | END designA 19 | 20 | 21 | 22 | BOX designB 23 | 24 | sample 25 | B from config file B 26 | ends 27 | 28 | shapes { 29 | w ("B") 30 | } 31 | 32 | elastic ( 33 | w 34 | ) 35 | 36 | END designB 37 | -------------------------------------------------------------------------------- /test/158_eol_control_crlf_remove.txt: -------------------------------------------------------------------------------- 1 | :DESC 2 | Test that the line terminator can be forced to CRLF on box removal. 3 | 4 | :ENV 5 | export BOXES_TEST_XXD=1 6 | :ARGS 7 | -f ../boxes-config -d c -e crlf -r 8 | :INPUT 9 | /*******/ 10 | /* foo */ 11 | /* bar */ 12 | /*******/ 13 | :OUTPUT-FILTER 14 | s/^.*([0-9a-fA-F]{4}):/0000\1:/ 15 | :EXPECTED 16 | 00000000: 666f 6f0d 0a62 6172 0d0a foo..bar.. 17 | :EOF 18 | -------------------------------------------------------------------------------- /test/053_size_25x10.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s 25x10 3 | :INPUT 4 | aaa 5 | bbbb 6 | ccccc 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /***********************/ 10 | /* aaa */ 11 | /* bbbb */ 12 | /* ccccc */ 13 | /* */ 14 | /* */ 15 | /* */ 16 | /* */ 17 | /* */ 18 | /***********************/ 19 | :EOF -------------------------------------------------------------------------------- /test/112_manual_encoding_invalid.txt: -------------------------------------------------------------------------------- 1 | :DESC 2 | A non-existent encoding is specified. Boxes falls back to the system encoding and logs a warning. 3 | 4 | :ARGS 5 | -n NON-EXISTENT 6 | :INPUT 7 | foo 8 | :OUTPUT-FILTER 9 | s/( falling back to) .*$/\1 [system encoding]/ 10 | :EXPECTED 11 | boxes: Invalid character encoding: NON-EXISTENT - falling back to [system encoding] 12 | /*******/ 13 | /* foo */ 14 | /*******/ 15 | :EOF 16 | -------------------------------------------------------------------------------- /test/126_data/xdg/boxes/boxes-config: -------------------------------------------------------------------------------- 1 | # This file should NOT be used! 2 | 3 | BOX wrong 4 | 5 | author "Thomas Jensen" 6 | designer "Thomas Jensen" 7 | 8 | sample 9 | #-WRONG-# 10 | #sample # 11 | #-WRONG-# 12 | ends 13 | 14 | shapes { 15 | nw ("#") 16 | n ("-WRONG-") 17 | s ("-WRONG-") 18 | se ("#") e ("#") sw ("#") ne ("#") w ("#") 19 | } 20 | 21 | elastic (n, s, e, w) 22 | 23 | END wrong 24 | -------------------------------------------------------------------------------- /test/177_utf8_generate_box.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -f 177_utf8_generate_box.cfg -s 21x8 -ac 3 | :INPUT 4 | fäo 5 | :OUTPUT-FILTER 6 | :EXPECTED 7 | ┏━┳━━━ 沐宸 若汐 ━━━┓ 8 | ┃ ┃ ┋ 9 | ┃ ┃ ┃ 10 | ┃ ┃ föo ┋ 11 | ┃ ┃ ┃ 12 | ┃ ┃ ┋ 13 | ┣━╋━━━━━━━━━━━━━━━━━┫ 14 | ┗━┻━━━━━━━━━━━━━━━━━┛ 15 | :EOF 16 | -------------------------------------------------------------------------------- /test/sunny-day/html-cmt.mend.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /test/124_config_file_xdg2.txt: -------------------------------------------------------------------------------- 1 | :DESC 2 | Tests that the config file is found by looking in $XDG_CONFIG_HOME/boxes with higher precedence 3 | than $HOME/.config/boxes. Also tests a particular shape length problem. 4 | 5 | :ENV 6 | export HOME="`pwd`/124_data/home" 7 | export XDG_CONFIG_HOME="`pwd`/124_data/xdg" 8 | :ARGS 9 | :INPUT 10 | foo 11 | :OUTPUT-FILTER 12 | :EXPECTED 13 | #--123123# 14 | #foo # 15 | #12345---# 16 | :EOF 17 | -------------------------------------------------------------------------------- /test/124_data/home/.config/boxes/boxes-config: -------------------------------------------------------------------------------- 1 | # This file should NOT be used! 2 | 3 | BOX wrong 4 | 5 | author "Thomas Jensen" 6 | designer "Thomas Jensen" 7 | 8 | sample 9 | #-WRONG-# 10 | #sample # 11 | #-WRONG-# 12 | ends 13 | 14 | shapes { 15 | nw ("#") 16 | n ("-WRONG-") 17 | s ("-WRONG-") 18 | se ("#") e ("#") sw ("#") ne ("#") w ("#") 19 | } 20 | 21 | elastic (n, s, e, w) 22 | 23 | END wrong 24 | -------------------------------------------------------------------------------- /test/168_parent_keyword_in_sample_ok.cfg: -------------------------------------------------------------------------------- 1 | 2 | BOX designA 3 | 4 | sample 5 | A mentions the word parent THIS_IS_NOT_A_CONFIG_FILE 6 | ends 7 | 8 | shapes { 9 | w ("A") 10 | } 11 | 12 | elastic ( 13 | w 14 | ) 15 | 16 | END designA 17 | 18 | 19 | BOX designB 20 | 21 | sample 22 | B is the one we select 23 | ends 24 | 25 | shapes { 26 | w ("B") 27 | } 28 | 29 | elastic ( 30 | w 31 | ) 32 | 33 | END designB 34 | -------------------------------------------------------------------------------- /test/sunny-day/right.mend.txt: -------------------------------------------------------------------------------- 1 | (includes some Unicode characters) /* XX */ 2 | Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, /* XX */ 3 | sed diam nonumy éirmod tempor invidunt ut labore /* XX */ 4 | __ET__ dolore magna aliquyam erat, sed diam voluptua. /* XX */ 5 | At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. /* XX */ 6 | -------------------------------------------------------------------------------- /test/174_non_ascii_design_name.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -f 174_non_ascii_design_name.cfg 3 | :INPUT 4 | foo 5 | :OUTPUT-FILTER 6 | :EXPECTED-ERROR 1 7 | boxes: 174_non_ascii_design_name.cfg: line 2: box design name must consist of printable standard ASCII characters. 8 | boxes: 174_non_ascii_design_name.cfg: line 2: skipping to next design 9 | boxes: no valid data in config file -- 174_non_ascii_design_name.cfg 10 | boxes: no valid designs found 11 | :EOF 12 | -------------------------------------------------------------------------------- /test/097_ansi_mixed.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | :INPUT 3 | normal 4 | with some formating 5 | formating past line end 6 | and into next 7 | normal again 8 | :OUTPUT-FILTER 9 | :EXPECTED 10 | /***************************/ 11 | /* normal */ 12 | /* with some formating */ 13 | /* formating past line end */ 14 | /* and into next */ 15 | /* normal again */ 16 | /***************************/ 17 | :EOF 18 | -------------------------------------------------------------------------------- /test/169_peek_escape_comments.txt: -------------------------------------------------------------------------------- 1 | :DESC 2 | Tests that the 'peek' box design properly escapes closing comment tags. 3 | 4 | :ARGS 5 | -d peek -p h2 6 | :INPUT 7 | foo(); 8 | bar(); /* a comment */ 9 | baz(); 10 | :OUTPUT-FILTER 11 | :EXPECTED 12 | /* _\|/_ 13 | (o o) 14 | +----oOO-{_}-OOo------------+ 15 | | foo(); | 16 | | bar(); /* a comment *\/ | 17 | | baz(); | 18 | +--------------------------*/ 19 | :EOF 20 | -------------------------------------------------------------------------------- /test/sunny-day/ansi.create.txt: -------------------------------------------------------------------------------- 1 | ┌──────────────────────────────────────────────────────────┐ 2 | │ (includes some Unicode characters) │ 3 | │ Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, │ 4 | │ sed diam nonumy éirmod tempor invidunt ut labore │ 5 | │ et dolore magna aliquyam erat, sed diam voluptua. │ 6 | │ At vero eos et accusam et justo duo dolores et ea rebum. │ 7 | └──────────────────────────────────────────────────────────┘ 8 | -------------------------------------------------------------------------------- /test/sunny-day/f90-box.create.txt: -------------------------------------------------------------------------------- 1 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2 | ! (includes some Unicode characters) ! 3 | ! Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, ! 4 | ! sed diam nonumy éirmod tempor invidunt ut labore ! 5 | ! et dolore magna aliquyam erat, sed diam voluptua. ! 6 | ! At vero eos et accusam et justo duo dolores et ea rebum. ! 7 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 8 | -------------------------------------------------------------------------------- /test/sunny-day/shell.create.txt: -------------------------------------------------------------------------------- 1 | ############################################################ 2 | # (includes some Unicode characters) # 3 | # Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, # 4 | # sed diam nonumy éirmod tempor invidunt ut labore # 5 | # et dolore magna aliquyam erat, sed diam voluptua. # 6 | # At vero eos et accusam et justo duo dolores et ea rebum. # 7 | ############################################################ 8 | -------------------------------------------------------------------------------- /test/sunny-day/simple.create.txt: -------------------------------------------------------------------------------- 1 | ************************************************************ 2 | * (includes some Unicode characters) * 3 | * Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, * 4 | * sed diam nonumy éirmod tempor invidunt ut labore * 5 | * et dolore magna aliquyam erat, sed diam voluptua. * 6 | * At vero eos et accusam et justo duo dolores et ea rebum. * 7 | ************************************************************ 8 | -------------------------------------------------------------------------------- /test/sunny-day/stone.create.txt: -------------------------------------------------------------------------------- 1 | +----------------------------------------------------------+ 2 | | (includes some Unicode characters) | 3 | | Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, | 4 | | sed diam nonumy éirmod tempor invidunt ut labore | 5 | | et dolore magna aliquyam erat, sed diam voluptua. | 6 | | At vero eos et accusam et justo duo dolores et ea rebum. | 7 | +----------------------------------------------------------+ 8 | -------------------------------------------------------------------------------- /test/sunny-day/tex-box.create.txt: -------------------------------------------------------------------------------- 1 | %==========================================================% 2 | % (includes some Unicode characters) % 3 | % Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, % 4 | % sed diam nonumy éirmod tempor invidunt ut labore % 5 | % et dolore magna aliquyam erat, sed diam voluptua. % 6 | % At vero eos et accusam et justo duo dolores et ea rebum. % 7 | %==========================================================% 8 | -------------------------------------------------------------------------------- /test/sunny-day/vim-box.create.txt: -------------------------------------------------------------------------------- 1 | """""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 2 | " (includes some Unicode characters) " 3 | " Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, " 4 | " sed diam nonumy éirmod tempor invidunt ut labore " 5 | " et dolore magna aliquyam erat, sed diam voluptua. " 6 | " At vero eos et accusam et justo duo dolores et ea rebum. " 7 | """""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 8 | -------------------------------------------------------------------------------- /test/099_ansi_align_left.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -al 3 | :INPUT 4 | normal 5 | with some formating 6 | formating past line end 7 | and into next 8 | normal again 9 | :OUTPUT-FILTER 10 | :EXPECTED 11 | /***************************/ 12 | /* normal */ 13 | /* with some formating */ 14 | /* formating past line end */ 15 | /* and into next */ 16 | /* normal again */ 17 | /***************************/ 18 | :EOF 19 | -------------------------------------------------------------------------------- /test/100_ansi_align_center.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -ac 3 | :INPUT 4 | normal 5 | with some formating 6 | formating past line end 7 | and into next 8 | normal again 9 | :OUTPUT-FILTER 10 | :EXPECTED 11 | /***************************/ 12 | /* normal */ 13 | /* with some formating */ 14 | /* formating past line end */ 15 | /* and into next */ 16 | /* normal again */ 17 | /***************************/ 18 | :EOF 19 | -------------------------------------------------------------------------------- /test/101_ansi_align_right.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -ar 3 | :INPUT 4 | normal 5 | with some formating 6 | formating past line end 7 | and into next 8 | normal again 9 | :OUTPUT-FILTER 10 | :EXPECTED 11 | /***************************/ 12 | /* normal */ 13 | /* with some formating */ 14 | /* formating past line end */ 15 | /* and into next */ 16 | /* normal again */ 17 | /***************************/ 18 | :EOF 19 | -------------------------------------------------------------------------------- /test/sunny-day/ansi-dashed.create.txt: -------------------------------------------------------------------------------- 1 | ┌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┐ 2 | ┊ (includes some Unicode characters) ┊ 3 | ┊ Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, ┊ 4 | ┊ sed diam nonumy éirmod tempor invidunt ut labore ┊ 5 | ┊ et dolore magna aliquyam erat, sed diam voluptua. ┊ 6 | ┊ At vero eos et accusam et justo duo dolores et ea rebum. ┊ 7 | └╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┘ 8 | -------------------------------------------------------------------------------- /test/sunny-day/ansi-double.create.txt: -------------------------------------------------------------------------------- 1 | ╔══════════════════════════════════════════════════════════╗ 2 | ║ (includes some Unicode characters) ║ 3 | ║ Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, ║ 4 | ║ sed diam nonumy éirmod tempor invidunt ut labore ║ 5 | ║ et dolore magna aliquyam erat, sed diam voluptua. ║ 6 | ║ At vero eos et accusam et justo duo dolores et ea rebum. ║ 7 | ╚══════════════════════════════════════════════════════════╝ 8 | -------------------------------------------------------------------------------- /test/sunny-day/ansi-heavy.create.txt: -------------------------------------------------------------------------------- 1 | ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ 2 | ┃ (includes some Unicode characters) ┃ 3 | ┃ Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, ┃ 4 | ┃ sed diam nonumy éirmod tempor invidunt ut labore ┃ 5 | ┃ et dolore magna aliquyam erat, sed diam voluptua. ┃ 6 | ┃ At vero eos et accusam et justo duo dolores et ea rebum. ┃ 7 | ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ 8 | -------------------------------------------------------------------------------- /test/sunny-day/ansi-rounded.create.txt: -------------------------------------------------------------------------------- 1 | ╭──────────────────────────────────────────────────────────╮ 2 | │ (includes some Unicode characters) │ 3 | │ Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, │ 4 | │ sed diam nonumy éirmod tempor invidunt ut labore │ 5 | │ et dolore magna aliquyam erat, sed diam voluptua. │ 6 | │ At vero eos et accusam et justo duo dolores et ea rebum. │ 7 | ╰──────────────────────────────────────────────────────────╯ 8 | -------------------------------------------------------------------------------- /test/sunny-day/cc.create.txt: -------------------------------------------------------------------------------- 1 | /************************************************************ 2 | * (includes some Unicode characters) * 3 | * Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, * 4 | * sed diam nonumy éirmod tempor invidunt ut labore * 5 | * et dolore magna aliquyam erat, sed diam voluptua. * 6 | * At vero eos et accusam et justo duo dolores et ea rebum. * 7 | ************************************************************/ 8 | -------------------------------------------------------------------------------- /test/134_comments_in_sample.txt: -------------------------------------------------------------------------------- 1 | :DESC 2 | Strings or sample content which looks like a comment must be treated as a string instead (not a comment). 3 | 4 | :ARGS 5 | -f 134_comments_in_sample.cfg -l 6 | :INPUT 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | 1 Available Style in "134_comments_in_sample.cfg": 10 | -------------------------------------------------- 11 | 12 | design: 13 | 14 | # looks like a comment - your text here 15 | fooooooooooooooooooooo 16 | 17 | 18 | :EOF 19 | -------------------------------------------------------------------------------- /test/sunny-day/ansi-heavy-dashed.create.txt: -------------------------------------------------------------------------------- 1 | ┏╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍┓ 2 | ┋ (includes some Unicode characters) ┋ 3 | ┋ Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, ┋ 4 | ┋ sed diam nonumy éirmod tempor invidunt ut labore ┋ 5 | ┋ et dolore magna aliquyam erat, sed diam voluptua. ┋ 6 | ┋ At vero eos et accusam et justo duo dolores et ea rebum. ┋ 7 | ┗╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍┛ 8 | -------------------------------------------------------------------------------- /test/sunny-day/c.create.txt: -------------------------------------------------------------------------------- 1 | /************************************************************/ 2 | /* (includes some Unicode characters) */ 3 | /* Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, */ 4 | /* sed diam nonumy éirmod tempor invidunt ut labore */ 5 | /* et dolore magna aliquyam erat, sed diam voluptua. */ 6 | /* At vero eos et accusam et justo duo dolores et ea rebum. */ 7 | /************************************************************/ 8 | -------------------------------------------------------------------------------- /test/sunny-day/jstone.create.txt: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------+ 2 | | (includes some Unicode characters) | 3 | | Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, | 4 | | sed diam nonumy éirmod tempor invidunt ut labore | 5 | | et dolore magna aliquyam erat, sed diam voluptua. | 6 | | At vero eos et accusam et justo duo dolores et ea rebum. | 7 | +----------------------------------------------------------*/ 8 | -------------------------------------------------------------------------------- /test/sunny-day/stark1.create.txt: -------------------------------------------------------------------------------- 1 | =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 2 | ^ (includes some Unicode characters) ^ 3 | ^ Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, ^ 4 | ^ sed diam nonumy éirmod tempor invidunt ut labore ^ 5 | ^ et dolore magna aliquyam erat, sed diam voluptua. ^ 6 | ^ At vero eos et accusam et justo duo dolores et ea rebum. ^ 7 | =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= jgs 8 | -------------------------------------------------------------------------------- /test/152_eol_control_crlf.txt: -------------------------------------------------------------------------------- 1 | :DESC 2 | Test that the line terminator can be forced to CRLF. 3 | 4 | :ENV 5 | export BOXES_TEST_XXD=1 6 | :ARGS 7 | -f ../boxes-config -d c -e crlf 8 | :INPUT 9 | foo 10 | :OUTPUT-FILTER 11 | s/^.*([0-9a-fA-F]{4}):/0000\1:/ 12 | :EXPECTED 13 | 00000000: 2f2a 2a2a 2a2a 2a2a 2f0d 0a2f 2a20 666f /*******/../* fo 14 | 00000010: 6f20 2a2f 0d0a 2f2a 2a2a 2a2a 2a2a 2f0d o */../*******/. 15 | 00000020: 0a . 16 | :EOF 17 | -------------------------------------------------------------------------------- /test/sunny-day/ada-box.create.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------- 2 | -- (includes some Unicode characters) -- 3 | -- Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, -- 4 | -- sed diam nonumy éirmod tempor invidunt ut labore -- 5 | -- et dolore magna aliquyam erat, sed diam voluptua. -- 6 | -- At vero eos et accusam et justo duo dolores et ea rebum. -- 7 | -------------------------------------------------------------- 8 | -------------------------------------------------------------------------------- /test/sunny-day/ansi-rounded-dashed.create.txt: -------------------------------------------------------------------------------- 1 | ╭╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ 2 | ┊ (includes some Unicode characters) ┊ 3 | ┊ Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, ┊ 4 | ┊ sed diam nonumy éirmod tempor invidunt ut labore ┊ 5 | ┊ et dolore magna aliquyam erat, sed diam voluptua. ┊ 6 | ┊ At vero eos et accusam et justo duo dolores et ea rebum. ┊ 7 | ╰╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ 8 | -------------------------------------------------------------------------------- /test/sunny-day/caml.create.txt: -------------------------------------------------------------------------------- 1 | (************************************************************) 2 | (* (includes some Unicode characters) *) 3 | (* Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, *) 4 | (* sed diam nonumy éirmod tempor invidunt ut labore *) 5 | (* et dolore magna aliquyam erat, sed diam voluptua. *) 6 | (* At vero eos et accusam et justo duo dolores et ea rebum. *) 7 | (************************************************************) 8 | -------------------------------------------------------------------------------- /test/186_remove_line_comments.txt: -------------------------------------------------------------------------------- 1 | :DESC 2 | Removes 'ada-cmt' line comments. Resulting three blank lines at top and bottom are not removed, because the default 3 | for 'killblank' is false when top and bottom box sides are open, as is the case here. 4 | 5 | :ARGS 6 | --design ada-cmt --remove 7 | :INPUT 8 | -- 9 | -- 10 | -- 11 | -- foo 12 | -- bar 13 | -- boo 14 | -- 15 | -- 16 | -- 17 | :OUTPUT-FILTER 18 | :EXPECTED 19 | 20 | 21 | 22 | foo 23 | bar 24 | boo 25 | 26 | 27 | 28 | :EOF 29 | -------------------------------------------------------------------------------- /test/sunny-day/html.create.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /test/124_data/xdg/boxes/boxes-config: -------------------------------------------------------------------------------- 1 | # A design that offsets the least common multiple effect by nnw/sse shapes. 2 | 3 | BOX test2 4 | 5 | author "Thomas Jensen" 6 | designer "Thomas Jensen" 7 | 8 | sample #--123123# 9 | #sample # 10 | #12345---# 11 | ends 12 | 13 | shapes { 14 | nw ("#") 15 | nnw ("--") sse ("---") 16 | n ("123") 17 | s ("12345") 18 | 19 | se ("#") e ("#") sw ("#") ne ("#") w ("#") 20 | } 21 | 22 | elastic (n,s,e, w) 23 | 24 | END test2 25 | -------------------------------------------------------------------------------- /test/120_parser_unterminated_string.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -f 120_parser_unterminated_string.cfg 3 | :INPUT 4 | foo 5 | :OUTPUT-FILTER 6 | :EXPECTED-ERROR 1 7 | boxes: 120_parser_unterminated_string.cfg: line 4: Unterminated String -- " # unterminated! 8 | boxes: 120_parser_unterminated_string.cfg: line 4: syntax error 9 | boxes: 120_parser_unterminated_string.cfg: line 4: skipping to next design 10 | boxes: no valid data in config file -- 120_parser_unterminated_string.cfg 11 | boxes: no valid designs found 12 | :EOF 13 | -------------------------------------------------------------------------------- /test/098_ansi_mixed_indent.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | :INPUT 3 | normal 4 | with some formating 5 | formating past line end 6 | and into next 7 | normal again 8 | :OUTPUT-FILTER 9 | :EXPECTED 10 | /***************************/ 11 | /* normal */ 12 | /* with some formating */ 13 | /* formating past line end */ 14 | /* and into next */ 15 | /* normal again */ 16 | /***************************/ 17 | :EOF 18 | -------------------------------------------------------------------------------- /test/126_data/home/boxes-config: -------------------------------------------------------------------------------- 1 | # A design with particular shape lengths. 2 | 3 | BOX test3 4 | 5 | author "Thomas Jensen" 6 | designer "Thomas Jensen" 7 | 8 | sample 9 | #123123---456# 10 | #sample # 11 | #12345<>67890# 12 | ends 13 | 14 | shapes { 15 | nnw ("123") 16 | nne ("456") 17 | n ("---") 18 | s ("<>") 19 | ssw ("12345") 20 | sse ("67890") 21 | 22 | nw ("#") se ("#") e ("#") sw ("#") ne ("#") w ("#") 23 | } 24 | 25 | elastic (nne, nnw, ssw, sse, e, w) 26 | 27 | END test3 28 | -------------------------------------------------------------------------------- /test/sunny-day/peek.create.txt: -------------------------------------------------------------------------------- 1 | /* _\|/_ 2 | (o o) 3 | +----oOO-{_}-OOo-------------------------------------------+ 4 | | (includes some Unicode characters) | 5 | | Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, | 6 | | sed diam nonumy éirmod tempor invidunt ut labore | 7 | | et dolore magna aliquyam erat, sed diam voluptua. | 8 | | At vero eos et accusam et justo duo dolores et ea rebum. | 9 | +---------------------------------------------------------*/ 10 | -------------------------------------------------------------------------------- /test/170_forbid_blank_box.cfg: -------------------------------------------------------------------------------- 1 | BOX blank1 2 | 3 | sample 4 | (blank) 5 | ends 6 | 7 | shapes { 8 | w (" ") 9 | } 10 | 11 | elastic ( 12 | w 13 | ) 14 | 15 | END blank1 16 | 17 | # ------------------------------------------------------- 18 | 19 | BOX blank2 20 | 21 | sample 22 | (blank) 23 | ends 24 | 25 | shapes { 26 | w (" ", " ") # mix of tabs and spaces 27 | e (" ", " ") # space only 28 | s (" ", " ") # tab only 29 | } 30 | 31 | elastic ( 32 | w, e, s 33 | ) 34 | 35 | END blank2 36 | -------------------------------------------------------------------------------- /test/176_utf8_design_list.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -f 176_utf8_design_list.cfg -l 3 | :INPUT 4 | :OUTPUT-FILTER 5 | :EXPECTED 6 | 2 Available Styles in "176_utf8_design_list.cfg": 7 | ------------------------------------------------- 8 | 9 | designA 10 | John Doe, coded by 沐宸: 11 | 12 | ┏━ 沐宸 若汐 ━┓ 13 | ┃ ⧹ 14 | ┃ ╱ 15 | ┗━━━━━━━━━━━━━┛ 16 | 17 | 18 | designB 19 | 沐宸, coded by John Doe: 20 | 21 | shape 22 | 23 | 24 | :EOF 25 | -------------------------------------------------------------------------------- /test/sunny-day/ansi.mend.txt: -------------------------------------------------------------------------------- 1 | ┌──────────────────────────────────────────────────────────────────────┐ 2 | │ (includes some Unicode characters) │ 3 | │ Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, │ 4 | │ sed diam nonumy éirmod tempor invidunt ut labore │ 5 | │ __ET__ dolore magna aliquyam erat, sed diam voluptua. │ 6 | │ At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. │ 7 | └──────────────────────────────────────────────────────────────────────┘ 8 | -------------------------------------------------------------------------------- /test/sunny-day/shell.mend.txt: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # (includes some Unicode characters) # 3 | # Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, # 4 | # sed diam nonumy éirmod tempor invidunt ut labore # 5 | # __ET__ dolore magna aliquyam erat, sed diam voluptua. # 6 | # At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. # 7 | ######################################################################## 8 | -------------------------------------------------------------------------------- /test/sunny-day/stone.mend.txt: -------------------------------------------------------------------------------- 1 | +----------------------------------------------------------------------+ 2 | | (includes some Unicode characters) | 3 | | Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, | 4 | | sed diam nonumy éirmod tempor invidunt ut labore | 5 | | __ET__ dolore magna aliquyam erat, sed diam voluptua. | 6 | | At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. | 7 | +----------------------------------------------------------------------+ 8 | -------------------------------------------------------------------------------- /test/113_headline_ansi_unicode.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -n UTF-8 -d headline -p l3r1 3 | :INPUT 4 |    foo 海 bar 5 | :OUTPUT-FILTER 6 | :EXPECTED 7 | /**************************/ 8 | /* f o o  海  b a r  */ 9 | /**************************/ 10 | :EOF 11 | -------------------------------------------------------------------------------- /test/123_data/.config/boxes/boxes-config: -------------------------------------------------------------------------------- 1 | # Config file with a design that requires the least common multiple of shape lengths (3 and 5 cols). 2 | 3 | BOX test1 4 | 5 | author "Thomas Jensen" 6 | designer "Thomas Jensen" 7 | 8 | sample 9 | #123123123123123# 10 | #sample # 11 | #123451234512345# 12 | ends 13 | 14 | shapes { 15 | nw ("#") 16 | n ("123") 17 | s ("12345") 18 | 19 | se ("#") e ("#") sw ("#") ne ("#") w ("#") 20 | } 21 | 22 | elastic (n,s,e, w) 23 | 24 | END test1 25 | 26 | 27 | # vim: set ai sw=4: 28 | -------------------------------------------------------------------------------- /test/sunny-day/ansi-heavy.mend.txt: -------------------------------------------------------------------------------- 1 | ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ 2 | ┃ (includes some Unicode characters) ┃ 3 | ┃ Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, ┃ 4 | ┃ sed diam nonumy éirmod tempor invidunt ut labore ┃ 5 | ┃ __ET__ dolore magna aliquyam erat, sed diam voluptua. ┃ 6 | ┃ At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. ┃ 7 | ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ 8 | -------------------------------------------------------------------------------- /test/sunny-day/cc.mend.txt: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * (includes some Unicode characters) * 3 | * Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, * 4 | * sed diam nonumy éirmod tempor invidunt ut labore * 5 | * __ET__ dolore magna aliquyam erat, sed diam voluptua. * 6 | * At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. * 7 | ************************************************************************/ 8 | -------------------------------------------------------------------------------- /test/sunny-day/f90-box.mend.txt: -------------------------------------------------------------------------------- 1 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2 | ! (includes some Unicode characters) ! 3 | ! Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, ! 4 | ! sed diam nonumy éirmod tempor invidunt ut labore ! 5 | ! __ET__ dolore magna aliquyam erat, sed diam voluptua. ! 6 | ! At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. ! 7 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 8 | -------------------------------------------------------------------------------- /test/sunny-day/simple.mend.txt: -------------------------------------------------------------------------------- 1 | ************************************************************************ 2 | * (includes some Unicode characters) * 3 | * Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, * 4 | * sed diam nonumy éirmod tempor invidunt ut labore * 5 | * __ET__ dolore magna aliquyam erat, sed diam voluptua. * 6 | * At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. * 7 | ************************************************************************ 8 | -------------------------------------------------------------------------------- /test/sunny-day/tex-box.mend.txt: -------------------------------------------------------------------------------- 1 | %======================================================================% 2 | % (includes some Unicode characters) % 3 | % Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, % 4 | % sed diam nonumy éirmod tempor invidunt ut labore % 5 | % __ET__ dolore magna aliquyam erat, sed diam voluptua. % 6 | % At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. % 7 | %======================================================================% 8 | -------------------------------------------------------------------------------- /test/sunny-day/vim-box.mend.txt: -------------------------------------------------------------------------------- 1 | """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 2 | " (includes some Unicode characters) " 3 | " Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, " 4 | " sed diam nonumy éirmod tempor invidunt ut labore " 5 | " __ET__ dolore magna aliquyam erat, sed diam voluptua. " 6 | " At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. " 7 | """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 8 | -------------------------------------------------------------------------------- /test/sunny-day/ansi-dashed.mend.txt: -------------------------------------------------------------------------------- 1 | ┌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┐ 2 | ┊ (includes some Unicode characters) ┊ 3 | ┊ Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, ┊ 4 | ┊ sed diam nonumy éirmod tempor invidunt ut labore ┊ 5 | ┊ __ET__ dolore magna aliquyam erat, sed diam voluptua. ┊ 6 | ┊ At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. ┊ 7 | └╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┘ 8 | -------------------------------------------------------------------------------- /test/sunny-day/ansi-double.mend.txt: -------------------------------------------------------------------------------- 1 | ╔══════════════════════════════════════════════════════════════════════╗ 2 | ║ (includes some Unicode characters) ║ 3 | ║ Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, ║ 4 | ║ sed diam nonumy éirmod tempor invidunt ut labore ║ 5 | ║ __ET__ dolore magna aliquyam erat, sed diam voluptua. ║ 6 | ║ At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. ║ 7 | ╚══════════════════════════════════════════════════════════════════════╝ 8 | -------------------------------------------------------------------------------- /test/sunny-day/ansi-rounded.mend.txt: -------------------------------------------------------------------------------- 1 | ╭──────────────────────────────────────────────────────────────────────╮ 2 | │ (includes some Unicode characters) │ 3 | │ Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, │ 4 | │ sed diam nonumy éirmod tempor invidunt ut labore │ 5 | │ __ET__ dolore magna aliquyam erat, sed diam voluptua. │ 6 | │ At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. │ 7 | ╰──────────────────────────────────────────────────────────────────────╯ 8 | -------------------------------------------------------------------------------- /test/sunny-day/c.mend.txt: -------------------------------------------------------------------------------- 1 | /************************************************************************/ 2 | /* (includes some Unicode characters) */ 3 | /* Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, */ 4 | /* sed diam nonumy éirmod tempor invidunt ut labore */ 5 | /* __ET__ dolore magna aliquyam erat, sed diam voluptua. */ 6 | /* At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. */ 7 | /************************************************************************/ 8 | -------------------------------------------------------------------------------- /test/sunny-day/jstone.mend.txt: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------+ 2 | | (includes some Unicode characters) | 3 | | Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, | 4 | | sed diam nonumy éirmod tempor invidunt ut labore | 5 | | __ET__ dolore magna aliquyam erat, sed diam voluptua. | 6 | | At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. | 7 | +----------------------------------------------------------------------*/ 8 | -------------------------------------------------------------------------------- /test/sunny-day/ansi-heavy-dashed.mend.txt: -------------------------------------------------------------------------------- 1 | ┏╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍┓ 2 | ┋ (includes some Unicode characters) ┋ 3 | ┋ Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, ┋ 4 | ┋ sed diam nonumy éirmod tempor invidunt ut labore ┋ 5 | ┋ __ET__ dolore magna aliquyam erat, sed diam voluptua. ┋ 6 | ┋ At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. ┋ 7 | ┗╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍┛ 8 | -------------------------------------------------------------------------------- /test/sunny-day/ansi-rounded-dashed.mend.txt: -------------------------------------------------------------------------------- 1 | ╭╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ 2 | ┊ (includes some Unicode characters) ┊ 3 | ┊ Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, ┊ 4 | ┊ sed diam nonumy éirmod tempor invidunt ut labore ┊ 5 | ┊ __ET__ dolore magna aliquyam erat, sed diam voluptua. ┊ 6 | ┊ At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. ┊ 7 | ╰╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ 8 | -------------------------------------------------------------------------------- /test/sunny-day/caml.mend.txt: -------------------------------------------------------------------------------- 1 | (************************************************************************) 2 | (* (includes some Unicode characters) *) 3 | (* Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, *) 4 | (* sed diam nonumy éirmod tempor invidunt ut labore *) 5 | (* __ET__ dolore magna aliquyam erat, sed diam voluptua. *) 6 | (* At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. *) 7 | (************************************************************************) 8 | -------------------------------------------------------------------------------- /test/sunny-day/stark1.mend.txt: -------------------------------------------------------------------------------- 1 | =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 2 | ^ (includes some Unicode characters) ^ 3 | ^ Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, ^ 4 | ^ sed diam nonumy éirmod tempor invidunt ut labore ^ 5 | ^ __ET__ dolore magna aliquyam erat, sed diam voluptua. ^ 6 | ^ At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. ^ 7 | =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= jgs 8 | -------------------------------------------------------------------------------- /test/sunny-day/ada-box.mend.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------- 2 | -- (includes some Unicode characters) -- 3 | -- Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, -- 4 | -- sed diam nonumy éirmod tempor invidunt ut labore -- 5 | -- __ET__ dolore magna aliquyam erat, sed diam voluptua. -- 6 | -- At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. -- 7 | -------------------------------------------------------------------------- 8 | -------------------------------------------------------------------------------- /test/128_multiple_parent_configs_cycle.txt: -------------------------------------------------------------------------------- 1 | :DESC 2 | Tests our cycle detection, when parents reference each other. 3 | 4 | :ARGS 5 | -f 128_data/C.cfg -l 6 | :INPUT 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | 3 Available Styles: 10 | ------------------- 11 | 12 | Configuration Files: 13 | - 128_data/C.cfg 14 | - 128_data/B.cfg (parent) 15 | - 128_data/A.cfg (parent) 16 | 17 | 18 | designA: 19 | 20 | A from config file B 21 | 22 | 23 | designB: 24 | 25 | B from config file B 26 | 27 | 28 | designC: 29 | 30 | C from config file C 31 | 32 | 33 | :EOF 34 | -------------------------------------------------------------------------------- /test/147_tag_stats_list.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -f 14x_tag_query.cfg -l 3 | :INPUT 4 | :OUTPUT-FILTER 5 | :EXPECTED 6 | 4 Available Styles in "14x_tag_query.cfg": 7 | ------------------------------------------ 8 | 9 | designA alias aliasA1: 10 | 11 | AAA 12 | AAA foo 13 | AAA 14 | 15 | 16 | designB alias aliasB1, aliasB2: 17 | 18 | BBB 19 | BBB foo 20 | BBB 21 | 22 | 23 | designC: 24 | 25 | CCC 26 | CCC foo 27 | CCC 28 | 29 | 30 | designD: 31 | 32 | DDD 33 | DDD foo 34 | DDD 35 | 36 | 37 | tag1 (2) | tag2 (3) | tag3 (3) 38 | :EOF 39 | -------------------------------------------------------------------------------- /test/sunny-day/html.mend.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /test/sunny-day/peek.mend.txt: -------------------------------------------------------------------------------- 1 | /* _\|/_ 2 | (o o) 3 | +----oOO-{_}-OOo-------------------------------------------------------+ 4 | | (includes some Unicode characters) | 5 | | Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, | 6 | | sed diam nonumy éirmod tempor invidunt ut labore | 7 | | __ET__ dolore magna aliquyam erat, sed diam voluptua. | 8 | | At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. | 9 | +---------------------------------------------------------------------*/ 10 | -------------------------------------------------------------------------------- /test/167_duplicate_primary_name.txt: -------------------------------------------------------------------------------- 1 | :DESC 2 | Test that two designs in the same file may not have the same name. The second one is invalid and should be skipped. 3 | 4 | :ARGS 5 | -f 167_duplicate_primary_name.cfg -l 6 | :INPUT 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | boxes: 167_duplicate_primary_name.cfg: line 35: duplicate box design name -- designA 10 | boxes: 167_duplicate_primary_name.cfg: line 35: skipping to next design 11 | 1 Available Style in "167_duplicate_primary_name.cfg": 12 | ------------------------------------------------------ 13 | 14 | designA: 15 | 16 | designA 17 | 18 | 19 | :EOF 20 | -------------------------------------------------------------------------------- /test/sunny-day/columns.create.txt: -------------------------------------------------------------------------------- 1 | __^__ __^__ 2 | ( ___ )--------------------------------------------------------( ___ ) 3 | | / | (includes some Unicode characters) | \ | 4 | | / | Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, | \ | 5 | | / | sed diam nonumy éirmod tempor invidunt ut labore | \ | 6 | | / | et dolore magna aliquyam erat, sed diam voluptua. | \ | 7 | |___| At vero eos et accusam et justo duo dolores et ea rebum. |___| 8 | (_____)--------------------------------------------------------(_____) 9 | -------------------------------------------------------------------------------- /test/102_ansi_size.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -s35x10 3 | :INPUT 4 | normal 5 | with some formating 6 | formating past line end 7 | and into next 8 | normal again 9 | :OUTPUT-FILTER 10 | :EXPECTED 11 | /*********************************/ 12 | /* normal */ 13 | /* with some formating */ 14 | /* formating past line end */ 15 | /* and into next */ 16 | /* normal again */ 17 | /* */ 18 | /* */ 19 | /* */ 20 | /*********************************/ 21 | :EOF 22 | -------------------------------------------------------------------------------- /test/sunny-day/parchment.create.txt: -------------------------------------------------------------------------------- 1 | ____________________________________________________________ 2 | /\ \ 3 | \_| (includes some Unicode characters) | 4 | | Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, | 5 | | sed diam nonumy éirmod tempor invidunt ut labore | 6 | | et dolore magna aliquyam erat, sed diam voluptua. | 7 | | At vero eos et accusam et justo duo dolores et ea rebum. | 8 | | _______________________________________________________|_ 9 | \_/_________________________________________________________/ 10 | -------------------------------------------------------------------------------- /test/136_design_alias_by_alias.txt: -------------------------------------------------------------------------------- 1 | :DESC 2 | Test that a design can be selected by alias, even when it is not the first design in the file. This tests that 3 | lexer speedmode does not skip over alias names. 4 | 5 | :ARGS 6 | -f 136_design_alias_by_alias.cfg -p h3 -a vc -d alias3a 7 | :INPUT 8 | foo 9 | bar 10 | :OUTPUT-FILTER 11 | :EXPECTED 12 | ########### 13 | 1 1 14 | 2 2 15 | 3 3 16 | 4 1 17 | 5 2 18 | 1 3 19 | 2 foo 1 20 | 3 bar 2 21 | 4 3 22 | 5 1 23 | 1 2 24 | 2 3 25 | 3 1 26 | 4 2 27 | 5 3 28 | ########### 29 | :EOF 30 | -------------------------------------------------------------------------------- /test/138_design_alias_duplicate_name.txt: -------------------------------------------------------------------------------- 1 | :DESC 2 | Test that we get an error if an alias already exists. 3 | 4 | :ARGS 5 | -f 138_design_alias_duplicate_name.cfg -l 6 | :INPUT 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | boxes: 138_design_alias_duplicate_name.cfg: line 49: alias already in use -- alias2 10 | boxes: 138_design_alias_duplicate_name.cfg: line 49: skipping to next design 11 | 2 Available Styles in "138_design_alias_duplicate_name.cfg": 12 | ------------------------------------------------------------ 13 | 14 | design1: 15 | 16 | X1 your text X1 17 | 18 | 19 | design2 alias alias2: 20 | 21 | X2 your text X2 22 | 23 | 24 | :EOF 25 | -------------------------------------------------------------------------------- /test/166_design_alias_parent_clash.txt: -------------------------------------------------------------------------------- 1 | :DESC 2 | Test that when an alias is defined in a child config AND in a parent config, the child config wins. The parent design 3 | loses the alias. 4 | 5 | :ARGS 6 | -f 166_design_alias_parent_clash.cfg -l 7 | :INPUT 8 | :OUTPUT-FILTER 9 | :EXPECTED 10 | 2 Available Styles: 11 | ------------------- 12 | 13 | Configuration Files: 14 | - 166_design_alias_parent_clash.cfg 15 | - 166_design_alias_parent_clash.parent.cfg (parent) 16 | 17 | 18 | designA alias alias2: 19 | 20 | A from parent config 21 | 22 | 23 | designB alias alias1: 24 | 25 | B from regular config 26 | 27 | 28 | :EOF 29 | -------------------------------------------------------------------------------- /test/127_multiple_parent_configs.txt: -------------------------------------------------------------------------------- 1 | :DESC 2 | A config file that has a "parent" and a "grand-parent". 3 | Also test overwriting a design, which leads to designA being from config file 'B.cfg' 4 | 5 | :ARGS 6 | -f 127_data/C.cfg -l 7 | :INPUT 8 | :OUTPUT-FILTER 9 | :EXPECTED 10 | 3 Available Styles: 11 | ------------------- 12 | 13 | Configuration Files: 14 | - 127_data/C.cfg 15 | - 127_data/B.cfg (parent) 16 | - 127_data/A.cfg (parent) 17 | 18 | 19 | designA: 20 | 21 | A from config file B 22 | 23 | 24 | designB: 25 | 26 | B from config file B 27 | 28 | 29 | designC: 30 | 31 | C from config file C 32 | 33 | 34 | :EOF 35 | -------------------------------------------------------------------------------- /test/170_forbid_blank_box.txt: -------------------------------------------------------------------------------- 1 | :DESC 2 | Check that designs which consist only of whitespace are rejected. 3 | 4 | :ARGS 5 | -f 170_forbid_blank_box.cfg -l 6 | :INPUT 7 | :OUTPUT-FILTER 8 | :EXPECTED-ERROR 1 9 | boxes: 170_forbid_blank_box.cfg: line 9: must specify at least one non-empty shape per design 10 | boxes: 170_forbid_blank_box.cfg: line 9: skipping to next design 11 | boxes: 170_forbid_blank_box.cfg: line 29: must specify at least one non-empty shape per design 12 | boxes: 170_forbid_blank_box.cfg: line 29: skipping to next design 13 | boxes: no valid data in config file -- 170_forbid_blank_box.cfg 14 | boxes: no valid designs found 15 | :EOF 16 | -------------------------------------------------------------------------------- /test/sunny-day/important.create.txt: -------------------------------------------------------------------------------- 1 | /\ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! /\ 2 | |! | |! | 3 | |! | (includes some Unicode characters) |! | 4 | |! | Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, |! | 5 | |! | sed diam nonumy éirmod tempor invidunt ut labore |! | 6 | |! | et dolore magna aliquyam erat, sed diam voluptua. |! | 7 | |! | At vero eos et accusam et justo duo dolores et ea rebum. |! | 8 | |__| |__| 9 | (__)!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!(__) 10 | -------------------------------------------------------------------------------- /test/160_list_designs_author_designer.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -f 160_list_designs_author_designer.cfg -l 3 | :INPUT 4 | :OUTPUT-FILTER 5 | :EXPECTED 6 | 4 Available Styles in "160_list_designs_author_designer.cfg": 7 | ------------------------------------------------------------- 8 | 9 | designA 10 | designerA, coded by authorA: 11 | 12 | AAA 13 | AAA foo 14 | AAA 15 | 16 | 17 | designB 18 | unknown artist, coded by authorB: 19 | 20 | BBB 21 | BBB foo 22 | BBB 23 | 24 | 25 | designC 26 | designerC: 27 | 28 | CCC 29 | CCC foo 30 | CCC 31 | 32 | 33 | designD: 34 | 35 | DDD 36 | DDD foo 37 | DDD 38 | 39 | 40 | :EOF 41 | -------------------------------------------------------------------------------- /test/sunny-day/whirly.create.txt: -------------------------------------------------------------------------------- 1 | .+"+.+"+.+"+.+"+.+"+.+"+.+"+.+"+.+"+.+"+.+"+.+"+.+"+.+"+.+"+.+"+. 2 | ( ) 3 | ) (includes some Unicode characters) ( 4 | ( Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, ) 5 | ) sed diam nonumy éirmod tempor invidunt ut labore ( 6 | ( et dolore magna aliquyam erat, sed diam voluptua. ) 7 | ) At vero eos et accusam et justo duo dolores et ea rebum. ( 8 | ( ) 9 | "+.+"+.+"+.+"+.+"+.+"+.+"+.+"+.+"+.+"+.+"+.+"+.+"+.+"+.+"+.+"+.+" 10 | -------------------------------------------------------------------------------- /test/sunny-day/face.create.txt: -------------------------------------------------------------------------------- 1 | .-----------------------(0) (0)-----------------------. 2 | ( \/ ) 3 | ( \____/ ) 4 | ( ) 5 | ( (includes some Unicode characters) ) 6 | ( Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, ) 7 | ( sed diam nonumy éirmod tempor invidunt ut labore ) 8 | ( et dolore magna aliquyam erat, sed diam voluptua. ) 9 | ( At vero eos et accusam et justo duo dolores et ea rebum. ) 10 | '--------------------------------------------------------' 11 | -------------------------------------------------------------------------------- /test/192_logging1.txt: -------------------------------------------------------------------------------- 1 | :DESC 2 | Test case which checks some logging features. 3 | 4 | :ARGS 5 | -d dog -x debug:all 6 | :INPUT 7 | foo 8 | :OUTPUT-FILTER 9 | :EXPECTED discard-stderr 10 | __ _,--="=--,_ __ 11 | / \." .-. "./ \ 12 | / ,/ _ : : _ \/` \ 13 | \ `| /o\ :_: /o\ |\__/ 14 | `-'| :="~` _ `~"=: | 15 | \` (_) `/ jgs 16 | .-"-. \ | / .-"-. 17 | .---{ }--| /,.-'-.,\ |--{ }---. 18 | ) (_)_)_) \_/`~-===-~`\_/ (_(_(_) ( 19 | ( foo ) 20 | ) ( 21 | '---------------------------------------' 22 | :EOF 23 | -------------------------------------------------------------------------------- /test/139_parent_config_without_file.txt: -------------------------------------------------------------------------------- 1 | :DESC 2 | Test that the parser handles gracefully when a broken config file contains just "parent" with no file. 3 | 4 | :ARGS 5 | -f 139_parent_config_without_file.cfg -l 6 | :INPUT 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | boxes: 139_parent_config_without_file.cfg: line 30: syntax error 10 | boxes: 139_parent_config_without_file.cfg: line 30: skipping to next design 11 | 2 Available Styles in "139_parent_config_without_file.cfg": 12 | ----------------------------------------------------------- 13 | 14 | designA: 15 | 16 | AAA 17 | AAA foo 18 | AAA 19 | 20 | 21 | designB: 22 | 23 | BBB 24 | BBB foo 25 | BBB 26 | 27 | 28 | :EOF 29 | -------------------------------------------------------------------------------- /test/sunny-day/columns.mend.txt: -------------------------------------------------------------------------------- 1 | __^__ __^__ 2 | ( ___ )--------------------------------------------------------------------( ___ ) 3 | | / | (includes some Unicode characters) | \ | 4 | | / | Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, | \ | 5 | | / | sed diam nonumy éirmod tempor invidunt ut labore | \ | 6 | | / | __ET__ dolore magna aliquyam erat, sed diam voluptua. | \ | 7 | |___| At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. |___| 8 | (_____)--------------------------------------------------------------------(_____) 9 | -------------------------------------------------------------------------------- /test/129_multiple_parent_configs_empty_base.txt: -------------------------------------------------------------------------------- 1 | :DESC 2 | Config file D has 3 parents, but no design definitions of its own. 3 | The order in which parents are evaluated matters! Also, design names are case insensitive. 4 | 5 | :ARGS 6 | -f 129_data/D.cfg -l 7 | :INPUT 8 | :OUTPUT-FILTER 9 | :EXPECTED 10 | 3 Available Styles: 11 | ------------------- 12 | 13 | Configuration Files: 14 | - 129_data/D.cfg 15 | - 129_data/C.cfg (parent) 16 | - 129_data/B.cfg (parent) 17 | - 129_data/A.cfg (parent) 18 | 19 | 20 | Designa: 21 | 22 | A from config file B 23 | 24 | 25 | designB: 26 | 27 | B from config file B 28 | 29 | 30 | designC: 31 | 32 | C from config file C 33 | 34 | 35 | :EOF 36 | -------------------------------------------------------------------------------- /test/131_data/A.cfg: -------------------------------------------------------------------------------- 1 | BOX designB 2 | 3 | sample 4 | B from config file A 5 | ends 6 | 7 | # The next line is syntactically fine, but it is NOT a parent reference. 8 | parent "131_data/C.cfg" 9 | 10 | shapes { 11 | w ("BBB", "BBB", "BBB") 12 | } 13 | 14 | elastic ( 15 | w 16 | ) 17 | 18 | END designB 19 | 20 | # ------------------------------------------------------- 21 | 22 | BOX designB2 23 | 24 | sample 25 | B2 from config file A 26 | ends 27 | 28 | # The next line is a syntax error, because of missing quotes. Also, this is NOT a parent reference. 29 | parent 131_data/C.cfg 30 | 31 | shapes { 32 | w ("BB2", "BB2", "BB2") 33 | } 34 | 35 | elastic ( 36 | w 37 | ) 38 | 39 | END designB2 40 | -------------------------------------------------------------------------------- /test/sunny-day/scroll-akn.create.txt: -------------------------------------------------------------------------------- 1 | /"\/\_..-----------------------------------------------------------._/\/"\ 2 | ( _|| (includes some Unicode characters) ||_ ) 3 | \_/\/ || Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, || \/\_/ 4 | || sed diam nonumy éirmod tempor invidunt ut labore || 5 | || et dolore magna aliquyam erat, sed diam voluptua. || 6 | || At vero eos et accusam et justo duo dolores et ea rebum. || 7 | /"\/\_|------------------------------------------------------------|_/\/"\ 8 | ( _| |_ ) 9 | \_/\/ `------------------------------------------------------------' \/\_/ 10 | -------------------------------------------------------------------------------- /test/sunny-day/parchment.mend.txt: -------------------------------------------------------------------------------- 1 | ________________________________________________________________________ 2 | /\ \ 3 | \_| (includes some Unicode characters) | 4 | | Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, | 5 | | sed diam nonumy éirmod tempor invidunt ut labore | 6 | | __ET__ dolore magna aliquyam erat, sed diam voluptua. | 7 | | At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. | 8 | | ___________________________________________________________________|_ 9 | \_/_____________________________________________________________________/ 10 | -------------------------------------------------------------------------------- /test/139_parent_config_without_file.cfg: -------------------------------------------------------------------------------- 1 | BOX designA 2 | 3 | sample 4 | AAA 5 | AAA foo 6 | AAA 7 | ends 8 | 9 | shapes { 10 | w ("AAA", "AAA", "AAA") 11 | } 12 | 13 | elastic ( 14 | w 15 | ) 16 | 17 | padding { 18 | left 1 19 | } 20 | 21 | END designA 22 | 23 | # ------------------------------------------------------- 24 | 25 | # ERROR in following line (missing file name): 26 | parent 27 | 28 | # ------------------------------------------------------- 29 | 30 | BOX designB 31 | 32 | sample 33 | BBB 34 | BBB foo 35 | BBB 36 | ends 37 | 38 | shapes { 39 | w ("BBB", "BBB", "BBB") 40 | } 41 | 42 | elastic ( 43 | w 44 | ) 45 | 46 | padding { 47 | left 1 48 | } 49 | 50 | END designB 51 | -------------------------------------------------------------------------------- /test/sunny-day/cowsay.create.txt: -------------------------------------------------------------------------------- 1 | ___________________________________________________________ 2 | / \ 3 | | (includes some Unicode characters) | 4 | | Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, | 5 | | sed diam nonumy éirmod tempor invidunt ut labore | 6 | | et dolore magna aliquyam erat, sed diam voluptua. | 7 | | At vero eos et accusam et justo duo dolores et ea rebum. | 8 | \ / 9 | ----------------------------------------------------------- 10 | \ ^__^ 11 | \ (oo)\_______ 12 | (__)\ )\/\ 13 | ||----w | 14 | || || 15 | -------------------------------------------------------------------------------- /test/sunny-day/fence.create.txt: -------------------------------------------------------------------------------- 1 | /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ 2 | |__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__| 3 | | | | | | | | | | | | | | | | | | | | | | | | 4 | | | (includes some Unicode characters) | | 5 | | | Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, | | 6 | | | sed diam nonumy éirmod tempor invidunt ut labore | | 7 | | | et dolore magna aliquyam erat, sed diam voluptua. | | 8 | | | At vero eos et accusam et justo duo dolores et ea rebum. | | 9 | |__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__| 10 | |__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__| 11 | -------------------------------------------------------------------------------- /test/182_remove_box_ignore_invisible_shape.txt: -------------------------------------------------------------------------------- 1 | :DESC 2 | In this test case, the box design is fully colored, but the input is monochrome. 3 | This tests the comparison mode 'ignore_invisible_shape'. 4 | 5 | :ARGS 6 | --config 18x_remove_box_ignore_invisible_all.cfg --design designA --remove 7 | :INPUT 8 | .-"```"-. 9 | /_______; \ 10 | (_________)\| 11 | / / 👁 👁 \ \(_) 12 | / ( \___/ ) \ 13 | _ooo\__\_____/__/____ 14 | / \ 15 | | Hello World! | 16 | \_________________ooo_/ 17 | / \ 18 | /:.:.:.:.:.:.:\ 19 | | | | 20 | \==|==/ jgs 21 | /-'Y'-\ 22 | (__/ \__) 23 | :OUTPUT-FILTER 24 | :EXPECTED 25 | Hello World! 26 | :EOF 27 | -------------------------------------------------------------------------------- /test/084_list_design_info_for_cmdline_definition.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -c "#" -l 3 | :INPUT 4 | :OUTPUT-FILTER 5 | :EXPECTED 6 | Complete Design Information for "": 7 | ------------------------------------------------------------ 8 | Alias Names: none 9 | Author: (unknown author) 10 | Original Designer: (unknown artist) 11 | Configuration File: (command line) 12 | Indentation Mode: box (indent box) 13 | Replacement Rules: none 14 | Reversion Rules: none 15 | Minimum Box Dimensions: 3 x 3 (width x height) 16 | Default Padding: left 1 17 | Default Killblank: no 18 | Tags: transient 19 | Elastic Shapes: N, E, S, W 20 | Defined Shapes: W: "#" 21 | :EOF 22 | -------------------------------------------------------------------------------- /test/sunny-day/important.mend.txt: -------------------------------------------------------------------------------- 1 | /\ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! /\ 2 | |! | |! | 3 | |! | (includes some Unicode characters) |! | 4 | |! | Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, |! | 5 | |! | sed diam nonumy éirmod tempor invidunt ut labore |! | 6 | |! | __ET__ dolore magna aliquyam erat, sed diam voluptua. |! | 7 | |! | At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. |! | 8 | |__| |__| 9 | (__)!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!(__) 10 | -------------------------------------------------------------------------------- /test/sunny-day/whirly.mend.txt: -------------------------------------------------------------------------------- 1 | .+"+.+"+.+"+.+"+.+"+.+"+.+"+.+"+.+"+.+"+.+"+.+"+.+"+.+"+.+"+.+"+.+"+.+"+.+"+. 2 | ( ) 3 | ) (includes some Unicode characters) ( 4 | ( Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, ) 5 | ) sed diam nonumy éirmod tempor invidunt ut labore ( 6 | ( __ET__ dolore magna aliquyam erat, sed diam voluptua. ) 7 | ) At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. ( 8 | ( ) 9 | "+.+"+.+"+.+"+.+"+.+"+.+"+.+"+.+"+.+"+.+"+.+"+.+"+.+"+.+"+.+"+.+"+.+"+.+"+.+" 10 | -------------------------------------------------------------------------------- /test/sunny-day/tux.create.txt: -------------------------------------------------------------------------------- 1 | ___________________________________________________________ 2 | / \ 3 | | (includes some Unicode characters) | 4 | | Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, | 5 | | sed diam nonumy éirmod tempor invidunt ut labore | 6 | | et dolore magna aliquyam erat, sed diam voluptua. | 7 | | At vero eos et accusam et justo duo dolores et ea rebum. | 8 | \ / 9 | ----------------------------------------------------------- 10 | \ 11 | \ 12 | .--. 13 | |o_o | 14 | |:_/ | 15 | // \ \ 16 | (| | ) 17 | /'\_ _/`\ 18 | \___)=(___/ 19 | -------------------------------------------------------------------------------- /test/sunny-day/face.mend.txt: -------------------------------------------------------------------------------- 1 | .-----------------------------(0) (0)-----------------------------. 2 | ( \/ ) 3 | ( \____/ ) 4 | ( ) 5 | ( (includes some Unicode characters) ) 6 | ( Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, ) 7 | ( sed diam nonumy éirmod tempor invidunt ut labore ) 8 | ( __ET__ dolore magna aliquyam erat, sed diam voluptua. ) 9 | ( At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. ) 10 | '--------------------------------------------------------------------' 11 | -------------------------------------------------------------------------------- /test/sunny-day/scroll-akn.mend.txt: -------------------------------------------------------------------------------- 1 | /"\/\_..-----------------------------------------------------------------------._/\/"\ 2 | ( _|| (includes some Unicode characters) ||_ ) 3 | \_/\/ || Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, || \/\_/ 4 | || sed diam nonumy éirmod tempor invidunt ut labore || 5 | || __ET__ dolore magna aliquyam erat, sed diam voluptua. || 6 | || At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. || 7 | /"\/\_|------------------------------------------------------------------------|_/\/"\ 8 | ( _| |_ ) 9 | \_/\/ `------------------------------------------------------------------------' \/\_/ 10 | -------------------------------------------------------------------------------- /test/058_size_minimum_by_design.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -d diamonds -s 15x7 3 | :INPUT 4 | aaa 5 | bbbb 6 | ccccc 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /\ /\ /\ 10 | /\//\\/\ /\//\\/\ /\//\\/\ 11 | /\//\\\///\\/\//\\\///\\/\//\\\///\\/\ 12 | //\\\//\/\\///\\\//\/\\///\\\//\/\\///\\ 13 | \\//\/aaa \/\\// 14 | \/ bbbb \/ 15 | /\ ccccc /\ 16 | //\\ //\\ 17 | \\// \\// 18 | \/ \/ 19 | /\ /\ 20 | //\\/\ /\//\\ 21 | \\///\\/\//\\\///\\/\//\\\///\\/\//\\\// 22 | \/\\///\\\//\/\\///\\\//\/\\///\\\//\/ 23 | \/\\//\/ \/\\//\/ \/\\//\/ 24 | \/ \/ jgs \/ 25 | :EOF 26 | -------------------------------------------------------------------------------- /test/059_size_same_as_design.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -d diamonds -s 40x16 3 | :INPUT 4 | aaa 5 | bbbb 6 | ccccc 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /\ /\ /\ 10 | /\//\\/\ /\//\\/\ /\//\\/\ 11 | /\//\\\///\\/\//\\\///\\/\//\\\///\\/\ 12 | //\\\//\/\\///\\\//\/\\///\\\//\/\\///\\ 13 | \\//\/aaa \/\\// 14 | \/ bbbb \/ 15 | /\ ccccc /\ 16 | //\\ //\\ 17 | \\// \\// 18 | \/ \/ 19 | /\ /\ 20 | //\\/\ /\//\\ 21 | \\///\\/\//\\\///\\/\//\\\///\\/\//\\\// 22 | \/\\///\\\//\/\\///\\\//\/\\///\\\//\/ 23 | \/\\//\/ \/\\//\/ \/\\//\/ 24 | \/ \/ jgs \/ 25 | :EOF 26 | -------------------------------------------------------------------------------- /test/sunny-day/cowsay.mend.txt: -------------------------------------------------------------------------------- 1 | _______________________________________________________________________ 2 | / \ 3 | | (includes some Unicode characters) | 4 | | Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, | 5 | | sed diam nonumy éirmod tempor invidunt ut labore | 6 | | __ET__ dolore magna aliquyam erat, sed diam voluptua. | 7 | | At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. | 8 | \ / 9 | ----------------------------------------------------------------------- 10 | \ ^__^ 11 | \ (oo)\_______ 12 | (__)\ )\/\ 13 | ||----w | 14 | || || 15 | -------------------------------------------------------------------------------- /test/sunny-day/nuke.create.txt: -------------------------------------------------------------------------------- 1 | _ ._ _ , _ ._ 2 | (_ ' ( ` )_ .__) 3 | ( ( ( ) `) ) _) 4 | (__ (_ (_ . _) _) ,__) 5 | `~~`\ ' . /`~~` 6 | ,::: ; ; :::, 7 | ':::::::::::::::' 8 | _________________jgs______/_ __ \_________________________ 9 | | | 10 | | (includes some Unicode characters) | 11 | | Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, | 12 | | sed diam nonumy éirmod tempor invidunt ut labore | 13 | | et dolore magna aliquyam erat, sed diam voluptua. | 14 | | At vero eos et accusam et justo duo dolores et ea rebum. | 15 | |__________________________________________________________| 16 | -------------------------------------------------------------------------------- /test/sunny-day/fence.mend.txt: -------------------------------------------------------------------------------- 1 | /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ 2 | |__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__| 3 | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4 | | | (includes some Unicode characters) | | 5 | | | Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, | | 6 | | | sed diam nonumy éirmod tempor invidunt ut labore | | 7 | | | __ET__ dolore magna aliquyam erat, sed diam voluptua. | | 8 | | | At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. | | 9 | |__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__| 10 | |__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__|__| 11 | -------------------------------------------------------------------------------- /test/sunny-day/xes.create.txt: -------------------------------------------------------------------------------- 1 | <\/><\/><\/><\/><\/><\/><\/><\/><\/><\/><\/><\/><\/> 2 | <\/><\/> 3 | 4 | <\/> (includes some Unicode characters) <\/> 5 | Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, 6 | <\/> sed diam nonumy éirmod tempor invidunt ut labore <\/> 7 | et dolore magna aliquyam erat, sed diam voluptua. 8 | <\/> At vero eos et accusam et justo duo dolores et ea rebum. <\/> 9 | 10 | <\/> <\/> 11 | <\/><\/><\/><\/><\/><\/><\/><\/><\/><\/><\/><\/><\/> 12 | jgs 13 | -------------------------------------------------------------------------------- /test/131_data/B.cfg: -------------------------------------------------------------------------------- 1 | BOX designA 2 | 3 | sample 4 | A from config file B 5 | parent 131_data/C.cfg 6 | ends 7 | 8 | shapes { 9 | w ("AAA", "AAA", "AAA") 10 | } 11 | 12 | elastic ( 13 | w 14 | ) 15 | 16 | END designA 17 | 18 | # ------------------------------------------------------- 19 | 20 | BOX BROKEN 21 | 22 | sample 23 | BROKEN from config file B 24 | ends 25 | 26 | shapes { 27 | w ("BROKEN") 28 | } 29 | 30 | # elastic definition is missing 31 | 32 | END BROKEN 33 | 34 | # ------------------------------------------------------- 35 | 36 | parent 131_data/A.cfg 37 | 38 | # ------------------------------------------------------- 39 | 40 | BOX designC 41 | 42 | sample 43 | C from config file B 44 | ends 45 | 46 | shapes { 47 | w ("CCC", "CCC", "CCC") 48 | } 49 | 50 | elastic ( 51 | w 52 | ) 53 | 54 | END designC 55 | -------------------------------------------------------------------------------- /test/sunny-day/stark2.create.txt: -------------------------------------------------------------------------------- 1 | .:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@-:. 2 | .:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@-:. 3 | .:-@ @-:. 4 | .:-@ (includes some Unicode characters) @-:. 5 | .:-@ Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, @-:. 6 | .:-@ sed diam nonumy éirmod tempor invidunt ut labore @-:. 7 | .:-@ et dolore magna aliquyam erat, sed diam voluptua. @-:. 8 | .:-@ At vero eos et accusam et justo duo dolores et ea rebum. @-:. 9 | .:-@ @-:. 10 | .:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@-:. jgs 11 | .:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@-:. 12 | -------------------------------------------------------------------------------- /test/sunny-day/headline.create.txt: -------------------------------------------------------------------------------- 1 | /*********************************************************************************************************************/ 2 | /* ( i n c l u d e s s o m e U n i c o d e c h a r a c t e r s ) */ 3 | /* L o r e m i p s u m d o l ö r s i t ä m e t , c o n s e t e t u r s a d i p s c i n g e l i t r , */ 4 | /* s e d d i a m n o n u m y é i r m o d t e m p o r i n v i d u n t u t l a b o r e */ 5 | /* e t d o l o r e m a g n a a l i q u y a m e r a t , s e d d i a m v o l u p t u a . */ 6 | /* A t v e r o e o s e t a c c u s a m e t j u s t o d u o d o l o r e s e t e a r e b u m . */ 7 | /*********************************************************************************************************************/ 8 | -------------------------------------------------------------------------------- /test/sunny-day/tux.mend.txt: -------------------------------------------------------------------------------- 1 | _______________________________________________________________________ 2 | / \ 3 | | (includes some Unicode characters) | 4 | | Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, | 5 | | sed diam nonumy éirmod tempor invidunt ut labore | 6 | | __ET__ dolore magna aliquyam erat, sed diam voluptua. | 7 | | At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. | 8 | \ / 9 | ----------------------------------------------------------------------- 10 | \ 11 | \ 12 | .--. 13 | |o_o | 14 | |:_/ | 15 | // \ \ 16 | (| | ) 17 | /'\_ _/`\ 18 | \___)=(___/ 19 | -------------------------------------------------------------------------------- /.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Win32", 5 | "includePath": [ 6 | "${workspaceFolder}/src", 7 | "${workspaceFolder}/out", 8 | "${workspaceFolder}/vendor/libunistring-1.0/lib", 9 | "${workspaceFolder}/vendor/pcre2-10.40/src", 10 | "${workspaceFolder}/vendor/cmocka-1.1.0/include", 11 | "C:/MinGW/include/ncurses" 12 | ], 13 | "defines": [ 14 | "_DEBUG", 15 | "UNICODE", 16 | "_UNICODE" 17 | ], 18 | "compilerPath": "C:/MinGW/bin/gcc.exe", 19 | "cStandard": "c99", 20 | "cppStandard": "gnu++14", 21 | "intelliSenseMode": "windows-gcc-x86" 22 | } 23 | ], 24 | "version": 4 25 | } 26 | -------------------------------------------------------------------------------- /test/sunny-day/ian_jones.create.txt: -------------------------------------------------------------------------------- 1 | \\\/// 2 | / _ _ \ 3 | (| (.)(.) |) 4 | .---------------------.OOOo--()--oOOO.---------------------. 5 | | | 6 | | (includes some Unicode characters) | 7 | | Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, | 8 | | sed diam nonumy éirmod tempor invidunt ut labore | 9 | | et dolore magna aliquyam erat, sed diam voluptua. | 10 | | At vero eos et accusam et justo duo dolores et ea rebum. | 11 | | | 12 | '---------------------.oooO--------------------------------' 13 | ( ) Oooo. 14 | \ ( ( ) 15 | \_) ) / 16 | (_/ 17 | -------------------------------------------------------------------------------- /test/sunny-day/important2.create.txt: -------------------------------------------------------------------------------- 1 | /\ /\ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! /\ /\ 2 | |! ||! |!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!|! ||! | 3 | |! ||! | |! ||! | 4 | |! ||! | (includes some Unicode characters) |! ||! | 5 | |! ||! | Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, |! ||! | 6 | |! ||! | sed diam nonumy éirmod tempor invidunt ut labore |! ||! | 7 | |! ||! | et dolore magna aliquyam erat, sed diam voluptua. |! ||! | 8 | |! ||! | At vero eos et accusam et justo duo dolores et ea rebum. |! ||! | 9 | |! ||! | |! ||! | 10 | |__||__|!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!|__||__| 11 | (__)(__)!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!(__)(__) 12 | -------------------------------------------------------------------------------- /test/114_headline_ansi_unicode_remove.txt: -------------------------------------------------------------------------------- 1 | :DESC 2 | Tests removal of a box of the 'headline' design from unicode text with ANSI color escapes added by lolcat. 3 | Indentation is restored, by "coloring" of spaces is lost. 4 | Indentation is correctly restored as 3 spaces, because we give -p, telling it what the requested padding was when the 5 | box was created. 6 | 7 | :ARGS 8 | -n UTF-8 -d headline -p l3r2 -r 9 | :INPUT 10 | /**************************/ 11 | /* f o o  海  b a r  */ 12 | /* f o o b a r */ 13 | /**************************/ 14 | :OUTPUT-FILTER 15 | :EXPECTED 16 | foo 海 bar 17 | foobar 18 | :EOF 19 | -------------------------------------------------------------------------------- /test/sunny-day/mouse.create.txt: -------------------------------------------------------------------------------- 1 | .--, .--, 2 | ( ( \.---./ ) ) 3 | '.__/o o\__.' 4 | {= ^ =} 5 | > - < 6 | ______________________.""`-------`""._____________________ 7 | / \ 8 | \ (includes some Unicode characters) / 9 | / Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, \ 10 | \ sed diam nonumy éirmod tempor invidunt ut labore / 11 | / et dolore magna aliquyam erat, sed diam voluptua. \ 12 | \ At vero eos et accusam et justo duo dolores et ea rebum. / 13 | / \ 14 | \__________________________________________________________/ 15 | ___)( )(___ jgs 16 | (((__) (__))) 17 | -------------------------------------------------------------------------------- /test/sunny-day/scroll.create.txt: -------------------------------------------------------------------------------- 1 | / ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \ 2 | | /~~\ /~~\ | 3 | |\ \ | (includes some Unicode characters) | / /| 4 | | \ /| Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, |\ / | 5 | | ~~ | sed diam nonumy éirmod tempor invidunt ut labore | ~~ | 6 | | | et dolore magna aliquyam erat, sed diam voluptua. | | 7 | | | At vero eos et accusam et justo duo dolores et ea rebum. | | 8 | | | | | 9 | \ |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| / 10 | \ / \ / 11 | ~~~ ~~~ 12 | -------------------------------------------------------------------------------- /test/184_create_box_colored_contents.txt: -------------------------------------------------------------------------------- 1 | :DESC 2 | Creates a unicode box which also colors its contents. 3 | 4 | :ARGS 5 | -d critical -i box 6 | :INPUT 7 | Aaargh, let go of me! 8 | :OUTPUT-FILTER 9 | :EXPECTED 10 | ▄▄ CRITICAL ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ 11 | █ █ 12 | █ Aaargh, let go of me! █ 13 | █ █ 14 | ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ 15 | :EOF 16 | -------------------------------------------------------------------------------- /test/135_design_alias_by_design.txt: -------------------------------------------------------------------------------- 1 | :DESC 2 | Test that the alias names of a design are properly listed in the design information sheet. 3 | 4 | :ARGS 5 | -f 135_design_alias_by_design.cfg -l -d design 6 | :INPUT 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | Complete Design Information for "design": 10 | ----------------------------------------- 11 | Alias Names: alias1, alias2 12 | Author: (unknown author) 13 | Original Designer: (unknown artist) 14 | Configuration File: 135_design_alias_by_design.cfg 15 | Indentation Mode: box (indent box) 16 | Replacement Rules: none 17 | Reversion Rules: none 18 | Minimum Box Dimensions: 3 x 3 (width x height) 19 | Default Padding: left 1, right 1 20 | Default Killblank: no 21 | Tags: none 22 | Elastic Shapes: N, E, S, W 23 | Defined Shapes: E: "X" 24 | W: "X" 25 | :EOF 26 | -------------------------------------------------------------------------------- /test/168_parent_keyword_in_sample_ok.txt: -------------------------------------------------------------------------------- 1 | :DESC 2 | Test that the keyword 'parent' may occur as a regular string in a sample block, without triggering parent config file 3 | resolution. 4 | 5 | :ARGS 6 | -f 168_parent_keyword_in_sample_ok.cfg -d designB -l 7 | :INPUT 8 | :OUTPUT-FILTER 9 | :EXPECTED 10 | Complete Design Information for "designB": 11 | ------------------------------------------ 12 | Alias Names: none 13 | Author: (unknown author) 14 | Original Designer: (unknown artist) 15 | Configuration File: 168_parent_keyword_in_sample_ok.cfg 16 | Indentation Mode: box (indent box) 17 | Replacement Rules: none 18 | Reversion Rules: none 19 | Minimum Box Dimensions: 3 x 3 (width x height) 20 | Default Padding: none 21 | Default Killblank: no 22 | Tags: none 23 | Elastic Shapes: N, E, S, W 24 | Defined Shapes: W: "B" 25 | :EOF 26 | -------------------------------------------------------------------------------- /test/190_remove_blank_nw_lines.txt: -------------------------------------------------------------------------------- 1 | :DESC 2 | Auto-detect the box design as 'capgirl', remove the box, and also remove the box indentation because `-i none`. 3 | The resulting text will still appear a bit indented, but those are the spaces from inside the box! 4 | Note that the NW corner is mostly blank (except its very bottom), which triggers some potential problems in the code. 5 | 6 | :ARGS 7 | --remove -i none 8 | :INPUT 9 | .-"```"-. 10 | /_______; \ 11 | (_________)\| 12 | / / a a \ \(_) 13 | / ( \___/ ) \ 14 | _ooo\__\_____/__/____ 15 | / \ 16 | | foobar | 17 | \_________________ooo_/ 18 | / \ 19 | /:.:.:.:.:.:.:\ 20 | | | | 21 | \==|==/ jgs 22 | /-'Y'-\ 23 | (__/ \__) 24 | :OUTPUT-FILTER 25 | :EXPECTED 26 | foobar 27 | :EOF 28 | -------------------------------------------------------------------------------- /test/sunny-day/boy.create.txt: -------------------------------------------------------------------------------- 1 | .-"""-. 2 | / .===. \ 3 | \/ 6 6 \/ 4 | ( \___/ ) 5 | ____________________ooo__\_____/________________________ 6 | / \ 7 | | (includes some Unicode characters) | 8 | | Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, | 9 | | sed diam nonumy éirmod tempor invidunt ut labore | 10 | | et dolore magna aliquyam erat, sed diam voluptua. | 11 | | At vero eos et accusam et justo duo dolores et ea rebum. | 12 | \_________________________________ooo____________________/ 13 | | | | 14 | |_ | _| 15 | | | | 16 | |__|__| jgs 17 | /-'Y'-\ 18 | (__/ \__) 19 | -------------------------------------------------------------------------------- /test/137_design_alias_no_accumulation.txt: -------------------------------------------------------------------------------- 1 | :DESC 2 | Test that the list of aliases is properly reset when parser is in speedmode. 3 | 4 | :ARGS 5 | -f 137_design_alias_no_accumulation.cfg -d alias3b -l 6 | :INPUT 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | Complete Design Information for "design3": 10 | ------------------------------------------ 11 | Alias Names: alias3a, alias3b 12 | Author: (unknown author) 13 | Original Designer: (unknown artist) 14 | Configuration File: 137_design_alias_no_accumulation.cfg 15 | Indentation Mode: box (indent box) 16 | Replacement Rules: none 17 | Reversion Rules: none 18 | Minimum Box Dimensions: 5 x 3 (width x height) 19 | Default Padding: left 1, right 1 20 | Default Killblank: no 21 | Tags: none 22 | Elastic Shapes: N, E, S, W 23 | Defined Shapes: E: "X3" 24 | W: "X3" 25 | :EOF 26 | -------------------------------------------------------------------------------- /test/sunny-day/girl.create.txt: -------------------------------------------------------------------------------- 1 | .-"""-. 2 | / .===. \ 3 | / / a a \ \ 4 | / ( \___/ ) \ 5 | ___________________ooo\__\_____/__/_____________________ 6 | / \ 7 | | (includes some Unicode characters) | 8 | | Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, | 9 | | sed diam nonumy éirmod tempor invidunt ut labore | 10 | | et dolore magna aliquyam erat, sed diam voluptua. | 11 | | At vero eos et accusam et justo duo dolores et ea rebum. | 12 | \__________________________________ooo___________________/ 13 | / \ 14 | /:.:.:.:.:.:.:\ 15 | | | | 16 | \==|==/ jgs 17 | /-'Y'-\ 18 | (__/ \__) 19 | -------------------------------------------------------------------------------- /test/103_ansi_pad.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -pa5 3 | :INPUT 4 | normal 5 | with some formating 6 | formating past line end 7 | and into next 8 | normal again 9 | :OUTPUT-FILTER 10 | :EXPECTED 11 | /***********************************/ 12 | /* */ 13 | /* */ 14 | /* */ 15 | /* */ 16 | /* */ 17 | /* normal */ 18 | /* with some formating */ 19 | /* formating past line end */ 20 | /* and into next */ 21 | /* normal again */ 22 | /* */ 23 | /* */ 24 | /* */ 25 | /* */ 26 | /* */ 27 | /***********************************/ 28 | :EOF 29 | -------------------------------------------------------------------------------- /test/sunny-day/sunset.create.txt: -------------------------------------------------------------------------------- 1 | . 2 | . | . 3 | \ | / 4 | '. \ ' / .' 5 | '. .'```'. .' 6 | <>....................:::::::`.......`:::::::...................<> 7 | <>: :<> 8 | <>: (includes some Unicode characters) :<> 9 | <>: Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, :<> 10 | <>: sed diam nonumy éirmod tempor invidunt ut labore :<> 11 | <>: et dolore magna aliquyam erat, sed diam voluptua. :<> 12 | <>: At vero eos et accusam et justo duo dolores et ea rebum. :<> 13 | <>: :<> 14 | <>:............................................................:<> jgs 15 | <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> 16 | -------------------------------------------------------------------------------- /test/185_remove_box_uncolor_contents.txt: -------------------------------------------------------------------------------- 1 | :DESC 2 | Removes a unicode box which had colored its contents, restoring the original monochrome text. 3 | 4 | :ARGS 5 | -r 6 | :INPUT 7 | ▄▄ CRITICAL ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ 8 | █ █ 9 | █ Aaargh, let go of me! █ 10 | █ █ 11 | ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ 12 | :OUTPUT-FILTER 13 | :EXPECTED 14 | Aaargh, let go of me! 15 | :EOF 16 | -------------------------------------------------------------------------------- /test/sunny-day/dog.create.txt: -------------------------------------------------------------------------------- 1 | __ _,--="=--,_ __ 2 | / \." .-. "./ \ 3 | / ,/ _ : : _ \/` \ 4 | \ `| /o\ :_: /o\ |\__/ 5 | `-'| :="~` _ `~"=: | 6 | \` (_) `/ jgs 7 | .-"-. \ | / .-"-. 8 | .--------------{ }--| /,.-'-.,\ |--{ }-------------. 9 | ) (_)_)_) \_/`~-===-~`\_/ (_(_(_) ( 10 | ( (includes some Unicode characters) ) 11 | ) Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, ( 12 | ( sed diam nonumy éirmod tempor invidunt ut labore ) 13 | ) et dolore magna aliquyam erat, sed diam voluptua. ( 14 | ( At vero eos et accusam et justo duo dolores et ea rebum. ) 15 | ) ( 16 | '------------------------------------------------------------' 17 | -------------------------------------------------------------------------------- /tools/VERIFICATION.txt: -------------------------------------------------------------------------------- 1 | VERIFICATION 2 | Verification is intended to assist the Chocolatey moderators and community 3 | in verifying that this package's contents are trustworthy. 4 | 5 | 6 | .+"+.+"+.+"+.+"+.+"+. 7 | ( ) 8 | ) b o x e s ( 9 | ( ) 10 | "+.+"+.+"+.+"+.+"+.+" 11 | 12 | This package is maintained by the original author of the contained software. 13 | The nuspec of this package is located at https://github.com/ascii-boxes/boxes/blob/master/boxes.portable.nuspec . 14 | 15 | Verification instructions: 16 | 17 | 1. Download Windows binary from project GitHub site: 18 | https://github.com/ascii-boxes/boxes/releases 19 | 2. Compare with contents of this package. 20 | The files "boxes.exe" and "boxes.cfg" should be binary identical. 21 | 22 | That's all, really. Boxes is a simple, portable command-line application which consists only of these two files. 23 | -------------------------------------------------------------------------------- /test/138_design_alias_duplicate_name.cfg: -------------------------------------------------------------------------------- 1 | 2 | BOX design1 3 | 4 | sample 5 | X1 your text X1 6 | ends 7 | 8 | shapes { 9 | w ("X1") 10 | e ("X1") 11 | } 12 | 13 | elastic ( 14 | e, w 15 | ) 16 | 17 | padding { 18 | horizontal 1 19 | } 20 | 21 | END design1 22 | 23 | # ------------------------------------------- 24 | 25 | BOX design2, alias2 26 | 27 | sample 28 | X2 your text X2 29 | ends 30 | 31 | shapes { 32 | w ("X2") 33 | e ("X2") 34 | } 35 | 36 | elastic ( 37 | e, w 38 | ) 39 | 40 | padding { 41 | horizontal 1 42 | } 43 | 44 | END design2 45 | 46 | # ------------------------------------------- 47 | 48 | # Next line uses the same alias as design2, which is wrong: 49 | BOX design3, alias2 50 | 51 | sample 52 | X3 your text X3 53 | ends 54 | 55 | shapes { 56 | w ("X3") 57 | e ("X3") 58 | } 59 | 60 | elastic ( 61 | e, w 62 | ) 63 | 64 | padding { 65 | horizontal 1 66 | } 67 | 68 | END design3 69 | -------------------------------------------------------------------------------- /test/132_data/B.cfg: -------------------------------------------------------------------------------- 1 | BOX designA 2 | 3 | sample 4 | AAA 5 | AAA foo 6 | AAA 7 | ends 8 | 9 | shapes { 10 | w ("AAA", "AAA", "AAA") 11 | } 12 | 13 | elastic ( 14 | w 15 | ) 16 | 17 | padding { 18 | left 1 19 | } 20 | 21 | END designA 22 | 23 | # ------------------------------------------------------- 24 | 25 | BOX designB 26 | 27 | sample 28 | BBB 29 | BBB foo 30 | BBB 31 | ends 32 | 33 | shapes { 34 | w ("BBB", "BBB", "BBB") 35 | } 36 | 37 | elastic ( 38 | w 39 | ) 40 | 41 | padding { 42 | left 1 43 | } 44 | 45 | END designB 46 | 47 | # ------------------------------------------------------- 48 | 49 | parent 132_data/A.cfg 50 | 51 | # ------------------------------------------------------- 52 | 53 | BOX designC 54 | 55 | sample 56 | CCC 57 | CCC foo 58 | CCC 59 | ends 60 | 61 | shapes { 62 | w ("CCC", "CCC", "CCC") 63 | } 64 | 65 | elastic ( 66 | w 67 | ) 68 | 69 | padding { 70 | left 1 71 | } 72 | 73 | END designC 74 | -------------------------------------------------------------------------------- /test/165_design_alias_parent_override.txt: -------------------------------------------------------------------------------- 1 | :DESC 2 | Test that when overriding a design that has alias names, the alias names in the child design do not cause a uniqueness 3 | error, and properly override the parent alias names. 4 | 5 | :ARGS 6 | -f 165_design_alias_parent_override.cfg -d designA -l 7 | :INPUT 8 | :OUTPUT-FILTER 9 | :EXPECTED 10 | Complete Design Information for "designA": 11 | ------------------------------------------ 12 | Alias Names: alias1, alias3 13 | Author: (unknown author) 14 | Original Designer: (unknown artist) 15 | Configuration File: 165_design_alias_parent_override.cfg 16 | Indentation Mode: box (indent box) 17 | Replacement Rules: none 18 | Reversion Rules: none 19 | Minimum Box Dimensions: 4 x 3 (width x height) 20 | Default Padding: none 21 | Default Killblank: no 22 | Tags: none 23 | Elastic Shapes: N, E, S, W 24 | Defined Shapes: W: "Ab" 25 | :EOF 26 | -------------------------------------------------------------------------------- /test/sunny-day/nuke.mend.txt: -------------------------------------------------------------------------------- 1 | _ ._ _ , _ ._ 2 | (_ ' ( ` )_ .__) 3 | ( ( ( ) `) ) _) 4 | (__ (_ (_ . _) _) ,__) 5 | `~~`\ ' . /`~~` 6 | ,::: ; ; :::, 7 | ':::::::::::::::' 8 | _______________________jgs______/_ __ \_______________________________ 9 | | | 10 | | (includes some Unicode characters) | 11 | | Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, | 12 | | sed diam nonumy éirmod tempor invidunt ut labore | 13 | | __ET__ dolore magna aliquyam erat, sed diam voluptua. | 14 | | At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. | 15 | |______________________________________________________________________| 16 | -------------------------------------------------------------------------------- /test/sunny-day/santa.create.txt: -------------------------------------------------------------------------------- 1 | .-"``"-. 2 | /______; \ 3 | {_______}\| 4 | (/ a a \)(_) 5 | (.-.).-.) 6 | __________________ooo__( ^ )______________________ 7 | / '-.___.-' \ 8 | | (includes some Unicode characters) | 9 | | Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, | 10 | | sed diam nonumy éirmod tempor invidunt ut labore | 11 | | et dolore magna aliquyam erat, sed diam voluptua. | 12 | | At vero eos et accusam et justo duo dolores et ea rebum. | 13 | \___________________________________ooo__________________/ 14 | |_ | _| jgs 15 | \___|___/ 16 | {___|___} 17 | |_ | _| 18 | /-'Y'-\ 19 | (__/ \__) 20 | -------------------------------------------------------------------------------- /test/sunny-day/stark2.mend.txt: -------------------------------------------------------------------------------- 1 | .:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@-:. 2 | .:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@-:. 3 | .:-@ @-:. 4 | .:-@ (includes some Unicode characters) @-:. 5 | .:-@ Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, @-:. 6 | .:-@ sed diam nonumy éirmod tempor invidunt ut labore @-:. 7 | .:-@ __ET__ dolore magna aliquyam erat, sed diam voluptua. @-:. 8 | .:-@ At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. @-:. 9 | .:-@ @-:. 10 | .:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@-:. jgs 11 | .:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@.:-@-:. 12 | -------------------------------------------------------------------------------- /test/sunny-day/capgirl.create.txt: -------------------------------------------------------------------------------- 1 | .-"```"-. 2 | /_______; \ 3 | (_________)\| 4 | / / a a \ \(_) 5 | / ( \___/ ) \ 6 | ___________________ooo\__\_____/__/_____________________ 7 | / \ 8 | | (includes some Unicode characters) | 9 | | Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, | 10 | | sed diam nonumy éirmod tempor invidunt ut labore | 11 | | et dolore magna aliquyam erat, sed diam voluptua. | 12 | | At vero eos et accusam et justo duo dolores et ea rebum. | 13 | \__________________________________ooo___________________/ 14 | / \ 15 | /:.:.:.:.:.:.:\ 16 | | | | 17 | \==|==/ jgs 18 | /-'Y'-\ 19 | (__/ \__) 20 | -------------------------------------------------------------------------------- /test/sunny-day/cat.create.txt: -------------------------------------------------------------------------------- 1 | /\ /\ 2 | |`\\_,--="=--,_//`| 3 | \ ." :'. .': ". / 4 | ==) _ : ' : _ (== 5 | |>/O\ _ /O\<| 6 | | \-"~` _ `~"-/ | jgs 7 | >|`===. \_/ .===`|< 8 | .-"-. \===' | '===/ .-"-. 9 | .--------------{'. '`}---\, .-'-. ,/---{.'. '}-------------. 10 | ) `"---"` `~-===-~` `"---"` ( 11 | ( (includes some Unicode characters) ) 12 | ) Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, ( 13 | ( sed diam nonumy éirmod tempor invidunt ut labore ) 14 | ) et dolore magna aliquyam erat, sed diam voluptua. ( 15 | ( At vero eos et accusam et justo duo dolores et ea rebum. ) 16 | ) ( 17 | '------------------------------------------------------------' 18 | -------------------------------------------------------------------------------- /test/sunny-day/xes.mend.txt: -------------------------------------------------------------------------------- 1 | <\/><\/><\/><\/><\/><\/><\/><\/><\/><\/><\/><\/><\/><\/><\/><\/> 2 | <\/><\/> 3 | 4 | <\/> (includes some Unicode characters) <\/> 5 | Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, 6 | <\/> sed diam nonumy éirmod tempor invidunt ut labore <\/> 7 | __ET__ dolore magna aliquyam erat, sed diam voluptua. 8 | <\/> At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. <\/> 9 | 10 | <\/> <\/> 11 | <\/><\/><\/><\/><\/><\/><\/><\/><\/><\/><\/><\/><\/><\/><\/><\/> 12 | jgs 13 | -------------------------------------------------------------------------------- /test/060_size_1_extra_line.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -d diamonds -s 40x17 3 | :INPUT 4 | aaa 5 | bbbb 6 | ccccc 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /\ /\ /\ 10 | /\//\\/\ /\//\\/\ /\//\\/\ 11 | /\//\\\///\\/\//\\\///\\/\//\\\///\\/\ 12 | //\\\//\/\\///\\\//\/\\///\\\//\/\\///\\ 13 | \\//\/aaa \/\\// 14 | \/ bbbb \/ 15 | /\ ccccc /\ 16 | //\\ //\\ 17 | \\// \\// 18 | \/ \/ 19 | /\ /\ 20 | //\\ //\\ 21 | \\// \\// 22 | \/ \/ 23 | /\ /\ 24 | //\\/\ /\//\\ 25 | \\///\\/\//\\\///\\/\//\\\///\\/\//\\\// 26 | \/\\///\\\//\/\\///\\\//\/\\///\\\//\/ 27 | \/\\//\/ \/\\//\/ \/\\//\/ 28 | \/ \/ jgs \/ 29 | :EOF 30 | -------------------------------------------------------------------------------- /test/sunny-day/important2.mend.txt: -------------------------------------------------------------------------------- 1 | /\ /\ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! /\ /\ 2 | |! ||! |!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!|! ||! | 3 | |! ||! | |! ||! | 4 | |! ||! | (includes some Unicode characters) |! ||! | 5 | |! ||! | Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, |! ||! | 6 | |! ||! | sed diam nonumy éirmod tempor invidunt ut labore |! ||! | 7 | |! ||! | __ET__ dolore magna aliquyam erat, sed diam voluptua. |! ||! | 8 | |! ||! | At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. |! ||! | 9 | |! ||! | |! ||! | 10 | |__||__|!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!|__||__| 11 | (__)(__)!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!(__)(__) 12 | -------------------------------------------------------------------------------- /test/sunny-day/scroll.mend.txt: -------------------------------------------------------------------------------- 1 | / ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \ 2 | | /~~\ /~~\ | 3 | |\ \ | (includes some Unicode characters) | / /| 4 | | \ /| Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, |\ / | 5 | | ~~ | sed diam nonumy éirmod tempor invidunt ut labore | ~~ | 6 | | | __ET__ dolore magna aliquyam erat, sed diam voluptua. | | 7 | | | At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. | | 8 | | | | | 9 | \ |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| / 10 | \ / \ / 11 | ~~~ ~~~ 12 | -------------------------------------------------------------------------------- /test/083_list_design_info.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -l -d c 3 | :INPUT 4 | :OUTPUT-FILTER 5 | :EXPECTED 6 | Complete Design Information for "c": 7 | ------------------------------------ 8 | Alias Names: none 9 | Author: Thomas Jensen 10 | Original Designer: (public domain) 11 | Configuration File: ../boxes-config 12 | Indentation Mode: box (indent box) 13 | Replacement Rules: 1. (glob) "\*/" WITH "*\\/" 14 | Reversion Rules: 1. (glob) "\*\\/" TO "*/" 15 | Minimum Box Dimensions: 5 x 3 (width x height) 16 | Default Padding: left 1, right 1 17 | Default Killblank: yes 18 | Tags: simple, programming, box 19 | Elastic Shapes: N, E, S, W 20 | Defined Shapes: NW: "/*" 21 | N: "*" 22 | NE: "*/" 23 | E: "*/" 24 | SE: "*/" 25 | S: "*" 26 | SW: "/*" 27 | W: "/*" 28 | :EOF 29 | -------------------------------------------------------------------------------- /test/sunny-day/headline.mend.txt: -------------------------------------------------------------------------------- 1 | /*********************************************************************************************************************************************/ 2 | /* ( i n c l u d e s s o m e U n i c o d e c h a r a c t e r s ) */ 3 | /* L o r e m i p s u m d o l ö r s i t ä m e t , c o n s e t e t u r s a d i p s c i n g e l i t r , */ 4 | /* s e d d i a m n o n u m y é i r m o d t e m p o r i n v i d u n t u t l a b o r e */ 5 | /* _ _ E T _ _ d o l o r e m a g n a a l i q u y a m e r a t , s e d d i a m v o l u p t u a . */ 6 | /* A t v e r o e o s _ _ E T _ _ a c c u s a m _ _ E T _ _ j u s t o d u o d o l o r e s _ _ E T _ _ e a r e b u m . */ 7 | /*********************************************************************************************************************************************/ 8 | -------------------------------------------------------------------------------- /test/sunny-day/ian_jones.mend.txt: -------------------------------------------------------------------------------- 1 | \\\/// 2 | / _ _ \ 3 | (| (.)(.) |) 4 | .---------------------------.OOOo--()--oOOO.---------------------------. 5 | | | 6 | | (includes some Unicode characters) | 7 | | Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, | 8 | | sed diam nonumy éirmod tempor invidunt ut labore | 9 | | __ET__ dolore magna aliquyam erat, sed diam voluptua. | 10 | | At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. | 11 | | | 12 | '---------------------------.oooO--------------------------------------' 13 | ( ) Oooo. 14 | \ ( ( ) 15 | \_) ) / 16 | (_/ 17 | -------------------------------------------------------------------------------- /test/sunny-day/mouse.mend.txt: -------------------------------------------------------------------------------- 1 | .--, .--, 2 | ( ( \.---./ ) ) 3 | '.__/o o\__.' 4 | {= ^ =} 5 | > - < 6 | ____________________________.""`-------`"".___________________________ 7 | / \ 8 | \ (includes some Unicode characters) / 9 | / Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, \ 10 | \ sed diam nonumy éirmod tempor invidunt ut labore / 11 | / __ET__ dolore magna aliquyam erat, sed diam voluptua. \ 12 | \ At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. / 13 | / \ 14 | \______________________________________________________________________/ 15 | ___)( )(___ jgs 16 | (((__) (__))) 17 | -------------------------------------------------------------------------------- /test/175_utf8_happy_design_info.cfg: -------------------------------------------------------------------------------- 1 | # This config contains UTF-8-encoded elements used correctly, and a simple colored box design. 2 | 3 | BOX designA 4 | 5 | author "沐宸" # in a value 6 | 7 | designer "John Doe" 8 | 9 | 𝕂𝕖𝕪𝕨𝕠𝕣𝕕 "value" # in a keyword 10 | Mix𝕖𝕕 "value" 11 | 12 | sample 13 | ┏━ 沐宸 若汐 ━┓ 14 | ┃ ⧹ 15 | ┃ ╱ 16 | ┗━━━━━━━━━━━━━┛ 17 | ends 18 | 19 | # Monochrome sample (with UTF-8): 20 | # ┏━ 沐宸 若汐 ━┓ 21 | # ┃ ⧹ 22 | # ┃ ╱ 23 | # ┗━━━━━━━━━━━━━┛ 24 | 25 | shapes { 26 | n (" 沐宸 若汐 ") 27 | nw ("┏") 28 | nnw ("━") 29 | nne ("━") 30 | ne ("┓") 31 | e ("┃") 32 | w ("⧹", "╱") 33 | se ("┗") 34 | s ("━") 35 | sw ("┛") 36 | } 37 | 38 | elastic ( 39 | nnw, nne, e, w, s 40 | ) 41 | 42 | padding { 43 | horiz 1 44 | } 45 | 46 | replace "ä" with "ö" 47 | reverse "ö" to "ä" 48 | 49 | END designA 50 | -------------------------------------------------------------------------------- /test/sunny-day/boy.mend.txt: -------------------------------------------------------------------------------- 1 | .-"""-. 2 | / .===. \ 3 | \/ 6 6 \/ 4 | ( \___/ ) 5 | __________________________ooo__\_____/______________________________ 6 | / \ 7 | | (includes some Unicode characters) | 8 | | Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, | 9 | | sed diam nonumy éirmod tempor invidunt ut labore | 10 | | __ET__ dolore magna aliquyam erat, sed diam voluptua. | 11 | | At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. | 12 | \_______________________________________ooo__________________________/ 13 | | | | 14 | |_ | _| 15 | | | | 16 | |__|__| jgs 17 | /-'Y'-\ 18 | (__/ \__) 19 | -------------------------------------------------------------------------------- /test/sunny-day/girl.mend.txt: -------------------------------------------------------------------------------- 1 | .-"""-. 2 | / .===. \ 3 | / / a a \ \ 4 | / ( \___/ ) \ 5 | _________________________ooo\__\_____/__/___________________________ 6 | / \ 7 | | (includes some Unicode characters) | 8 | | Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, | 9 | | sed diam nonumy éirmod tempor invidunt ut labore | 10 | | __ET__ dolore magna aliquyam erat, sed diam voluptua. | 11 | | At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. | 12 | \________________________________________ooo_________________________/ 13 | / \ 14 | /:.:.:.:.:.:.:\ 15 | | | | 16 | \==|==/ jgs 17 | /-'Y'-\ 18 | (__/ \__) 19 | -------------------------------------------------------------------------------- /test/sunny-day/sunset.mend.txt: -------------------------------------------------------------------------------- 1 | . 2 | . | . 3 | \ | / 4 | '. \ ' / .' 5 | '. .'```'. .' 6 | <>..........................:::::::`.......`:::::::.........................<> 7 | <>: :<> 8 | <>: (includes some Unicode characters) :<> 9 | <>: Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, :<> 10 | <>: sed diam nonumy éirmod tempor invidunt ut labore :<> 11 | <>: __ET__ dolore magna aliquyam erat, sed diam voluptua. :<> 12 | <>: At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. :<> 13 | <>: :<> 14 | <>:........................................................................:<> jgs 15 | <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> 16 | -------------------------------------------------------------------------------- /test/sunny-day/dog.mend.txt: -------------------------------------------------------------------------------- 1 | __ _,--="=--,_ __ 2 | / \." .-. "./ \ 3 | / ,/ _ : : _ \/` \ 4 | \ `| /o\ :_: /o\ |\__/ 5 | `-'| :="~` _ `~"=: | 6 | \` (_) `/ jgs 7 | .-"-. \ | / .-"-. 8 | .--------------------{ }--| /,.-'-.,\ |--{ }-------------------. 9 | ) (_)_)_) \_/`~-===-~`\_/ (_(_(_) ( 10 | ( (includes some Unicode characters) ) 11 | ) Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, ( 12 | ( sed diam nonumy éirmod tempor invidunt ut labore ) 13 | ) __ET__ dolore magna aliquyam erat, sed diam voluptua. ( 14 | ( At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. ) 15 | ) ( 16 | '------------------------------------------------------------------------' 17 | -------------------------------------------------------------------------------- /test/150_tag_config_invalid_tags.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -f 150_tag_config_invalid_tags.cfg -l 3 | :INPUT 4 | :OUTPUT-FILTER 5 | :EXPECTED 6 | boxes: 150_tag_config_invalid_tags.cfg: line 32: invalid tag -- Invalid1 7 | boxes: 150_tag_config_invalid_tags.cfg: line 32: invalid tag -- 2invalid 8 | boxes: 150_tag_config_invalid_tags.cfg: line 32: invalid tag -- invalid3- 9 | boxes: 150_tag_config_invalid_tags.cfg: line 32: invalid tag -- -invalid4 10 | boxes: 150_tag_config_invalid_tags.cfg: line 32: invalid tag -- in--valid5 11 | boxes: 150_tag_config_invalid_tags.cfg: line 33: invalid tag -- in space valid6 12 | boxes: 150_tag_config_invalid_tags.cfg: line 59: invalid tag -- in space valid7 13 | 3 Available Styles in "150_tag_config_invalid_tags.cfg": 14 | -------------------------------------------------------- 15 | 16 | designA: 17 | 18 | AAA 19 | AAA foo 20 | AAA 21 | 22 | 23 | designB: 24 | 25 | BBB 26 | BBB foo 27 | BBB 28 | 29 | 30 | designC: 31 | 32 | CCC 33 | CCC foo 34 | CCC 35 | 36 | 37 | tag1 (1) | tag2 (1) | tag3 (1) | tag4 (1) | tag5 (1) | tag6 (1) 38 | :EOF 39 | -------------------------------------------------------------------------------- /test/131_multiple_parent_configs_ref_after_broken.txt: -------------------------------------------------------------------------------- 1 | :DESC 2 | Check that a parent reference works when it is not at the top of a file, but further down. 3 | Also check that a parent reference is not evaluated when encountered inside a BOX definition. 4 | Also check that a valid parent reference is properly found even when the design right before it is broken. (This means 5 | that speedmode is properly terminated.) 6 | 7 | :ARGS 8 | -f 131_data/B.cfg -l 9 | :INPUT 10 | :OUTPUT-FILTER 11 | :EXPECTED 12 | boxes: 131_data/B.cfg: line 32: entries SAMPLE, SHAPES, and ELASTIC are mandatory 13 | boxes: 131_data/B.cfg: line 32: skipping to next design 14 | boxes: 131_data/A.cfg: line 29: syntax error 15 | boxes: 131_data/A.cfg: line 29: skipping to next design 16 | 3 Available Styles: 17 | ------------------- 18 | 19 | Configuration Files: 20 | - 131_data/B.cfg 21 | - 131_data/A.cfg (parent) 22 | 23 | 24 | designA: 25 | 26 | A from config file B 27 | parent 131_data/C.cfg 28 | 29 | 30 | designB: 31 | 32 | B from config file A 33 | 34 | 35 | designC: 36 | 37 | C from config file B 38 | 39 | 40 | :EOF 41 | -------------------------------------------------------------------------------- /test/177_utf8_generate_box.cfg: -------------------------------------------------------------------------------- 1 | # This config contains UTF-8-encoded elements used correctly, and a simple colored box design. 2 | 3 | BOX designA 4 | 5 | sample 6 | ┏━┳━ 沐宸 若汐 ━┓ 7 | ┃ ┃ ┋ 8 | ┃ ┃ ┃ 9 | ┃ ┃ ┋ 10 | ┣━╋━━━━━━━━━━━━━┫ 11 | ┗━┻━━━━━━━━━━━━━┛ 12 | ends 13 | 14 | # Monochrome sample (with UTF-8): 15 | # ┏━┳━ 沐宸 若汐 ━┓ 16 | # ┃ ┃ ┋ 17 | # ┃ ┃ ┃ 18 | # ┃ ┃ ┋ 19 | # ┣━╋━━━━━━━━━━━━━┫ 20 | # ┗━┻━━━━━━━━━━━━━┛ 21 | 22 | shapes { 23 | n (" 沐宸 若汐 ", 24 | " ") 25 | nw ("┏━┳", "┃ ┃") 26 | nnw ("━", " ") 27 | nne ("━", " ") 28 | ne ("┓", "┋") 29 | e ("┃", "┋") 30 | w ("┃ ┃") 31 | se ("┫", "┛") 32 | s ("━", "━") 33 | sw ("┣━╋", "┗━┻") 34 | } 35 | 36 | elastic ( 37 | nnw, nne, e, w, s 38 | ) 39 | 40 | padding { 41 | horiz 1 42 | } 43 | 44 | replace "ä" with "ö" 45 | reverse "ö" to "ä" 46 | 47 | END designA 48 | -------------------------------------------------------------------------------- /test/sunny-day/unicornsay.create.txt: -------------------------------------------------------------------------------- 1 | ____________________________________________________________ 2 | / \ 3 | | (includes some Unicode characters) | 4 | | Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, | 5 | | sed diam nonumy éirmod tempor invidunt ut labore | 6 | | et dolore magna aliquyam erat, sed diam voluptua. | 7 | | At vero eos et accusam et justo duo dolores et ea rebum. | 8 | \______________________________________________________ __'\ 9 | |/ \\ 10 | \ \\ . 11 | |\\/| 12 | / " '\ 13 | . . . 14 | / ) | 15 | ' _.' | 16 | '-'/ \ 17 | -------------------------------------------------------------------------------- /test/sunny-day/unicornthink.create.txt: -------------------------------------------------------------------------------- 1 | ____________________________________________________________ 2 | / \ 3 | | (includes some Unicode characters) | 4 | | Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, | 5 | | sed diam nonumy éirmod tempor invidunt ut labore | 6 | | et dolore magna aliquyam erat, sed diam voluptua. | 7 | | At vero eos et accusam et justo duo dolores et ea rebum. | 8 | \_________________________________________________________ '\ 9 | () \\ 10 | O \\ . 11 | o |\\/| 12 | / " '\ 13 | . . . 14 | / ) | 15 | ' _.' | 16 | '-'/ \ 17 | -------------------------------------------------------------------------------- /test/137_design_alias_no_accumulation.cfg: -------------------------------------------------------------------------------- 1 | 2 | # The next line contains a syntax error, but it is not noticed in this test case 3 | # because we don't parse the interior of skipped box designs! 4 | BOX design1, alias 1 5 | 6 | sample 7 | X1 your text X1 8 | ends 9 | 10 | shapes { 11 | w ("X1") 12 | e ("X1") 13 | } 14 | 15 | elastic ( 16 | e, w 17 | ) 18 | 19 | padding { 20 | horizontal 1 21 | } 22 | 23 | END design1 24 | 25 | # ------------------------------------------- 26 | 27 | BOX design2, alias2 28 | 29 | sample 30 | X2 your text X2 31 | ends 32 | 33 | shapes { 34 | w ("X2") 35 | e ("X2") 36 | } 37 | 38 | elastic ( 39 | e, w 40 | ) 41 | 42 | padding { 43 | horizontal 1 44 | } 45 | 46 | END design2 47 | 48 | # ------------------------------------------- 49 | 50 | BOX design3, 51 | alias3a, 52 | alias3b # we refer to this design by this alias 53 | 54 | sample 55 | X3 your text X3 56 | ends 57 | 58 | shapes { 59 | w ("X3") 60 | e ("X3") 61 | } 62 | 63 | elastic ( 64 | e, w 65 | ) 66 | 67 | padding { 68 | horizontal 1 69 | } 70 | 71 | END design3 72 | -------------------------------------------------------------------------------- /test/sunny-day/cat.mend.txt: -------------------------------------------------------------------------------- 1 | /\ /\ 2 | |`\\_,--="=--,_//`| 3 | \ ." :'. .': ". / 4 | ==) _ : ' : _ (== 5 | |>/O\ _ /O\<| 6 | | \-"~` _ `~"-/ | jgs 7 | >|`===. \_/ .===`|< 8 | .-"-. \===' | '===/ .-"-. 9 | .--------------------{'. '`}---\, .-'-. ,/---{.'. '}-------------------. 10 | ) `"---"` `~-===-~` `"---"` ( 11 | ( (includes some Unicode characters) ) 12 | ) Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, ( 13 | ( sed diam nonumy éirmod tempor invidunt ut labore ) 14 | ) __ET__ dolore magna aliquyam erat, sed diam voluptua. ( 15 | ( At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. ) 16 | ) ( 17 | '------------------------------------------------------------------------' 18 | -------------------------------------------------------------------------------- /test/sunny-day/santa.mend.txt: -------------------------------------------------------------------------------- 1 | .-"``"-. 2 | /______; \ 3 | {_______}\| 4 | (/ a a \)(_) 5 | (.-.).-.) 6 | ________________________ooo__( ^ )____________________________ 7 | / '-.___.-' \ 8 | | (includes some Unicode characters) | 9 | | Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, | 10 | | sed diam nonumy éirmod tempor invidunt ut labore | 11 | | __ET__ dolore magna aliquyam erat, sed diam voluptua. | 12 | | At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. | 13 | \_________________________________________ooo________________________/ 14 | |_ | _| jgs 15 | \___|___/ 16 | {___|___} 17 | |_ | _| 18 | /-'Y'-\ 19 | (__/ \__) 20 | -------------------------------------------------------------------------------- /test/150_tag_config_invalid_tags.cfg: -------------------------------------------------------------------------------- 1 | BOX designA 2 | 3 | tags ("tag1") 4 | tags ("tag2", "tag3") 5 | tags "tag4 , tag5" 6 | tags "tag6" 7 | 8 | sample 9 | AAA 10 | AAA foo 11 | AAA 12 | ends 13 | 14 | shapes { 15 | w ("AAA", "AAA", "AAA") 16 | } 17 | 18 | elastic ( 19 | w 20 | ) 21 | 22 | padding { 23 | left 1 24 | } 25 | 26 | END designA 27 | 28 | # ------------------------------------------------------- 29 | 30 | BOX designB 31 | 32 | tags "Invalid1, 2invalid, invalid3-, -invalid4, in--valid5" 33 | tags ("in space valid6") 34 | 35 | sample 36 | BBB 37 | BBB foo 38 | BBB 39 | ends 40 | 41 | shapes { 42 | w ("BBB", "BBB", "BBB") 43 | } 44 | 45 | elastic ( 46 | w 47 | ) 48 | 49 | padding { 50 | left 1 51 | } 52 | 53 | END designB 54 | 55 | # ------------------------------------------------------- 56 | 57 | BOX designC 58 | 59 | tags ("in space valid7") 60 | 61 | sample 62 | CCC 63 | CCC foo 64 | CCC 65 | ends 66 | 67 | shapes { 68 | w ("CCC", "CCC", "CCC") 69 | } 70 | 71 | elastic ( 72 | w 73 | ) 74 | 75 | padding { 76 | left 1 77 | } 78 | 79 | END designC 80 | -------------------------------------------------------------------------------- /test/sunny-day/capgirl.mend.txt: -------------------------------------------------------------------------------- 1 | .-"```"-. 2 | /_______; \ 3 | (_________)\| 4 | / / a a \ \(_) 5 | / ( \___/ ) \ 6 | _________________________ooo\__\_____/__/___________________________ 7 | / \ 8 | | (includes some Unicode characters) | 9 | | Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, | 10 | | sed diam nonumy éirmod tempor invidunt ut labore | 11 | | __ET__ dolore magna aliquyam erat, sed diam voluptua. | 12 | | At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. | 13 | \________________________________________ooo_________________________/ 14 | / \ 15 | /:.:.:.:.:.:.:\ 16 | | | | 17 | \==|==/ jgs 18 | /-'Y'-\ 19 | (__/ \__) 20 | -------------------------------------------------------------------------------- /test/sunny-day/important3.create.txt: -------------------------------------------------------------------------------- 1 | /\ /\ /\ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! /\ /\ /\ 2 | |! ||! ||! |!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!|! ||! ||! | 3 | |! ||! ||! |!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!|! ||! ||! | 4 | |! ||! ||! | |! ||! ||! | 5 | |! ||! ||! | (includes some Unicode characters) |! ||! ||! | 6 | |! ||! ||! | Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, |! ||! ||! | 7 | |! ||! ||! | sed diam nonumy éirmod tempor invidunt ut labore |! ||! ||! | 8 | |! ||! ||! | et dolore magna aliquyam erat, sed diam voluptua. |! ||! ||! | 9 | |! ||! ||! | At vero eos et accusam et justo duo dolores et ea rebum. |! ||! ||! | 10 | |! ||! ||! | |! ||! ||! | 11 | |! ||! ||! |!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!|! ||! ||! | 12 | |__||__||__|!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!|__||__||__| 13 | (__)(__)(__)!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!(__)(__)(__) 14 | -------------------------------------------------------------------------------- /test/sunny-day/spring.create.txt: -------------------------------------------------------------------------------- 1 | , 2 | /\^/`\ (includes some Unicode characters) 3 | | \/ | Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, 4 | | | | sed diam nonumy éirmod tempor invidunt ut labore jgs 5 | \ \ / et dolore magna aliquyam erat, sed diam voluptua. _ _ 6 | '\\//' At vero eos et accusam et justo duo dolores et ea rebum. _{ ' }_ 7 | || { `.!.` } 8 | || ',_/Y\_,' 9 | || , {_,_} 10 | |\ || |\ | 11 | | | || | | (\| /) 12 | | | || / / \| // 13 | \ \||/ / |// 14 | `\\//` \ \./ \\ \./ \\ \./ \\ \./ \\ \./ \ \\ |/ / 15 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 16 | -------------------------------------------------------------------------------- /test/106_unicode_align_center.txt: -------------------------------------------------------------------------------- 1 | :DESC 2 | Test center alignment of unicode text without escape sequences mixed in, but with some chars in double-width 3 | (chinese). We always set the charset manually because else the build would fail on systems which have it set wrong. 4 | :ARGS 5 | -n UTF-8 -ac 6 | :INPUT 7 | a 8 | ab 9 | abc 10 | abcd 11 | abcde 12 | abcdef 13 | abcdefg 14 | abcdefgh 15 | 試 16 | 常盤 17 | 運作能 18 | 申見売映 19 | 海棋事行変 20 | ä 21 | äb 22 | äbç 23 | äbçd 24 | äbçdé 25 | äbçdéf 26 | äbçdéfg 27 | äbçdéfgh 28 | :OUTPUT-FILTER 29 | :EXPECTED 30 | /**************/ 31 | /* a */ 32 | /* ab */ 33 | /* abc */ 34 | /* abcd */ 35 | /* abcde */ 36 | /* abcdef */ 37 | /* abcdefg */ 38 | /* abcdefgh */ 39 | /* 試 */ 40 | /* 常盤 */ 41 | /* 運作能 */ 42 | /* 申見売映 */ 43 | /* 海棋事行変 */ 44 | /* ä */ 45 | /* äb */ 46 | /* äbç */ 47 | /* äbçd */ 48 | /* äbçdé */ 49 | /* äbçdéf */ 50 | /* äbçdéfg */ 51 | /* äbçdéfgh */ 52 | /**************/ 53 | :EOF 54 | -------------------------------------------------------------------------------- /test/136_design_alias_by_alias.cfg: -------------------------------------------------------------------------------- 1 | 2 | BOX design1 3 | 4 | sample 5 | X1 your text X1 6 | ends 7 | 8 | shapes { 9 | w ("X1") 10 | e ("X1") 11 | } 12 | 13 | elastic ( 14 | e, w 15 | ) 16 | 17 | padding { 18 | horizontal 1 19 | } 20 | 21 | END design1 22 | 23 | # ------------------------------------------- 24 | 25 | BOX design2, alias2 26 | 27 | sample 28 | X2 your text X2 29 | ends 30 | 31 | shapes { 32 | w ("X2") 33 | e ("X2") 34 | } 35 | 36 | elastic ( 37 | e, w 38 | ) 39 | 40 | padding { 41 | horizontal 1 42 | } 43 | 44 | END design2 45 | 46 | # ------------------------------------------- 47 | 48 | BOX design3, 49 | alias3a, # we refer to this design by this alias 50 | alias3b 51 | 52 | # following sample block is empty 53 | sample test4 54 | ends 55 | 56 | shapes { 57 | e ("1","2","3") 58 | w ("1","2","3","4","5") 59 | 60 | s ("#") n ("#") nw ("#") se ("#") sw ("#") ne ("#") 61 | } 62 | 63 | elastic (n,s,e, w) 64 | 65 | END design3 66 | 67 | # ------------------------------------------- 68 | 69 | BOX design4 70 | 71 | sample 72 | X your text X 73 | ends 74 | 75 | ... and so on, this part is no longer parsed. 76 | -------------------------------------------------------------------------------- /src/generate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * boxes - Command line filter to draw/remove ASCII boxes around text 3 | * Copyright (c) 1999-2024 Thomas Jensen and the boxes contributors 4 | * 5 | * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public 6 | * License, version 3, as published by the Free Software Foundation. 7 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied 8 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 9 | * details. 10 | * You should have received a copy of the GNU General Public License along with this program. 11 | * If not, see . 12 | * 13 | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 14 | */ 15 | 16 | /* 17 | * Box generation, i.e. the drawing of boxes 18 | */ 19 | 20 | #ifndef GENERATE_H 21 | #define GENERATE_H 22 | 23 | 24 | int generate_box(sentry_t *thebox); 25 | 26 | int output_box(const sentry_t *thebox); 27 | 28 | 29 | #endif /*GENERATE_H*/ 30 | 31 | /* vim: set cindent sw=4: */ 32 | -------------------------------------------------------------------------------- /src/discovery.h: -------------------------------------------------------------------------------- 1 | /* 2 | * boxes - Command line filter to draw/remove ASCII boxes around text 3 | * Copyright (c) 1999-2024 Thomas Jensen and the boxes contributors 4 | * 5 | * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public 6 | * License, version 3, as published by the Free Software Foundation. 7 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied 8 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 9 | * details. 10 | * You should have received a copy of the GNU General Public License along with this program. 11 | * If not, see . 12 | * 13 | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 14 | */ 15 | 16 | /* 17 | * Discovery of the configuration file. 18 | */ 19 | 20 | #ifndef BOXES_DISCOVERY_H 21 | #define BOXES_DISCOVERY_H 22 | 23 | #include "bxstring.h" 24 | 25 | 26 | bxstr_t *discover_config_file(const int global_only); 27 | 28 | 29 | #endif /* BOXES_DISCOVERY_H */ 30 | 31 | /* vim: set cindent sw=4: */ 32 | -------------------------------------------------------------------------------- /test/175_utf8_happy_design_info.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -f 175_utf8_happy_design_info.cfg --color -d designA -l 3 | :INPUT 4 | :OUTPUT-FILTER 5 | :EXPECTED 6 | Complete Design Information for "designA": 7 | ------------------------------------------ 8 | Alias Names: none 9 | Author: 沐宸 10 | Original Designer: John Doe 11 | Configuration File: 175_utf8_happy_design_info.cfg 12 | Indentation Mode: box (indent box) 13 | Replacement Rules: 1. (glob) "ä" WITH "ö" 14 | Reversion Rules: 1. (glob) "ö" TO "ä" 15 | Minimum Box Dimensions: 15 x 4 (width x height) 16 | Default Padding: left 1, right 1 17 | Default Killblank: yes 18 | Tags: none 19 | Elastic Shapes: NNW, NNE, E, S, W 20 | Defined Shapes: NW: "┏" 21 | NNW: "━" 22 | N: " 沐宸 若汐 " 23 | NNE: "━" 24 | NE: "┓" 25 | E: "┃" 26 | SE: "┗" 27 | S: "━" 28 | SW: "┛" 29 | W: "⧹", 30 | "╱" 31 | :EOF 32 | -------------------------------------------------------------------------------- /test/061_size_1_extra_line_and_1_extra_column.txt: -------------------------------------------------------------------------------- 1 | :ARGS 2 | -d diamonds -s 41x17 3 | :INPUT 4 | aaa 5 | bbbb 6 | ccccc 7 | :OUTPUT-FILTER 8 | :EXPECTED 9 | /\ /\ /\ /\ 10 | /\//\\/\ /\//\\/\ /\//\\/\ /\//\\/\ 11 | /\//\\\///\\/\//\\\///\\/\//\\\///\\/\//\\\///\\/\ 12 | //\\\//\/\\///\\\//\/\\///\\\//\/\\///\\\//\/\\///\\ 13 | \\//\/aaa \/\\// 14 | \/ bbbb \/ 15 | /\ ccccc /\ 16 | //\\ //\\ 17 | \\// \\// 18 | \/ \/ 19 | /\ /\ 20 | //\\ //\\ 21 | \\// \\// 22 | \/ \/ 23 | /\ /\ 24 | //\\/\ /\//\\ 25 | \\///\\/\//\\\///\\/\//\\\///\\/\//\\\///\\/\//\\\// 26 | \/\\///\\\//\/\\///\\\//\/\\///\\\//\/\\///\\\//\/ 27 | \/\\//\/ \/\\//\/ \/\\//\/ \/\\//\/ 28 | \/ \/ \/ jgs \/ 29 | :EOF 30 | -------------------------------------------------------------------------------- /test/sunny-day/diamonds.create.txt: -------------------------------------------------------------------------------- 1 | /\ /\ /\ /\ /\ /\ 2 | /\//\\/\ /\//\\/\ /\//\\/\ /\//\\/\ /\//\\/\ /\//\\/\ 3 | /\//\\\///\\/\//\\\///\\/\//\\\///\\/\//\\\///\\/\//\\\///\\/\//\\\///\\/\ 4 | //\\\//\/\\///\\\//\/\\///\\\//\/\\///\\\//\/\\///\\\//\/\\///\\\//\/\\///\\ 5 | \\//\/(includes some Unicode characters) \/\\// 6 | \/ Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, \/ 7 | /\ sed diam nonumy éirmod tempor invidunt ut labore /\ 8 | //\\ et dolore magna aliquyam erat, sed diam voluptua. //\\ 9 | \\// At vero eos et accusam et justo duo dolores et ea rebum. \\// 10 | \/ \/ 11 | /\ /\ 12 | //\\/\ /\//\\ 13 | \\///\\/\//\\\///\\/\//\\\///\\/\//\\\///\\/\//\\\///\\/\//\\\///\\/\//\\\// 14 | \/\\///\\\//\/\\///\\\//\/\\///\\\//\/\\///\\\//\/\\///\\\//\/\\///\\\//\/ 15 | \/\\//\/ \/\\//\/ \/\\//\/ \/\\//\/ \/\\//\/ \/\\//\/ 16 | \/ \/ \/ \/ \/ jgs \/ 17 | -------------------------------------------------------------------------------- /test/sunny-day/spring.mend.txt: -------------------------------------------------------------------------------- 1 | , 2 | /\^/`\ (includes some Unicode characters) 3 | | \/ | Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, 4 | | | | sed diam nonumy éirmod tempor invidunt ut labore jgs 5 | \ \ / __ET__ dolore magna aliquyam erat, sed diam voluptua. _ _ 6 | '\\//' At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. _{ ' }_ 7 | || { `.!.` } 8 | || ',_/Y\_,' 9 | || , {_,_} 10 | |\ || |\ | 11 | | | || | | (\| /) 12 | | | || / / \| // 13 | \ \||/ / |// 14 | `\\//` \ \./ \\ \./ \\ \./ \\ \./ \\ \./ \\ \./ \ \\ |/ / 15 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 16 | -------------------------------------------------------------------------------- /test/sunny-day/important3.mend.txt: -------------------------------------------------------------------------------- 1 | /\ /\ /\ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! /\ /\ /\ 2 | |! ||! ||! |!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!|! ||! ||! | 3 | |! ||! ||! |!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!|! ||! ||! | 4 | |! ||! ||! | |! ||! ||! | 5 | |! ||! ||! | (includes some Unicode characters) |! ||! ||! | 6 | |! ||! ||! | Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, |! ||! ||! | 7 | |! ||! ||! | sed diam nonumy éirmod tempor invidunt ut labore |! ||! ||! | 8 | |! ||! ||! | __ET__ dolore magna aliquyam erat, sed diam voluptua. |! ||! ||! | 9 | |! ||! ||! | At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. |! ||! ||! | 10 | |! ||! ||! | |! ||! ||! | 11 | |! ||! ||! |!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!|! ||! ||! | 12 | |__||__||__|!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!|__||__||__| 13 | (__)(__)(__)!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!(__)(__)(__) 14 | -------------------------------------------------------------------------------- /test/sunny-day/unicornsay.mend.txt: -------------------------------------------------------------------------------- 1 | ________________________________________________________________________ 2 | / \ 3 | | (includes some Unicode characters) | 4 | | Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, | 5 | | sed diam nonumy éirmod tempor invidunt ut labore | 6 | | __ET__ dolore magna aliquyam erat, sed diam voluptua. | 7 | | At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. | 8 | \__________________________________________________________________ __'\ 9 | |/ \\ 10 | \ \\ . 11 | |\\/| 12 | / " '\ 13 | . . . 14 | / ) | 15 | ' _.' | 16 | '-'/ \ 17 | -------------------------------------------------------------------------------- /test/sunny-day/unicornthink.mend.txt: -------------------------------------------------------------------------------- 1 | ________________________________________________________________________ 2 | / \ 3 | | (includes some Unicode characters) | 4 | | Lorem ipsum dolör sit ämet, consetetur sadipscing elitr, | 5 | | sed diam nonumy éirmod tempor invidunt ut labore | 6 | | __ET__ dolore magna aliquyam erat, sed diam voluptua. | 7 | | At vero eos __ET__ accusam __ET__ justo duo dolores __ET__ ea rebum. | 8 | \_____________________________________________________________________ '\ 9 | () \\ 10 | O \\ . 11 | o |\\/| 12 | / " '\ 13 | . . . 14 | / ) | 15 | ' _.' | 16 | '-'/ \ 17 | -------------------------------------------------------------------------------- /utest/global_mock.h: -------------------------------------------------------------------------------- 1 | /* 2 | * boxes - Command line filter to draw/remove ASCII boxes around text 3 | * Copyright (c) 1999-2024 Thomas Jensen and the boxes contributors 4 | * 5 | * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public 6 | * License, version 3, as published by the Free Software Foundation. 7 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied 8 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 9 | * details. 10 | * You should have received a copy of the GNU General Public License along with this program. 11 | * If not, see . 12 | * 13 | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 14 | */ 15 | 16 | /* 17 | * Test fixtures and mocks of global shared state. 18 | */ 19 | 20 | #ifndef GLOBAL_MOCK_H 21 | #define GLOBAL_MOCK_H 22 | 23 | 24 | extern char **collect_out; 25 | extern int collect_out_size; 26 | 27 | extern char **collect_err; 28 | extern int collect_err_size; 29 | 30 | void collect_reset(); 31 | 32 | 33 | void setup_mocks(); 34 | void teardown(); 35 | 36 | 37 | #endif 38 | 39 | /* vim: set cindent sw=4: */ 40 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # 2 | # boxes - Command line filter to draw/remove ASCII boxes around text 3 | # Copyright (c) 1999-2024 Thomas Jensen and the boxes contributors 4 | # 5 | # This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public 6 | # License, version 3, as published by the Free Software Foundation. 7 | # This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied 8 | # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 9 | # details. 10 | # You should have received a copy of the GNU General Public License along with this program. 11 | # If not, see . 12 | #____________________________________________________________________________________________________________________ 13 | #==================================================================================================================== 14 | 15 | * text=auto 16 | 17 | # shell scripts 18 | *.sh text eol=lf 19 | 20 | # Windows files 21 | *.bat text eol=crlf 22 | tools/VERIFICATION.txt text eol=crlf 23 | 24 | # the test cases 25 | /test/*.txt text eol=lf 26 | 27 | # some files which are currently in ISO-8859-15 encoding 28 | /test/111_manual_encoding_iso.txt text working-tree-encoding=ISO_8859-15 29 | -------------------------------------------------------------------------------- /README.Win32.md: -------------------------------------------------------------------------------- 1 | # boxes Win32 port Information 2 | 3 | **Date:** 16-Mar-2017 4 | 5 | This is the Win32 Version of boxes, built from the official source tarball. 6 | Many thanks to **Ron Aaron** for making this Windows build possible! 7 | 8 | General information may be found in the generic README file provided with 9 | this archive and at https://boxes.thomasjensen.com/, the boxes home page. 10 | Note that the generic README file is intended for UNIX users, so some 11 | things don't translate literally (e.g., you would have to type Ctrl-Z 12 | instead of Ctrl-D to signal end of file, etc.). 13 | 14 | The system-wide config file is assumed to reside in the same directory as 15 | the boxes executable. (This is the case when you unpack the archive.) The 16 | name of the config file is assumed to be the same as the name of the 17 | executable, only with a `.cfg` extension instead of `.exe`. As with the UNIX 18 | version, boxes still looks for a file called *boxes.cfg* in the directory 19 | pointed to by the environment variable `HOME`, and for a file pointed to by 20 | the environment variable `BOXES`. 21 | 22 | The standard troff format manual page is part of the package (boxes.1), 23 | but knowing that in the Windows world there may be some people who don't 24 | have troff installed on their systems, an HTML version of the page is 25 | provided. 26 | 27 | 28 | EOT 29 | -------------------------------------------------------------------------------- /utest/regulex_test.h: -------------------------------------------------------------------------------- 1 | /* 2 | * boxes - Command line filter to draw/remove ASCII boxes around text 3 | * Copyright (c) 1999-2024 Thomas Jensen and the boxes contributors 4 | * 5 | * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public 6 | * License, version 3, as published by the Free Software Foundation. 7 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied 8 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 9 | * details. 10 | * You should have received a copy of the GNU General Public License along with this program. 11 | * If not, see . 12 | * 13 | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 14 | */ 15 | 16 | /* 17 | * Unit tests of the 'regulex' module 18 | */ 19 | 20 | #ifndef REGULEX_TEST_H 21 | #define REGULEX_TEST_H 22 | 23 | 24 | void test_compile_pattern_empty(void **state); 25 | void test_compile_pattern_error(void **state); 26 | 27 | void test_regex_replace_invalid_utf(void **state); 28 | void test_regex_replace_buffer_resize(void **state); 29 | void test_regex_replace_error(void **state); 30 | 31 | 32 | #endif 33 | 34 | 35 | /* vim: set cindent sw=4: */ 36 | --------------------------------------------------------------------------------