diff --git a/.gitignore b/.gitignore index 5d7900cc..a41acfcf 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ test_install_monolithic .coverage* *.lobster *.html +.idea diff --git a/lobster/tools/json/input_files.trlc b/lobster/tools/json/input_files.trlc new file mode 100644 index 00000000..e22775da --- /dev/null +++ b/lobster/tools/json/input_files.trlc @@ -0,0 +1,47 @@ +package json_req +import req + +req.System_Requirement Parse_Input_File { + description = ''' + IF a list element given through the command line option "FILE_OR_DIR" is not a file nor a directory, + THEN the tool shall exit with a non-zero return code. + ''' +} + +req.System_Requirement_Aspect Parse_Input_File_JSON_Extension { + description = ''' + OTHERWISE, + if the file extension is not "json" (case-insensitive), + THEN the tool shall print a warning. + Note - The file still will be parsed. + ''' +} + +req.System_Requirement_Aspect Parse_Input_File_Valid_JSON { + description = ''' + OTHERWISE, + if the file content is invalid JSON, + THEN the tool shall exit with a non-zero return code. + ''' +} + +req.System_Requirement_Aspect Parse_Input_File_Input_Items { + description = ''' + OTHERWISE the input data + SHALL be written in the LOBSTER interchange format + ''' + // TODO: This requirement needs more details. +} + +req.System_Requirement_Aspect Parse_Input_File_To_Stdout { + description = ''' + to the file given in the command line option "out", + IF that option is given and is not an empty string, + ''' +} + +req.System_Requirement_Aspect Parse_Input_File_To_File { + description = ''' + OTHERWISE to STDOUT. + ''' +} diff --git a/lobster/tools/json/software_requirements.trlc b/lobster/tools/json/software_requirements.trlc deleted file mode 100644 index 89140cb7..00000000 --- a/lobster/tools/json/software_requirements.trlc +++ /dev/null @@ -1,22 +0,0 @@ -package json_req -import req - -req.Software_Requirement Synthetic_Tag_Name { - description = ''' - If the command line option --name-attribute is not given, then the tool shall create - a synthetic tag name based on the path of the JSON input file and an item counter. - - Notes: - - "Synthetic" means that, the name does not need to be related to the data. - - The item counter does not need to be unique across files. - But it shall be unique at least for each input file separately. - ''' -} - -req.Software_Requirement Name_Attribute { - description = ''' - If the command line option --name-attribute is given, then the tool shall - - use the value of the command line argument as JSON key of the JSON item - - and use that obtained value as LOBSTER item tag name. - ''' -} diff --git a/lobster/tools/json/synthetic_name.trlc b/lobster/tools/json/synthetic_name.trlc new file mode 100644 index 00000000..329b23ab --- /dev/null +++ b/lobster/tools/json/synthetic_name.trlc @@ -0,0 +1,25 @@ +package json_req +import req + +req.System_Requirement Name_Attribute_Given { + description = ''' + In addition to [[Parse_Input_File]], + IF the command line option "name-attribute" is given and not an empty string, + THEN the tool + SHALL obtain the value from the input item at that key, + and use the obtained value as tag in the serialized LOBSTER item. + ''' +} + +req.System_Requirement_Aspect Name_Attribute_Missing { + description = ''' + OTHERWISE, the tool + SHALL create a synthetic tag name based on the path of the JSON input file and an item counter. + + Notes: + - "Synthetic" means that, the name does not need to be related to the data. + - The item counter does not need to be unique across input files, + but it shall be unique at least for each input file separately. + - No further specification is made about how to combine the path and the item counter. + ''' +} diff --git a/lobster/tools/json/system_requirements.trlc b/lobster/tools/json/system_requirements.trlc deleted file mode 100644 index 751aff64..00000000 --- a/lobster/tools/json/system_requirements.trlc +++ /dev/null @@ -1,40 +0,0 @@ -package json_req -import req - -req.Definition JSON_Input_File { - description = ''' - Each file with the file name extension json is a valid input file. - ''' -} - -req.Definition File_Scanning { - description = ''' - The term "scanning an input file" means that the tool - 1. searches for JSON elements in it according to the configuration provided by - the user, - 2. and serializes these elements in LOBSTER interchange format to the desired - output. - - Note: - It is possible to write a system test to verify that the tool is scanning a file - in the following way: - 1. Define a set of valid input files containing valid elements. - 2. Run the tool. - 3. Verify that the resulting output contains (exactly) all of the input elements. - ''' -} - -req.Definition Directory_Scanning { - description = ''' - The term "scanning a directory" means that the tool scans each file inside that directory - according to [[File_Scanning]], if it is a JSON file according to [[JSON_Input_File]]. - ''' -} - -req.System_Requirement Directory_Input { - description = ''' - If a list element given through the command line option FILE_OR_DIR is a directory, - then that directory and recursively all subdirectories shall be scanned - according to [[Directory_Scanning]]. - ''' -} diff --git a/lobster/tools/lobster-trlc.conf b/lobster/tools/lobster-trlc.conf index e4fb8f0a..64ef7af4 100644 --- a/lobster/tools/lobster-trlc.conf +++ b/lobster/tools/lobster-trlc.conf @@ -1,3 +1,7 @@ req.System_Requirement { description = description } + +req.System_Requirement_Aspect { + description = description +} diff --git a/lobster/tools/requirements.rsl b/lobster/tools/requirements.rsl index 876d3a19..6d10e093 100644 --- a/lobster/tools/requirements.rsl +++ b/lobster/tools/requirements.rsl @@ -8,6 +8,19 @@ type System_Requirement { ''' String } +type System_Requirement_Aspect extends System_Requirement { + /* This type describes an aspect of a system requirement. + The aspect itself is not testable. It is only testable in the context of a requirement. + For example, an aspect may give details about a certain input, but it does not describe + the related output. + Nevertheless, system tests shall be linked to aspects, and each aspect shall be covered + by system tests. These tests must always take the requirement into account, which uses + the aspect. + Using this type helps to make long requirements easier to read, and it is easier to + develop tests for them. + */ +} + type Software_Requirement { description ''' The content of the requirement. diff --git a/tests-system/.gitignore b/tests-system/.gitignore index 150c7fab..a1f45fa5 100644 --- a/tests-system/.gitignore +++ b/tests-system/.gitignore @@ -1,2 +1 @@ -!**/expected-output/* -!**/input/* +!**/expected-output/* \ No newline at end of file diff --git a/tests-system/lobster-json/rbt-synthetic-tag-name/README.md b/tests-system/lobster-json/rbt-name-attribute-missing/README.md similarity index 100% rename from tests-system/lobster-json/rbt-synthetic-tag-name/README.md rename to tests-system/lobster-json/rbt-name-attribute-missing/README.md diff --git a/tests-system/lobster-json/rbt-synthetic-tag-name/flat-input-structure/expected-output/exit-code.txt b/tests-system/lobster-json/rbt-name-attribute-missing/flat-input-structure/expected-output/exit-code.txt similarity index 100% rename from tests-system/lobster-json/rbt-synthetic-tag-name/flat-input-structure/expected-output/exit-code.txt rename to tests-system/lobster-json/rbt-name-attribute-missing/flat-input-structure/expected-output/exit-code.txt diff --git a/tests-system/lobster-json/rbt-synthetic-tag-name/flat-input-structure/expected-output/output.lobster b/tests-system/lobster-json/rbt-name-attribute-missing/flat-input-structure/expected-output/output.lobster similarity index 100% rename from tests-system/lobster-json/rbt-synthetic-tag-name/flat-input-structure/expected-output/output.lobster rename to tests-system/lobster-json/rbt-name-attribute-missing/flat-input-structure/expected-output/output.lobster diff --git a/tests-system/lobster-json/rbt-synthetic-tag-name/flat-input-structure/expected-output/stderr.txt b/tests-system/lobster-json/rbt-name-attribute-missing/flat-input-structure/expected-output/stderr.txt similarity index 100% rename from tests-system/lobster-json/rbt-synthetic-tag-name/flat-input-structure/expected-output/stderr.txt rename to tests-system/lobster-json/rbt-name-attribute-missing/flat-input-structure/expected-output/stderr.txt diff --git a/tests-system/lobster-json/rbt-synthetic-tag-name/flat-input-structure/expected-output/stdout.txt b/tests-system/lobster-json/rbt-name-attribute-missing/flat-input-structure/expected-output/stdout.txt similarity index 100% rename from tests-system/lobster-json/rbt-synthetic-tag-name/flat-input-structure/expected-output/stdout.txt rename to tests-system/lobster-json/rbt-name-attribute-missing/flat-input-structure/expected-output/stdout.txt diff --git a/tests-system/lobster-json/rbt-synthetic-tag-name/flat-input-structure/input/args.txt b/tests-system/lobster-json/rbt-name-attribute-missing/flat-input-structure/input/args.txt similarity index 100% rename from tests-system/lobster-json/rbt-synthetic-tag-name/flat-input-structure/input/args.txt rename to tests-system/lobster-json/rbt-name-attribute-missing/flat-input-structure/input/args.txt diff --git a/tests-system/lobster-json/rbt-synthetic-tag-name/flat-input-structure/input/basic.json b/tests-system/lobster-json/rbt-name-attribute-missing/flat-input-structure/input/basic.json similarity index 100% rename from tests-system/lobster-json/rbt-synthetic-tag-name/flat-input-structure/input/basic.json rename to tests-system/lobster-json/rbt-name-attribute-missing/flat-input-structure/input/basic.json diff --git a/tests-system/lobster-json/rbt-synthetic-tag-name/nested-input-structure/expected-output/exit-code.txt b/tests-system/lobster-json/rbt-name-attribute-missing/nested-input-structure/expected-output/exit-code.txt similarity index 100% rename from tests-system/lobster-json/rbt-synthetic-tag-name/nested-input-structure/expected-output/exit-code.txt rename to tests-system/lobster-json/rbt-name-attribute-missing/nested-input-structure/expected-output/exit-code.txt diff --git a/tests-system/lobster-json/rbt-synthetic-tag-name/nested-input-structure/expected-output/output.lobster b/tests-system/lobster-json/rbt-name-attribute-missing/nested-input-structure/expected-output/output.lobster similarity index 100% rename from tests-system/lobster-json/rbt-synthetic-tag-name/nested-input-structure/expected-output/output.lobster rename to tests-system/lobster-json/rbt-name-attribute-missing/nested-input-structure/expected-output/output.lobster diff --git a/tests-system/lobster-json/rbt-synthetic-tag-name/nested-input-structure/expected-output/stderr.txt b/tests-system/lobster-json/rbt-name-attribute-missing/nested-input-structure/expected-output/stderr.txt similarity index 100% rename from tests-system/lobster-json/rbt-synthetic-tag-name/nested-input-structure/expected-output/stderr.txt rename to tests-system/lobster-json/rbt-name-attribute-missing/nested-input-structure/expected-output/stderr.txt diff --git a/tests-system/lobster-json/rbt-synthetic-tag-name/nested-input-structure/expected-output/stdout.txt b/tests-system/lobster-json/rbt-name-attribute-missing/nested-input-structure/expected-output/stdout.txt similarity index 100% rename from tests-system/lobster-json/rbt-synthetic-tag-name/nested-input-structure/expected-output/stdout.txt rename to tests-system/lobster-json/rbt-name-attribute-missing/nested-input-structure/expected-output/stdout.txt diff --git a/tests-system/lobster-json/rbt-synthetic-tag-name/nested-input-structure/input/args.txt b/tests-system/lobster-json/rbt-name-attribute-missing/nested-input-structure/input/args.txt similarity index 100% rename from tests-system/lobster-json/rbt-synthetic-tag-name/nested-input-structure/input/args.txt rename to tests-system/lobster-json/rbt-name-attribute-missing/nested-input-structure/input/args.txt diff --git a/tests-system/lobster-json/rbt-synthetic-tag-name/nested-input-structure/input/one/two/basic.json b/tests-system/lobster-json/rbt-name-attribute-missing/nested-input-structure/input/one/two/basic.json similarity index 100% rename from tests-system/lobster-json/rbt-synthetic-tag-name/nested-input-structure/input/one/two/basic.json rename to tests-system/lobster-json/rbt-name-attribute-missing/nested-input-structure/input/one/two/basic.json diff --git a/tests-system/lobster-json/rbt-parse-input-file-input-items/outer-and-inner/README.md b/tests-system/lobster-json/rbt-parse-input-file-input-items/outer-and-inner/README.md new file mode 100644 index 00000000..f7c21c03 --- /dev/null +++ b/tests-system/lobster-json/rbt-parse-input-file-input-items/outer-and-inner/README.md @@ -0,0 +1,3 @@ +The input file of this test defines a JSON data struct which has got data items in its +outer-most dictionary, as well as nested items. +According to the requirement only the data items from the outer-most dictionary must be considered. diff --git a/tests-system/lobster-json/rbt-parse-input-file-input-items/outer-and-inner/expected-output/exit-code.txt b/tests-system/lobster-json/rbt-parse-input-file-input-items/outer-and-inner/expected-output/exit-code.txt new file mode 100644 index 00000000..c2270834 --- /dev/null +++ b/tests-system/lobster-json/rbt-parse-input-file-input-items/outer-and-inner/expected-output/exit-code.txt @@ -0,0 +1 @@ +0 \ No newline at end of file diff --git a/tests-system/lobster-json/rbt-parse-input-file-input-items/outer-and-inner/expected-output/stderr.txt b/tests-system/lobster-json/rbt-parse-input-file-input-items/outer-and-inner/expected-output/stderr.txt new file mode 100644 index 00000000..e69de29b diff --git a/tests-system/lobster-json/rbt-parse-input-file-input-items/outer-and-inner/expected-output/stdout.txt b/tests-system/lobster-json/rbt-parse-input-file-input-items/outer-and-inner/expected-output/stdout.txt new file mode 100644 index 00000000..bcbe2911 --- /dev/null +++ b/tests-system/lobster-json/rbt-parse-input-file-input-items/outer-and-inner/expected-output/stdout.txt @@ -0,0 +1 @@ +lobster-json: wrote 1 items to output.lobster diff --git a/tests-system/lobster-json/rbt-parse-input-file-input-items/outer-and-inner/input/args.txt b/tests-system/lobster-json/rbt-parse-input-file-input-items/outer-and-inner/input/args.txt new file mode 100644 index 00000000..a769ee3b --- /dev/null +++ b/tests-system/lobster-json/rbt-parse-input-file-input-items/outer-and-inner/input/args.txt @@ -0,0 +1,3 @@ +--single +--tag-attribute=something +--out=output.lobster \ No newline at end of file diff --git a/tests-system/lobster-json/rbt-parse-input-file-input-items/outer-and-inner/input/data.json b/tests-system/lobster-json/rbt-parse-input-file-input-items/outer-and-inner/input/data.json new file mode 100644 index 00000000..caf2175a --- /dev/null +++ b/tests-system/lobster-json/rbt-parse-input-file-input-items/outer-and-inner/input/data.json @@ -0,0 +1,25 @@ +{ + "outer1": { + "data": [ + { + "name": "Take this item!" + }, + { + + "name": "unclear" + } + ] + }, + "outer2": { + "data": [ + { + "name": "Take this item!" + }, + { + + "name": "unclear" + } + ] + } + } + \ No newline at end of file diff --git a/tests-system/lobster-json/rbt-parse-input-file-input-items/outer-and-inner/tracing.txt b/tests-system/lobster-json/rbt-parse-input-file-input-items/outer-and-inner/tracing.txt new file mode 100644 index 00000000..2549f5d1 --- /dev/null +++ b/tests-system/lobster-json/rbt-parse-input-file-input-items/outer-and-inner/tracing.txt @@ -0,0 +1,3 @@ +# This test verifies these requirements: +Parse_Input_File +Parse_Input_File_JSON_Extension \ No newline at end of file diff --git a/tests-system/lobster-json/rbt-parse-input-file-json-extension/invalid-json-file-extension/README.md b/tests-system/lobster-json/rbt-parse-input-file-json-extension/invalid-json-file-extension/README.md new file mode 100644 index 00000000..e6737dd9 --- /dev/null +++ b/tests-system/lobster-json/rbt-parse-input-file-json-extension/invalid-json-file-extension/README.md @@ -0,0 +1,2 @@ +The goal of this test is to check if a warning message is printed when the input +file has a non json extension. \ No newline at end of file diff --git a/tests-system/lobster-json/rbt-parse-input-file-json-extension/invalid-json-file-extension/expected-output/exit-code.txt b/tests-system/lobster-json/rbt-parse-input-file-json-extension/invalid-json-file-extension/expected-output/exit-code.txt new file mode 100644 index 00000000..c2270834 --- /dev/null +++ b/tests-system/lobster-json/rbt-parse-input-file-json-extension/invalid-json-file-extension/expected-output/exit-code.txt @@ -0,0 +1 @@ +0 \ No newline at end of file diff --git a/tests-system/lobster-json/rbt-parse-input-file-json-extension/invalid-json-file-extension/expected-output/output.lobster b/tests-system/lobster-json/rbt-parse-input-file-json-extension/invalid-json-file-extension/expected-output/output.lobster new file mode 100644 index 00000000..407bcdf1 --- /dev/null +++ b/tests-system/lobster-json/rbt-parse-input-file-json-extension/invalid-json-file-extension/expected-output/output.lobster @@ -0,0 +1,24 @@ +{ + "data": [ + { + "tag": "json data.invalidjson:data.invalidjson.1", + "location": { + "kind": "file", + "file": "data.invalidjson", + "line": null, + "column": null + }, + "name": "data.invalidjson:data.invalidjson.1", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "JSON", + "kind": "Test Vector", + "status": null + } + ], + "generator": "lobster-json", + "schema": "lobster-act-trace", + "version": 3 +} diff --git a/tests-system/lobster-json/rbt-parse-input-file-json-extension/invalid-json-file-extension/expected-output/stderr.txt b/tests-system/lobster-json/rbt-parse-input-file-json-extension/invalid-json-file-extension/expected-output/stderr.txt new file mode 100644 index 00000000..e69de29b diff --git a/tests-system/lobster-json/rbt-parse-input-file-json-extension/invalid-json-file-extension/expected-output/stdout.txt b/tests-system/lobster-json/rbt-parse-input-file-json-extension/invalid-json-file-extension/expected-output/stdout.txt new file mode 100644 index 00000000..799118e0 --- /dev/null +++ b/tests-system/lobster-json/rbt-parse-input-file-json-extension/invalid-json-file-extension/expected-output/stdout.txt @@ -0,0 +1,2 @@ +: lobster warning: not a .json file +lobster-json: wrote 1 items to output.lobster diff --git a/tests-system/lobster-json/rbt-parse-input-file-json-extension/invalid-json-file-extension/input/args.txt b/tests-system/lobster-json/rbt-parse-input-file-json-extension/invalid-json-file-extension/input/args.txt new file mode 100644 index 00000000..baa4e62c --- /dev/null +++ b/tests-system/lobster-json/rbt-parse-input-file-json-extension/invalid-json-file-extension/input/args.txt @@ -0,0 +1,4 @@ +--single +--tag-attribute=something +--out=output.lobster +data.invalidjson \ No newline at end of file diff --git a/tests-system/lobster-json/rbt-parse-input-file-json-extension/invalid-json-file-extension/input/data.invalidjson b/tests-system/lobster-json/rbt-parse-input-file-json-extension/invalid-json-file-extension/input/data.invalidjson new file mode 100644 index 00000000..0d51e202 --- /dev/null +++ b/tests-system/lobster-json/rbt-parse-input-file-json-extension/invalid-json-file-extension/input/data.invalidjson @@ -0,0 +1,10 @@ +{ + "items": { + "data": [ + { + "name": "Take this item!" + } + ] + } +} + \ No newline at end of file diff --git a/tests-system/lobster-json/rbt-parse-input-file-json-extension/mixed-extensions/README.md b/tests-system/lobster-json/rbt-parse-input-file-json-extension/mixed-extensions/README.md new file mode 100644 index 00000000..e6737dd9 --- /dev/null +++ b/tests-system/lobster-json/rbt-parse-input-file-json-extension/mixed-extensions/README.md @@ -0,0 +1,2 @@ +The goal of this test is to check if a warning message is printed when the input +file has a non json extension. \ No newline at end of file diff --git a/tests-system/lobster-json/rbt-parse-input-file-json-extension/mixed-extensions/expected-output/exit-code.txt b/tests-system/lobster-json/rbt-parse-input-file-json-extension/mixed-extensions/expected-output/exit-code.txt new file mode 100644 index 00000000..c2270834 --- /dev/null +++ b/tests-system/lobster-json/rbt-parse-input-file-json-extension/mixed-extensions/expected-output/exit-code.txt @@ -0,0 +1 @@ +0 \ No newline at end of file diff --git a/tests-system/lobster-json/rbt-parse-input-file-json-extension/mixed-extensions/expected-output/output.lobster b/tests-system/lobster-json/rbt-parse-input-file-json-extension/mixed-extensions/expected-output/output.lobster new file mode 100644 index 00000000..2180db4e --- /dev/null +++ b/tests-system/lobster-json/rbt-parse-input-file-json-extension/mixed-extensions/expected-output/output.lobster @@ -0,0 +1,41 @@ +{ + "data": [ + { + "tag": "json data.invalidjson:data.invalidjson.1", + "location": { + "kind": "file", + "file": "data.invalidjson", + "line": null, + "column": null + }, + "name": "data.invalidjson:data.invalidjson.1", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "JSON", + "kind": "Test Vector", + "status": null + }, + { + "tag": "json valid.json:valid.1", + "location": { + "kind": "file", + "file": "valid.json", + "line": null, + "column": null + }, + "name": "valid.json:valid.1", + "messages": [], + "just_up": [], + "just_down": [], + "just_global": [], + "framework": "JSON", + "kind": "Test Vector", + "status": null + } + ], + "generator": "lobster-json", + "schema": "lobster-act-trace", + "version": 3 +} diff --git a/tests-system/lobster-json/rbt-parse-input-file-json-extension/mixed-extensions/expected-output/stderr.txt b/tests-system/lobster-json/rbt-parse-input-file-json-extension/mixed-extensions/expected-output/stderr.txt new file mode 100644 index 00000000..e69de29b diff --git a/tests-system/lobster-json/rbt-parse-input-file-json-extension/mixed-extensions/expected-output/stdout.txt b/tests-system/lobster-json/rbt-parse-input-file-json-extension/mixed-extensions/expected-output/stdout.txt new file mode 100644 index 00000000..be475c3d --- /dev/null +++ b/tests-system/lobster-json/rbt-parse-input-file-json-extension/mixed-extensions/expected-output/stdout.txt @@ -0,0 +1,2 @@ +: lobster warning: not a .json file +lobster-json: wrote 2 items to output.lobster diff --git a/tests-system/lobster-json/rbt-parse-input-file-json-extension/mixed-extensions/input/args.txt b/tests-system/lobster-json/rbt-parse-input-file-json-extension/mixed-extensions/input/args.txt new file mode 100644 index 00000000..f2e1fa7d --- /dev/null +++ b/tests-system/lobster-json/rbt-parse-input-file-json-extension/mixed-extensions/input/args.txt @@ -0,0 +1,5 @@ +--single +--tag-attribute=something +--out=output.lobster +data.invalidjson +valid.json \ No newline at end of file diff --git a/tests-system/lobster-json/rbt-parse-input-file-json-extension/mixed-extensions/input/data.invalidjson b/tests-system/lobster-json/rbt-parse-input-file-json-extension/mixed-extensions/input/data.invalidjson new file mode 100644 index 00000000..2db0daba --- /dev/null +++ b/tests-system/lobster-json/rbt-parse-input-file-json-extension/mixed-extensions/input/data.invalidjson @@ -0,0 +1,13 @@ +{ + "items": { + "data": [ + { + "name": "Take this item!" + }, + { + "name": "unclear" + } + ] + } +} + \ No newline at end of file diff --git a/tests-system/lobster-json/rbt-parse-input-file-json-extension/mixed-extensions/input/valid.json b/tests-system/lobster-json/rbt-parse-input-file-json-extension/mixed-extensions/input/valid.json new file mode 100644 index 00000000..1270148f --- /dev/null +++ b/tests-system/lobster-json/rbt-parse-input-file-json-extension/mixed-extensions/input/valid.json @@ -0,0 +1,10 @@ +{ + "items": { + "data": [ + { + "name": "This file has a valid json extension" + } + ] + } +} + \ No newline at end of file diff --git a/tests-system/lobster-json/rbt-parse-input-file/file-does-not-exist/README.md b/tests-system/lobster-json/rbt-parse-input-file/file-does-not-exist/README.md new file mode 100644 index 00000000..f366f452 --- /dev/null +++ b/tests-system/lobster-json/rbt-parse-input-file/file-does-not-exist/README.md @@ -0,0 +1,2 @@ +The goal of this test is to check if an error message gets printed +if the input file to the lobster-json tool does not exist diff --git a/tests-system/lobster-json/rbt-parse-input-file/file-does-not-exist/expected-output/exit-code.txt b/tests-system/lobster-json/rbt-parse-input-file/file-does-not-exist/expected-output/exit-code.txt new file mode 100644 index 00000000..56a6051c --- /dev/null +++ b/tests-system/lobster-json/rbt-parse-input-file/file-does-not-exist/expected-output/exit-code.txt @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/tests-system/lobster-json/rbt-parse-input-file/file-does-not-exist/expected-output/report.lobster b/tests-system/lobster-json/rbt-parse-input-file/file-does-not-exist/expected-output/report.lobster new file mode 100644 index 00000000..e69de29b diff --git a/tests-system/lobster-json/rbt-parse-input-file/file-does-not-exist/expected-output/stderr.txt b/tests-system/lobster-json/rbt-parse-input-file/file-does-not-exist/expected-output/stderr.txt new file mode 100644 index 00000000..e69de29b diff --git a/tests-system/lobster-json/rbt-parse-input-file/file-does-not-exist/expected-output/stdout.txt b/tests-system/lobster-json/rbt-parse-input-file/file-does-not-exist/expected-output/stdout.txt new file mode 100644 index 00000000..7dc7c5b5 --- /dev/null +++ b/tests-system/lobster-json/rbt-parse-input-file/file-does-not-exist/expected-output/stdout.txt @@ -0,0 +1 @@ +: lobster error: file/does/not_exists.json is not a file or directory diff --git a/tests-system/lobster-json/rbt-parse-input-file/file-does-not-exist/input/args.txt b/tests-system/lobster-json/rbt-parse-input-file/file-does-not-exist/input/args.txt new file mode 100644 index 00000000..29a87370 --- /dev/null +++ b/tests-system/lobster-json/rbt-parse-input-file/file-does-not-exist/input/args.txt @@ -0,0 +1,4 @@ +--single +--tag-attribute=something +--out=output.lobster +file/does/not_exists.json \ No newline at end of file diff --git a/tests-system/lobster-online-report/rbt-valid-flow/valid-scenario/expected-output/expected-output.lobster b/tests-system/lobster-online-report/rbt-valid-flow/valid-scenario/expected-output/expected-output.lobster index 03740651..5fd459a5 100644 --- a/tests-system/lobster-online-report/rbt-valid-flow/valid-scenario/expected-output/expected-output.lobster +++ b/tests-system/lobster-online-report/rbt-valid-flow/valid-scenario/expected-output/expected-output.lobster @@ -15,7 +15,7 @@ "commit": "main", "file": "tests-system/lobster-online-report/rbt-valid-flow/valid-scenario/input/basic.py", "line": 5, - "exec_commit_id": "6fa7eadf8b9841fedc7a74a6147247ac830fd2bf" + "exec_commit_id": "be5f5a70fec58b2ee02e5c8d56976cba4960e0dc" }, "name": "basic.trlc_reference", "messages": [], @@ -36,7 +36,7 @@ "commit": "main", "file": "tests-system/lobster-online-report/rbt-valid-flow/valid-scenario/input/basic.py", "line": 13, - "exec_commit_id": "6fa7eadf8b9841fedc7a74a6147247ac830fd2bf" + "exec_commit_id": "be5f5a70fec58b2ee02e5c8d56976cba4960e0dc" }, "name": "basic.Example.helper_function", "messages": [], @@ -55,7 +55,7 @@ "commit": "main", "file": "tests-system/lobster-online-report/rbt-valid-flow/valid-scenario/input/basic.py", "line": 17, - "exec_commit_id": "6fa7eadf8b9841fedc7a74a6147247ac830fd2bf" + "exec_commit_id": "be5f5a70fec58b2ee02e5c8d56976cba4960e0dc" }, "name": "basic.Example.nor", "messages": [