From 6cb0dc0ffbf6fe4b7fc41256101bd71b1e8c56be Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 23 Jun 2022 12:25:45 +0300 Subject: Add support for comments in dependency clauses block --- tests/manifest/testscript | 184 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 184 insertions(+) (limited to 'tests') diff --git a/tests/manifest/testscript b/tests/manifest/testscript index 760a9de..0398206 100644 --- a/tests/manifest/testscript +++ b/tests/manifest/testscript @@ -953,6 +953,29 @@ stdin:6:14: error: config.foo.* variable assignment expected instead of EOE } + + : comments + : + $* <>EOE != 0 + : 1 + name: foo + version: 2.0.0 + summary: Modern C++ parser + license: LGPLv2 + depends:\ + bar + { + require + { + config.bar.frame=4016 + config.bar.timeout=10 + } + } | + {bar # Error. + \ + EOI + stdin:15:6: error: invalid package name: length is less than two characters + EOE } : multi-line @@ -2560,6 +2583,167 @@ stdin:9:1: error: multi-line dependency form with inline reflect clause EOE } + + : comments + : + { + : single-line-separate + : + $* <>EOO + : 1 + name: foo + version: 2.0.0 + summary: Modern C++ parser + license: LGPLv2 + depends:\ + bar + { + # Configure bar. + # + require + { + config.bar.frame=4016 + config.bar.timeout=10 + } + } + \ + EOI + : 1 + name: foo + version: 2.0.0 + summary: Modern C++ parser + license: LGPLv2 + depends:\ + bar + { + require + { + config.bar.frame=4016 + config.bar.timeout=10 + } + } + \ + EOO + + : single-line-trailing + : + $* <>EOO + : 1 + name: foo + version: 2.0.0 + summary: Modern C++ parser + license: LGPLv2 + depends:\ + bar + { + require # Configure bar. + { + config.bar.frame=4016 + config.bar.timeout=10 + } + } + \ + EOI + : 1 + name: foo + version: 2.0.0 + summary: Modern C++ parser + license: LGPLv2 + depends:\ + bar + { + require + { + config.bar.frame=4016 + config.bar.timeout=10 + } + } + \ + EOO + + : multi-line + : + $* <>EOO + : 1 + name: foo + version: 2.0.0 + summary: Modern C++ parser + license: LGPLv2 + depends:\ + bar + { + #\\ + # Configure bar. + # + require + { + config.bar.frame=4016 + config.bar.timeout=10 + } + #\\ + + prefer + { + config.bar.frame=4016 + config.bar.timeout=10 + } + + accept ($config.bar.frame >= 1024 && config.bar.timeout < 20) + } + \ + EOI + : 1 + name: foo + version: 2.0.0 + summary: Modern C++ parser + license: LGPLv2 + depends:\ + bar + { + prefer + { + config.bar.frame=4016 + config.bar.timeout=10 + } + + accept ($config.bar.frame >= 1024 && config.bar.timeout < 20) + } + \ + EOO + + : multi-line-unterm + : + $* <>EOE != 0 + : 1 + name: foo + version: 2.0.0 + summary: Modern C++ parser + license: LGPLv2 + depends:\ + bar + { + #\\ + # Configure bar. + # + require + { + config.bar.frame=4016 + config.bar.timeout=10 + } + + prefer + { + config.bar.frame=4016 + config.bar.timeout=10 + } + + accept ($config.bar.frame >= 1024 && config.bar.timeout < 20) + } + \ + EOI + stdin:25:2: error: unterminated multi-line comment + EOE + } } : multiple-alternatives -- cgit v1.1