Václav Kubernát | 11afac7 | 2018-07-18 14:59:53 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2018 CESNET, https://photonics.cesnet.cz/ |
| 3 | * Copyright (C) 2018 FIT CVUT, https://fit.cvut.cz/ |
| 4 | * |
| 5 | * Written by Václav Kubernát <kubervac@fit.cvut.cz> |
| 6 | * |
| 7 | */ |
| 8 | |
Václav Kubernát | 26b5608 | 2020-02-03 18:28:56 +0100 | [diff] [blame] | 9 | #include "trompeloeil_doctest.hpp" |
Václav Kubernát | 11afac7 | 2018-07-18 14:59:53 +0200 | [diff] [blame] | 10 | #include "ast_commands.hpp" |
| 11 | #include "parser.hpp" |
Václav Kubernát | 4a58ce6 | 2020-05-14 17:58:10 +0200 | [diff] [blame] | 12 | #include "pretty_printers.hpp" |
Václav Kubernát | 11afac7 | 2018-07-18 14:59:53 +0200 | [diff] [blame] | 13 | #include "static_schema.hpp" |
| 14 | |
| 15 | TEST_CASE("ls") |
| 16 | { |
| 17 | auto schema = std::make_shared<StaticSchema>(); |
| 18 | schema->addModule("example"); |
| 19 | schema->addModule("second"); |
Václav Kubernát | efcac93 | 2020-01-10 15:26:32 +0100 | [diff] [blame] | 20 | schema->addContainer("/", "example:a"); |
| 21 | schema->addList("/example:a", "example:listInCont", {"number"}); |
Václav Kubernát | dd8ec15 | 2020-05-13 17:06:36 +0200 | [diff] [blame] | 22 | schema->addContainer("/example:a/example:listInCont", "example:contInList"); |
Václav Kubernát | efcac93 | 2020-01-10 15:26:32 +0100 | [diff] [blame] | 23 | schema->addContainer("/", "second:a"); |
| 24 | schema->addContainer("/", "example:b"); |
| 25 | schema->addContainer("/example:a", "example:a2"); |
| 26 | schema->addContainer("/example:b", "example:b2"); |
| 27 | schema->addContainer("/example:a/example:a2", "example:a3"); |
| 28 | schema->addContainer("/example:b/example:b2", "example:b3"); |
| 29 | schema->addList("/", "example:list", {"number"}); |
Václav Kubernát | 3a99f00 | 2020-03-31 02:27:41 +0200 | [diff] [blame] | 30 | schema->addLeaf("/example:list", "example:number", yang::Int32{}); |
Václav Kubernát | efcac93 | 2020-01-10 15:26:32 +0100 | [diff] [blame] | 31 | schema->addContainer("/example:list", "example:contInList"); |
| 32 | schema->addList("/", "example:twoKeyList", {"number", "name"}); |
Václav Kubernát | 3a99f00 | 2020-03-31 02:27:41 +0200 | [diff] [blame] | 33 | schema->addLeaf("/example:twoKeyList", "example:number", yang::Int32{}); |
| 34 | schema->addLeaf("/example:twoKeyList", "example:name", yang::String{}); |
Václav Kubernát | 11afac7 | 2018-07-18 14:59:53 +0200 | [diff] [blame] | 35 | Parser parser(schema); |
| 36 | std::string input; |
| 37 | std::ostringstream errorStream; |
| 38 | |
| 39 | SECTION("valid input") |
| 40 | { |
| 41 | ls_ expected; |
| 42 | |
| 43 | SECTION("no arguments") |
| 44 | { |
Václav Kubernát | e7d4aea | 2018-09-11 18:15:48 +0200 | [diff] [blame] | 45 | SECTION("ls") |
Václav Kubernát | b4e5b18 | 2020-11-16 19:55:09 +0100 | [diff] [blame] | 46 | { |
Václav Kubernát | e7d4aea | 2018-09-11 18:15:48 +0200 | [diff] [blame] | 47 | input = "ls"; |
Václav Kubernát | b4e5b18 | 2020-11-16 19:55:09 +0100 | [diff] [blame] | 48 | } |
Václav Kubernát | e7d4aea | 2018-09-11 18:15:48 +0200 | [diff] [blame] | 49 | |
| 50 | SECTION("ls --recursive") |
| 51 | { |
| 52 | input = "ls --recursive"; |
Václav Kubernát | faacd02 | 2020-07-08 16:44:38 +0200 | [diff] [blame] | 53 | expected.m_options.emplace_back(LsOption::Recursive); |
Václav Kubernát | e7d4aea | 2018-09-11 18:15:48 +0200 | [diff] [blame] | 54 | } |
Václav Kubernát | 11afac7 | 2018-07-18 14:59:53 +0200 | [diff] [blame] | 55 | } |
| 56 | |
| 57 | SECTION("with path argument") |
| 58 | { |
Václav Kubernát | 37171a1 | 2018-08-31 17:01:48 +0200 | [diff] [blame] | 59 | SECTION("ls example:a") |
| 60 | { |
| 61 | input = "ls example:a"; |
Václav Kubernát | 2eaceb8 | 2018-10-08 19:56:30 +0200 | [diff] [blame] | 62 | expected.m_path = dataPath_{Scope::Relative, {dataNode_(module_{"example"}, container_{"a"})}}; |
Václav Kubernát | 37171a1 | 2018-08-31 17:01:48 +0200 | [diff] [blame] | 63 | } |
| 64 | |
| 65 | SECTION("ls /example:a") |
| 66 | { |
Václav Kubernát | b4e5b18 | 2020-11-16 19:55:09 +0100 | [diff] [blame] | 67 | SECTION("cwd: /") { } |
Václav Kubernát | bf083ec | 2019-02-19 13:58:09 +0100 | [diff] [blame] | 68 | SECTION("cwd: /example:a") { parser.changeNode(dataPath_{Scope::Relative, {dataNode_(module_{"example"}, container_{"a"})}}); } |
Václav Kubernát | 37171a1 | 2018-08-31 17:01:48 +0200 | [diff] [blame] | 69 | |
| 70 | input = "ls /example:a"; |
Václav Kubernát | 2eaceb8 | 2018-10-08 19:56:30 +0200 | [diff] [blame] | 71 | expected.m_path = dataPath_{Scope::Absolute, {dataNode_(module_{"example"}, container_{"a"})}}; |
Václav Kubernát | 37171a1 | 2018-08-31 17:01:48 +0200 | [diff] [blame] | 72 | } |
| 73 | |
| 74 | SECTION("ls /") |
| 75 | { |
Václav Kubernát | b4e5b18 | 2020-11-16 19:55:09 +0100 | [diff] [blame] | 76 | SECTION("cwd: /") { } |
Václav Kubernát | bf083ec | 2019-02-19 13:58:09 +0100 | [diff] [blame] | 77 | SECTION("cwd: /example:a") { parser.changeNode(dataPath_{Scope::Relative, {dataNode_(module_{"example"}, container_{"a"})}}); } |
Václav Kubernát | 37171a1 | 2018-08-31 17:01:48 +0200 | [diff] [blame] | 78 | input = "ls /"; |
Václav Kubernát | 2eaceb8 | 2018-10-08 19:56:30 +0200 | [diff] [blame] | 79 | expected.m_path = dataPath_{Scope::Absolute, {}}; |
Václav Kubernát | 37171a1 | 2018-08-31 17:01:48 +0200 | [diff] [blame] | 80 | } |
| 81 | |
Václav Kubernát | aed4bc7 | 2020-06-08 01:09:25 +0200 | [diff] [blame] | 82 | SECTION("going up from a node with no children") |
| 83 | { |
| 84 | parser.changeNode(dataPath_{Scope::Relative, {dataNode_(module_{"second"}, container_{"a"})}}); |
| 85 | REQUIRE(schema->availableNodes(parser.currentPath(), Recursion::NonRecursive) == std::set<ModuleNodePair>{}); |
| 86 | input = "ls ../example:a"; |
| 87 | expected.m_path = dataPath_{Scope::Relative, { |
| 88 | dataNode_{nodeup_{}}, |
| 89 | dataNode_{module_{"example"}, container_{"a"}} |
| 90 | }}; |
| 91 | |
| 92 | } |
| 93 | |
Václav Kubernát | 37171a1 | 2018-08-31 17:01:48 +0200 | [diff] [blame] | 94 | SECTION("ls example:a/a2") |
| 95 | { |
| 96 | input = "ls example:a/a2"; |
Václav Kubernát | 2eaceb8 | 2018-10-08 19:56:30 +0200 | [diff] [blame] | 97 | expected.m_path = dataPath_{Scope::Relative, {dataNode_(module_{"example"}, container_{"a"}), |
| 98 | dataNode_(container_{"a2"})}}; |
Václav Kubernát | 37171a1 | 2018-08-31 17:01:48 +0200 | [diff] [blame] | 99 | } |
| 100 | |
| 101 | SECTION("ls a2") |
| 102 | { |
Václav Kubernát | 2eaceb8 | 2018-10-08 19:56:30 +0200 | [diff] [blame] | 103 | parser.changeNode(dataPath_{Scope::Relative, {dataNode_(module_{"example"}, container_{"a"})}}); |
Václav Kubernát | 37171a1 | 2018-08-31 17:01:48 +0200 | [diff] [blame] | 104 | input = "ls a2"; |
Václav Kubernát | 2eaceb8 | 2018-10-08 19:56:30 +0200 | [diff] [blame] | 105 | expected.m_path = dataPath_{Scope::Relative, {dataNode_(container_{"a2"})}}; |
Václav Kubernát | 37171a1 | 2018-08-31 17:01:48 +0200 | [diff] [blame] | 106 | } |
| 107 | |
| 108 | SECTION("ls /example:a/a2") |
| 109 | { |
Václav Kubernát | b4e5b18 | 2020-11-16 19:55:09 +0100 | [diff] [blame] | 110 | SECTION("cwd: /") { } |
Václav Kubernát | bf083ec | 2019-02-19 13:58:09 +0100 | [diff] [blame] | 111 | SECTION("cwd: /example:a") { parser.changeNode(dataPath_{Scope::Relative, {dataNode_(module_{"example"}, container_{"a"})}}); } |
Václav Kubernát | 37171a1 | 2018-08-31 17:01:48 +0200 | [diff] [blame] | 112 | input = "ls /example:a/a2"; |
Václav Kubernát | 2eaceb8 | 2018-10-08 19:56:30 +0200 | [diff] [blame] | 113 | expected.m_path = dataPath_{Scope::Absolute, {dataNode_(module_{"example"}, container_{"a"}), |
| 114 | dataNode_(container_{"a2"})}}; |
Václav Kubernát | 37171a1 | 2018-08-31 17:01:48 +0200 | [diff] [blame] | 115 | } |
| 116 | |
| 117 | SECTION("ls example:a/example:a2") |
| 118 | { |
| 119 | input = "ls example:a/example:a2"; |
Václav Kubernát | 2eaceb8 | 2018-10-08 19:56:30 +0200 | [diff] [blame] | 120 | expected.m_path = dataPath_{Scope::Relative, {dataNode_(module_{"example"}, container_{"a"}), |
| 121 | dataNode_(module_{"example"}, container_{"a2"})}}; |
Václav Kubernát | 37171a1 | 2018-08-31 17:01:48 +0200 | [diff] [blame] | 122 | } |
| 123 | |
| 124 | SECTION("ls example:a2") |
| 125 | { |
Václav Kubernát | 2eaceb8 | 2018-10-08 19:56:30 +0200 | [diff] [blame] | 126 | parser.changeNode(dataPath_{Scope::Relative, {dataNode_(module_{"example"}, container_{"a"})}}); |
Václav Kubernát | 37171a1 | 2018-08-31 17:01:48 +0200 | [diff] [blame] | 127 | input = "ls example:a2"; |
Václav Kubernát | 2eaceb8 | 2018-10-08 19:56:30 +0200 | [diff] [blame] | 128 | expected.m_path = dataPath_{Scope::Relative, {dataNode_(module_{"example"}, container_{"a2"})}}; |
Václav Kubernát | 37171a1 | 2018-08-31 17:01:48 +0200 | [diff] [blame] | 129 | } |
| 130 | |
| 131 | SECTION("ls /example:a/example:a2") |
| 132 | { |
Václav Kubernát | b4e5b18 | 2020-11-16 19:55:09 +0100 | [diff] [blame] | 133 | SECTION("cwd: /") { } |
Václav Kubernát | bf083ec | 2019-02-19 13:58:09 +0100 | [diff] [blame] | 134 | SECTION("cwd: /example:a") { parser.changeNode(dataPath_{Scope::Relative, {dataNode_(module_{"example"}, container_{"a"})}}); } |
Václav Kubernát | 37171a1 | 2018-08-31 17:01:48 +0200 | [diff] [blame] | 135 | |
| 136 | input = "ls /example:a/example:a2"; |
Václav Kubernát | 2eaceb8 | 2018-10-08 19:56:30 +0200 | [diff] [blame] | 137 | expected.m_path = dataPath_{Scope::Absolute, {dataNode_(module_{"example"}, container_{"a"}), |
| 138 | dataNode_(module_{"example"}, container_{"a2"})}}; |
Václav Kubernát | 37171a1 | 2018-08-31 17:01:48 +0200 | [diff] [blame] | 139 | } |
Václav Kubernát | e7d4aea | 2018-09-11 18:15:48 +0200 | [diff] [blame] | 140 | |
| 141 | SECTION("ls --recursive /example:a") |
| 142 | { |
Václav Kubernát | b4e5b18 | 2020-11-16 19:55:09 +0100 | [diff] [blame] | 143 | SECTION("cwd: /") { } |
Václav Kubernát | bf083ec | 2019-02-19 13:58:09 +0100 | [diff] [blame] | 144 | SECTION("cwd: /example:a") { parser.changeNode(dataPath_{Scope::Relative, {dataNode_(module_{"example"}, container_{"a"})}}); } |
Václav Kubernát | e7d4aea | 2018-09-11 18:15:48 +0200 | [diff] [blame] | 145 | |
| 146 | input = "ls --recursive /example:a"; |
Václav Kubernát | faacd02 | 2020-07-08 16:44:38 +0200 | [diff] [blame] | 147 | expected.m_options.emplace_back(LsOption::Recursive); |
Václav Kubernát | 2eaceb8 | 2018-10-08 19:56:30 +0200 | [diff] [blame] | 148 | expected.m_path = dataPath_{Scope::Absolute, {dataNode_(module_{"example"}, container_{"a"})}}; |
Václav Kubernát | e7d4aea | 2018-09-11 18:15:48 +0200 | [diff] [blame] | 149 | } |
Václav Kubernát | 5c75b25 | 2018-10-10 18:33:47 +0200 | [diff] [blame] | 150 | |
| 151 | SECTION("ls example:list") |
| 152 | { |
| 153 | input = "ls example:list"; |
| 154 | expected.m_path = dataPath_{Scope::Relative, {dataNode_(module_{"example"}, list_{"list"})}}; |
| 155 | } |
| 156 | |
Václav Kubernát | 211383d | 2020-01-06 18:07:50 +0100 | [diff] [blame] | 157 | SECTION("ls /example:list") |
| 158 | { |
Václav Kubernát | b4e5b18 | 2020-11-16 19:55:09 +0100 | [diff] [blame] | 159 | SECTION("cwd: /") { } |
Václav Kubernát | 211383d | 2020-01-06 18:07:50 +0100 | [diff] [blame] | 160 | SECTION("cwd: /example:a") { parser.changeNode(dataPath_{Scope::Relative, {dataNode_(module_{"example"}, container_{"a"})}}); } |
| 161 | input = "ls /example:list"; |
| 162 | expected.m_path = dataPath_{Scope::Absolute, {dataNode_(module_{"example"}, list_{"list"})}}; |
| 163 | } |
| 164 | |
Václav Kubernát | 5c75b25 | 2018-10-10 18:33:47 +0200 | [diff] [blame] | 165 | SECTION("ls example:a/example:listInCont") |
| 166 | { |
| 167 | input = "ls example:a/example:listInCont"; |
| 168 | expected.m_path = dataPath_{Scope::Relative, {dataNode_(module_{"example"}, container_{"a"}), |
| 169 | dataNode_(module_{"example"}, list_{"listInCont"})}}; |
| 170 | } |
| 171 | |
Václav Kubernát | dd8ec15 | 2020-05-13 17:06:36 +0200 | [diff] [blame] | 172 | SECTION("ls example:a/example:listInCont/example:contInList") |
| 173 | { |
| 174 | input = "ls example:a/example:listInCont/example:contInList"; |
| 175 | expected.m_path = schemaPath_{Scope::Relative, {schemaNode_(module_{"example"}, container_{"a"}), |
| 176 | schemaNode_(module_{"example"}, list_{"listInCont"}), |
| 177 | schemaNode_(module_{"example"}, container_{"contInList"})}}; |
| 178 | } |
| 179 | |
Václav Kubernát | 5c75b25 | 2018-10-10 18:33:47 +0200 | [diff] [blame] | 180 | SECTION("ls example:list[number=342]/contInList") |
| 181 | { |
| 182 | input = "ls example:list[number=342]/contInList"; |
Václav Kubernát | b4e5b18 | 2020-11-16 19:55:09 +0100 | [diff] [blame] | 183 | auto keys = ListInstance{ |
Václav Kubernát | 7707cae | 2020-01-16 12:04:53 +0100 | [diff] [blame] | 184 | {"number", int32_t{342}}}; |
Václav Kubernát | 5c75b25 | 2018-10-10 18:33:47 +0200 | [diff] [blame] | 185 | expected.m_path = dataPath_{Scope::Relative, {dataNode_(module_{"example"}, listElement_{"list", keys}), |
| 186 | dataNode_(container_{"contInList"})}}; |
| 187 | } |
Václav Kubernát | ac035d6 | 2019-02-18 10:59:08 +0100 | [diff] [blame] | 188 | |
| 189 | SECTION("ls example:list/contInList") |
| 190 | { |
| 191 | input = "ls example:list/contInList"; |
| 192 | expected.m_path = schemaPath_{Scope::Relative, {schemaNode_(module_{"example"}, list_{"list"}), |
| 193 | schemaNode_(container_{"contInList"})}}; |
| 194 | } |
Václav Kubernát | 9456b5c | 2019-10-02 21:14:52 +0200 | [diff] [blame] | 195 | |
Václav Kubernát | 88c2a61 | 2020-05-06 02:20:03 +0200 | [diff] [blame] | 196 | SECTION("ls example:list/example:contInList") |
| 197 | { |
| 198 | input = "ls example:list/example:contInList"; |
| 199 | expected.m_path = schemaPath_{Scope::Relative, {schemaNode_(module_{"example"}, list_{"list"}), |
| 200 | schemaNode_(module_{"example"},container_{"contInList"})}}; |
| 201 | } |
| 202 | |
Václav Kubernát | 1cd8c9c | 2020-05-06 01:38:59 +0200 | [diff] [blame] | 203 | SECTION("ls example:list[number=343]/..") |
| 204 | { |
| 205 | input = "ls example:list[number=343]/.."; |
Václav Kubernát | b4e5b18 | 2020-11-16 19:55:09 +0100 | [diff] [blame] | 206 | auto keys = ListInstance{ |
Václav Kubernát | 1cd8c9c | 2020-05-06 01:38:59 +0200 | [diff] [blame] | 207 | {"number", int32_t{343}}}; |
| 208 | expected.m_path = dataPath_{Scope::Relative, {dataNode_(module_{"example"}, listElement_{"list", keys}), dataNode_{nodeup_{}}}}; |
| 209 | } |
| 210 | |
| 211 | SECTION("ls example:list/..") |
| 212 | { |
| 213 | input = "ls example:list/.."; |
| 214 | expected.m_path = schemaPath_{Scope::Relative, {schemaNode_(module_{"example"}, list_{"list"}), schemaNode_{nodeup_{}}}}; |
| 215 | } |
| 216 | |
Václav Kubernát | 9456b5c | 2019-10-02 21:14:52 +0200 | [diff] [blame] | 217 | SECTION("ls example:*") |
| 218 | { |
| 219 | input = "ls example:*"; |
| 220 | expected.m_path = module_{"example"}; |
| 221 | } |
Václav Kubernát | 11afac7 | 2018-07-18 14:59:53 +0200 | [diff] [blame] | 222 | } |
| 223 | |
| 224 | command_ command = parser.parseCommand(input, errorStream); |
| 225 | REQUIRE(command.type() == typeid(ls_)); |
| 226 | REQUIRE(boost::get<ls_>(command) == expected); |
| 227 | } |
Václav Kubernát | e7d4aea | 2018-09-11 18:15:48 +0200 | [diff] [blame] | 228 | |
Václav Kubernát | 11afac7 | 2018-07-18 14:59:53 +0200 | [diff] [blame] | 229 | SECTION("invalid input") |
| 230 | { |
| 231 | SECTION("invalid path") |
| 232 | { |
Václav Kubernát | 37171a1 | 2018-08-31 17:01:48 +0200 | [diff] [blame] | 233 | SECTION("ls example:nonexistent") |
Václav Kubernát | b4e5b18 | 2020-11-16 19:55:09 +0100 | [diff] [blame] | 234 | input = "ls example:nonexistent"; |
Václav Kubernát | 37171a1 | 2018-08-31 17:01:48 +0200 | [diff] [blame] | 235 | |
| 236 | SECTION("ls /example:nonexistent") |
Václav Kubernát | b4e5b18 | 2020-11-16 19:55:09 +0100 | [diff] [blame] | 237 | input = "ls /example:nonexistent"; |
Václav Kubernát | 37171a1 | 2018-08-31 17:01:48 +0200 | [diff] [blame] | 238 | |
Václav Kubernát | b962105 | 2019-03-18 18:27:49 +0100 | [diff] [blame] | 239 | SECTION("ls /exa") |
| 240 | { |
Václav Kubernát | b4e5b18 | 2020-11-16 19:55:09 +0100 | [diff] [blame] | 241 | SECTION("cwd: /") { } |
Václav Kubernát | b962105 | 2019-03-18 18:27:49 +0100 | [diff] [blame] | 242 | SECTION("cwd: /example:a") { parser.changeNode(dataPath_{Scope::Relative, {dataNode_(module_{"example"}, container_{"a"})}}); } |
| 243 | input = "ls /exa"; |
| 244 | } |
| 245 | |
Václav Kubernát | 37171a1 | 2018-08-31 17:01:48 +0200 | [diff] [blame] | 246 | SECTION("ls /bad:nonexistent") |
Václav Kubernát | b4e5b18 | 2020-11-16 19:55:09 +0100 | [diff] [blame] | 247 | input = "ls /bad:nonexistent"; |
Václav Kubernát | 37171a1 | 2018-08-31 17:01:48 +0200 | [diff] [blame] | 248 | |
Václav Kubernát | e7d4aea | 2018-09-11 18:15:48 +0200 | [diff] [blame] | 249 | SECTION("ls example:a/nonexistent") |
Václav Kubernát | b4e5b18 | 2020-11-16 19:55:09 +0100 | [diff] [blame] | 250 | input = "ls example:a/nonexistent"; |
Václav Kubernát | 37171a1 | 2018-08-31 17:01:48 +0200 | [diff] [blame] | 251 | |
Václav Kubernát | e7d4aea | 2018-09-11 18:15:48 +0200 | [diff] [blame] | 252 | SECTION("ls /example:a/nonexistent") |
Václav Kubernát | b4e5b18 | 2020-11-16 19:55:09 +0100 | [diff] [blame] | 253 | input = "ls /example:a/nonexistent"; |
Václav Kubernát | 11afac7 | 2018-07-18 14:59:53 +0200 | [diff] [blame] | 254 | } |
| 255 | |
Václav Kubernát | e7d4aea | 2018-09-11 18:15:48 +0200 | [diff] [blame] | 256 | SECTION("whitespace before path") |
| 257 | { |
| 258 | SECTION("ls --recursive/") |
Václav Kubernát | b4e5b18 | 2020-11-16 19:55:09 +0100 | [diff] [blame] | 259 | input = "ls --recursive/"; |
Václav Kubernát | e7d4aea | 2018-09-11 18:15:48 +0200 | [diff] [blame] | 260 | |
| 261 | SECTION("ls/") |
Václav Kubernát | b4e5b18 | 2020-11-16 19:55:09 +0100 | [diff] [blame] | 262 | input = "ls/"; |
Václav Kubernát | e7d4aea | 2018-09-11 18:15:48 +0200 | [diff] [blame] | 263 | |
| 264 | SECTION("ls --recursive/example:a") |
Václav Kubernát | b4e5b18 | 2020-11-16 19:55:09 +0100 | [diff] [blame] | 265 | input = "ls --recursive/example:a"; |
Václav Kubernát | e7d4aea | 2018-09-11 18:15:48 +0200 | [diff] [blame] | 266 | |
| 267 | SECTION("ls/example:a") |
Václav Kubernát | b4e5b18 | 2020-11-16 19:55:09 +0100 | [diff] [blame] | 268 | input = "ls/example:a"; |
Václav Kubernát | e7d4aea | 2018-09-11 18:15:48 +0200 | [diff] [blame] | 269 | |
| 270 | SECTION("lssecond:a") |
Václav Kubernát | b4e5b18 | 2020-11-16 19:55:09 +0100 | [diff] [blame] | 271 | input = "lssecond:a"; |
Václav Kubernát | e7d4aea | 2018-09-11 18:15:48 +0200 | [diff] [blame] | 272 | } |
| 273 | |
Jan Kundrát | c381e63 | 2019-03-14 13:39:11 +0100 | [diff] [blame] | 274 | REQUIRE_THROWS_AS(parser.parseCommand(input, errorStream), InvalidCommandException); |
Václav Kubernát | 11afac7 | 2018-07-18 14:59:53 +0200 | [diff] [blame] | 275 | } |
| 276 | } |