From 0575ec4e2084c553fa56e3d645233b118936a2d5 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 30 Apr 2019 20:26:36 +0300 Subject: Add support for description-type package manifest value --- tests/manifest/testscript | 357 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 334 insertions(+), 23 deletions(-) (limited to 'tests/manifest/testscript') diff --git a/tests/manifest/testscript b/tests/manifest/testscript index 99f0132..acf9d3b 100644 --- a/tests/manifest/testscript +++ b/tests/manifest/testscript @@ -100,7 +100,7 @@ : dependency-constraint-version : - $* -c -p <'stdin:6:10: error: invalid dependency constraint: min version is greater than max version' != 0 + $* -p -c <'stdin:6:10: error: invalid dependency constraint: min version is greater than max version' != 0 : 1 name: foo version: 2.0.0 @@ -117,12 +117,37 @@ : manifest : { + test.options += -p + + : invalid + : + { + : description-file + : + $* <>~%EOE% != 0 + : 1 + name: libfoo + version: 2.0.0 + summary: Modern C++ parser + license: LGPLv2 + description-file: /README + EOI + %( + stdin:6:19: error: package description-file path is absolute + %| + stdin:6:19: error: invalid package description file: invalid filesystem path + %) + EOE + } + : complete : { + test.options += -c + : final : - $* -c -p <>EOO + $* <>EOO : 1 name: foo version: 2.0.0 @@ -140,7 +165,7 @@ : non-standard : - $* -c -p <>EOO + $* <>EOO : 1 name: foo version: 2.0.0-x @@ -158,7 +183,7 @@ : non-standard-shortcut : - $* -c -p <>EOE != 0 + $* <>EOE != 0 : 1 name: foo version: 2.0.0-x @@ -171,7 +196,7 @@ : latest-snapshot : - $* -c -p <>EOO + $* <>EOO : 1 name: foo version: 2.0.0-a.0.z @@ -192,7 +217,7 @@ : incomplete : - $* -p <>EOF + $* <>EOF : 1 name: foo version: 2.0.0 @@ -200,6 +225,308 @@ license: LGPLv2 depends: bar == $ | libbaz ~$ | libbox ^$ | libfox [1.0 $) EOF + + : description-type + : + { + : absent + : + $* <>EOO + : 1 + name: libfoo + version: 2.0.0 + summary: Modern C++ parser + license: LGPLv2 + description: libfoo is a very modern C++ XML parser. + EOI + : 1 + name: libfoo + version: 2.0.0 + summary: Modern C++ parser + license: LGPLv2 + description: libfoo is a very modern C++ XML parser. + EOO + + : not-text + : + $* <>EOE != 0 + : 1 + name: libfoo + version: 2.0.0 + summary: Modern C++ parser + license: LGPLv2 + description: libfoo is a very modern C++ XML parser. + description-type: image/gif + EOI + stdin:7:19: error: invalid package description type: text type expected + EOE + + : deducing + : + { + : fail + : + $* <>EOE != 0 + : 1 + name: libfoo + version: 2.0.0 + summary: Modern C++ parser + license: LGPLv2 + description-file: README.rtf + EOI + stdin:6:19: error: invalid package description file: unknown text type + EOE + + : ignore-unknown + : + $* -i <>EOO + : 1 + name: libfoo + version: 2.0.0 + summary: Modern C++ parser + license: LGPLv2 + description-file: README.rtf + EOI + : 1 + name: libfoo + version: 2.0.0 + summary: Modern C++ parser + license: LGPLv2 + description-file: README.rtf + EOO + } + + : unknown + : + { + : fail + : + $* <>EOE != 0 + : 1 + name: libfoo + version: 2.0.0 + summary: Modern C++ parser + license: LGPLv2 + description: libfoo is a very modern C++ XML parser. + description-type: text/markdowns + EOI + stdin:7:19: error: invalid package description type: unknown text type + EOE + + : ignore + : + $* -i <>EOO + : 1 + name: libfoo + version: 2.0.0 + summary: Modern C++ parser + license: LGPLv2 + description: libfoo is a very modern C++ XML parser. + description-type: text/markdowns + EOI + : 1 + name: libfoo + version: 2.0.0 + summary: Modern C++ parser + license: LGPLv2 + description: libfoo is a very modern C++ XML parser. + description-type: text/markdowns + EOO + } + + : plain + : + { + : valid + : + $* <>EOO + : 1 + name: libfoo + version: 2.0.0 + summary: Modern C++ parser + license: LGPLv2 + description: libfoo is a very modern C++ XML parser. + description-type: text/plain + EOI + : 1 + name: libfoo + version: 2.0.0 + summary: Modern C++ parser + license: LGPLv2 + description: libfoo is a very modern C++ XML parser. + description-type: text/plain + EOO + + : invalid + : + $* <>EOE != 0 + : 1 + name: libfoo + version: 2.0.0 + summary: Modern C++ parser + license: LGPLv2 + description: libfoo is a very modern C++ XML parser. + description-type: text/plain; + EOI + stdin:7:19: error: invalid package description type: missing '=' + EOE + } + + : markdown + : + { + : default + : + $* <>EOO + : 1 + name: libfoo + version: 2.0.0 + summary: Modern C++ parser + license: LGPLv2 + description: libfoo is a very modern C++ XML parser. + description-type: text/markdown + EOI + : 1 + name: libfoo + version: 2.0.0 + summary: Modern C++ parser + license: LGPLv2 + description: libfoo is a very modern C++ XML parser. + description-type: text/markdown + EOO + + : gfm + : + $* <>EOO + : 1 + name: libfoo + version: 2.0.0 + summary: Modern C++ parser + license: LGPLv2 + description: libfoo is a very modern C++ XML parser. + description-type: text/markdown; variant=GFM + EOI + : 1 + name: libfoo + version: 2.0.0 + summary: Modern C++ parser + license: LGPLv2 + description: libfoo is a very modern C++ XML parser. + description-type: text/markdown; variant=GFM + EOO + + : common-mark + : + $* <>EOO + : 1 + name: libfoo + version: 2.0.0 + summary: Modern C++ parser + license: LGPLv2 + description: libfoo is a very modern C++ XML parser. + description-type: text/markdown; variant=CommonMark + EOI + : 1 + name: libfoo + version: 2.0.0 + summary: Modern C++ parser + license: LGPLv2 + description: libfoo is a very modern C++ XML parser. + description-type: text/markdown; variant=CommonMark + EOO + + : invalid-variant + : + { + : fail + : + $* <>EOE != 0 + : 1 + name: libfoo + version: 2.0.0 + summary: Modern C++ parser + license: LGPLv2 + description: libfoo is a very modern C++ XML parser. + description-type: text/markdown; variant=Original + EOI + stdin:7:19: error: invalid package description type: unknown text type + EOE + + : ignore + : + $* -i <>EOO + : 1 + name: libfoo + version: 2.0.0 + summary: Modern C++ parser + license: LGPLv2 + description: libfoo is a very modern C++ XML parser. + description-type: text/markdown; variant=Original + EOI + : 1 + name: libfoo + version: 2.0.0 + summary: Modern C++ parser + license: LGPLv2 + description: libfoo is a very modern C++ XML parser. + description-type: text/markdown; variant=Original + EOO + } + + : invalid-parameter + : + { + : fail + : + $* <>EOE != 0 + : 1 + name: libfoo + version: 2.0.0 + summary: Modern C++ parser + license: LGPLv2 + description: libfoo is a very modern C++ XML parser. + description-type: text/markdown; variants=GFM + EOI + stdin:7:19: error: invalid package description type: unknown text type + EOE + + : ignore + : + $* -i <>EOO + : 1 + name: libfoo + version: 2.0.0 + summary: Modern C++ parser + license: LGPLv2 + description: libfoo is a very modern C++ XML parser. + description-type: text/markdown; variants=GFM + EOI + : 1 + name: libfoo + version: 2.0.0 + summary: Modern C++ parser + license: LGPLv2 + description: libfoo is a very modern C++ XML parser. + description-type: text/markdown; variants=GFM + EOO + } + } + } + + : builds + : + { + : invalid + : + { + : empty + : + $* <"stdin:2:9: error: invalid package builds: class expression separator ':' expected" != 0 + : 1 + builds: default -gcc + EOI + } + } } : manifest-list @@ -219,6 +546,7 @@ license: BSD tags: c++, xml, parser, serializer, pull, streaming, modern description: libfoo is a very modern C++ XML parser. + description-type: text/plain changes: 1.2.3+2: applied upstream patch for critical bug bar changes: 1.2.3+1: applied upstream patch for critical bug foo url: http://www.example.org/projects/libfoo/; libfoo project page url @@ -323,23 +651,6 @@ fragment: ca602c2d46b0dca7a9ebc856871767b0ba6b74f3 EOF } - - : builds - : - { - : invalid - : - { - : empty - : - $* -pp <"stdin:4:9: error: invalid package builds: class expression separator ':' expected" != 0 - : 1 - sha256sum: a2b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 - : - builds: default -gcc - EOI - } - } } : repositories -- cgit v1.1