From 8d603a5d369178a04e099acd93de450ff351022d Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sat, 1 Jun 2019 21:53:04 +0300 Subject: Add: prototype code generator, with echo example --- echo.json | 299 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 299 insertions(+) create mode 100644 echo.json (limited to 'echo.json') diff --git a/echo.json b/echo.json new file mode 100644 index 0000000..c751ea7 --- /dev/null +++ b/echo.json @@ -0,0 +1,299 @@ +[ + { + "last_line_blank": false, + "start_column": 1, + "tight": false, + "end_line": 23, + "t": "Document", + "start_line": 1, + "open": false, + "children": [ + { + "last_line_blank": false, + "tight": false, + "end_line": 1, + "t": "HorizontalRule", + "start_line": 1, + "open": false, + "start_column": 1 + }, + { + "inline_content": [ + { + "tight": false, + "c": "title: \"", + "open": true, + "t": "Str", + "last_line_blank": false + }, + { + "tight": false, + "c": [ + { + "tight": false, + "c": "echo", + "open": true, + "t": "Str", + "last_line_blank": false + } + ], + "open": true, + "t": "Strong", + "last_line_blank": false + }, + { + "tight": false, + "c": "(1) acceptance tests\"", + "open": true, + "t": "Str", + "last_line_blank": false + }, + { + "tight": false, + "open": true, + "t": "Softbreak", + "last_line_blank": false + }, + { + "tight": false, + "c": "author: Lars Wirzenius / The Fable project", + "open": true, + "t": "Str", + "last_line_blank": false + }, + { + "tight": false, + "open": true, + "t": "Softbreak", + "last_line_blank": false + }, + { + "tight": false, + "c": "...", + "open": true, + "t": "Str", + "last_line_blank": false + } + ], + "last_line_blank": true, + "start_column": 1, + "tight": false, + "end_line": 4, + "t": "Paragraph", + "start_line": 2, + "open": false, + "strings": [ + "title: \"**echo**(1) acceptance tests\"", + "author: Lars Wirzenius / The Fable project", + "..." + ] + }, + { + "inline_content": [ + { + "tight": false, + "c": "Introduction", + "open": true, + "t": "Str", + "last_line_blank": false + } + ], + "level": 1, + "last_line_blank": true, + "start_column": 1, + "tight": false, + "end_line": 7, + "t": "SetextHeader", + "start_line": 6, + "open": false, + "strings": [ + "Introduction" + ] + }, + { + "inline_content": [ + { + "tight": false, + "c": [ + { + "tight": false, + "c": "echo", + "open": true, + "t": "Str", + "last_line_blank": false + } + ], + "open": true, + "t": "Strong", + "last_line_blank": false + }, + { + "tight": false, + "c": "(1) is a Unix command line tool, which writes its command line", + "open": true, + "t": "Str", + "last_line_blank": false + }, + { + "tight": false, + "open": true, + "t": "Softbreak", + "last_line_blank": false + }, + { + "tight": false, + "c": "arguments to the standard output. This is a simple acceptance test", + "open": true, + "t": "Str", + "last_line_blank": false + }, + { + "tight": false, + "open": true, + "t": "Softbreak", + "last_line_blank": false + }, + { + "tight": false, + "c": "suite for the ", + "open": true, + "t": "Str", + "last_line_blank": false + }, + { + "tight": false, + "c": "/bin/echo", + "open": true, + "t": "Code", + "last_line_blank": false + }, + { + "tight": false, + "c": " implementation.", + "open": true, + "t": "Str", + "last_line_blank": false + } + ], + "last_line_blank": true, + "start_column": 1, + "tight": false, + "end_line": 11, + "t": "Paragraph", + "start_line": 9, + "open": false, + "strings": [ + "**echo**(1) is a Unix command line tool, which writes its command line", + "arguments to the standard output. This is a simple acceptance test", + "suite for the `/bin/echo` implementation." + ] + }, + { + "inline_content": [ + { + "tight": false, + "c": "No arguments", + "open": true, + "t": "Str", + "last_line_blank": false + } + ], + "level": 1, + "last_line_blank": true, + "start_column": 1, + "tight": false, + "end_line": 14, + "t": "SetextHeader", + "start_line": 13, + "open": false, + "strings": [ + "No arguments" + ] + }, + { + "inline_content": [ + { + "tight": false, + "c": "This scenario runs ", + "open": true, + "t": "Str", + "last_line_blank": false + }, + { + "tight": false, + "c": "/bin/echo", + "open": true, + "t": "Code", + "last_line_blank": false + }, + { + "tight": false, + "c": " without arguments and checks that it", + "open": true, + "t": "Str", + "last_line_blank": false + }, + { + "tight": false, + "open": true, + "t": "Softbreak", + "last_line_blank": false + }, + { + "tight": false, + "c": "outputs a single newline character to the standard output, nothing to", + "open": true, + "t": "Str", + "last_line_blank": false + }, + { + "tight": false, + "open": true, + "t": "Softbreak", + "last_line_blank": false + }, + { + "tight": false, + "c": "the standard error, and exits with a zero exit code.", + "open": true, + "t": "Str", + "last_line_blank": false + } + ], + "last_line_blank": true, + "start_column": 1, + "tight": false, + "end_line": 18, + "t": "Paragraph", + "start_line": 16, + "open": false, + "strings": [ + "This scenario runs `/bin/echo` without arguments and checks that it", + "outputs a single newline character to the standard output, nothing to", + "the standard error, and exits with a zero exit code." + ] + }, + { + "info": "fable", + "string_content": "when user runs echo without arguments\nthen exit code is 0\nand standard output contains a newline\nand standard error is empty\n", + "fence_offset": 0, + "last_line_blank": false, + "strings": [ + "fable", + "when user runs echo without arguments", + "then exit code is 0", + "and standard output contains a newline", + "and standard error is empty" + ], + "tight": false, + "end_line": 24, + "t": "FencedCode", + "fence_char": "`", + "start_line": 20, + "open": false, + "start_column": 1, + "fence_length": 3 + } + ] + } +] -- cgit v1.2.1