From 483eb2f56657e8e7f419ab1a4fab8dce9ade8609 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 20:24:20 +0200 Subject: Adding upstream version 14.2.21. Signed-off-by: Daniel Baumann --- src/boost/tools/quickbook/test/snippets/Jamfile.v2 | 18 ++++++++++ .../tools/quickbook/test/snippets/pass_thru.cpp | 33 +++++++++++++++++++ .../tools/quickbook/test/snippets/pass_thru.gold | 35 ++++++++++++++++++++ .../quickbook/test/snippets/pass_thru.gold-html | 38 ++++++++++++++++++++++ .../tools/quickbook/test/snippets/pass_thru.py | 13 ++++++++ .../quickbook/test/snippets/pass_thru.quickbook | 12 +++++++ .../test/snippets/unbalanced_snippet1-1_5.gold | 10 ++++++ .../snippets/unbalanced_snippet1-1_5.gold-html | 13 ++++++++ .../snippets/unbalanced_snippet1-1_5.quickbook | 8 +++++ .../unbalanced_snippet1-1_6-fail.quickbook | 7 ++++ .../test/snippets/unbalanced_snippet1.cpp | 11 +++++++ .../unbalanced_snippet2-1_6-fail.quickbook | 5 +++ .../test/snippets/unbalanced_snippet2.cpp | 9 +++++ 13 files changed, 212 insertions(+) create mode 100644 src/boost/tools/quickbook/test/snippets/Jamfile.v2 create mode 100644 src/boost/tools/quickbook/test/snippets/pass_thru.cpp create mode 100644 src/boost/tools/quickbook/test/snippets/pass_thru.gold create mode 100644 src/boost/tools/quickbook/test/snippets/pass_thru.gold-html create mode 100644 src/boost/tools/quickbook/test/snippets/pass_thru.py create mode 100644 src/boost/tools/quickbook/test/snippets/pass_thru.quickbook create mode 100644 src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.gold create mode 100644 src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.gold-html create mode 100644 src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.quickbook create mode 100644 src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_6-fail.quickbook create mode 100644 src/boost/tools/quickbook/test/snippets/unbalanced_snippet1.cpp create mode 100644 src/boost/tools/quickbook/test/snippets/unbalanced_snippet2-1_6-fail.quickbook create mode 100644 src/boost/tools/quickbook/test/snippets/unbalanced_snippet2.cpp (limited to 'src/boost/tools/quickbook/test/snippets') diff --git a/src/boost/tools/quickbook/test/snippets/Jamfile.v2 b/src/boost/tools/quickbook/test/snippets/Jamfile.v2 new file mode 100644 index 00000000..6765dff9 --- /dev/null +++ b/src/boost/tools/quickbook/test/snippets/Jamfile.v2 @@ -0,0 +1,18 @@ +# +# Copyright (c) 2011 Daniel James +# +# Distributed under the Boost Software License, Version 1.0. (See +# accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) +# + +project quickbook/test/snippets ; + +import quickbook-testing : quickbook-test quickbook-error-test ; + +test-suite quickbook.test : + [ quickbook-test pass_thru ] + [ quickbook-test unbalanced_snippet1-1_5 ] + [ quickbook-error-test unbalanced_snippet1-1_6-fail ] + [ quickbook-error-test unbalanced_snippet2-1_6-fail ] + ; diff --git a/src/boost/tools/quickbook/test/snippets/pass_thru.cpp b/src/boost/tools/quickbook/test/snippets/pass_thru.cpp new file mode 100644 index 00000000..c5c120a1 --- /dev/null +++ b/src/boost/tools/quickbook/test/snippets/pass_thru.cpp @@ -0,0 +1,33 @@ +// clang-format off + +//[foo_cpp_copyright +/*============================================================================= + Copyright (c) 2011 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +//] + +//[foo_cpp +struct Foo{ + + Foo()//=; +//<- + : x( 10 ) + {} +//-> + +//<- + int x; +//-> +}; + +/*= +int main() +{ + Foo x; +} +*/ +//] diff --git a/src/boost/tools/quickbook/test/snippets/pass_thru.gold b/src/boost/tools/quickbook/test/snippets/pass_thru.gold new file mode 100644 index 00000000..dde5deb1 --- /dev/null +++ b/src/boost/tools/quickbook/test/snippets/pass_thru.gold @@ -0,0 +1,35 @@ + + +
+ Pass thru test + +/*============================================================================= + Copyright (c) 2011 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + + + +struct Foo{ + + Foo(); + +}; + + +int main() +{ + Foo x; +} + + + +def foo: + print('foo') + + +
diff --git a/src/boost/tools/quickbook/test/snippets/pass_thru.gold-html b/src/boost/tools/quickbook/test/snippets/pass_thru.gold-html new file mode 100644 index 00000000..ba0237dd --- /dev/null +++ b/src/boost/tools/quickbook/test/snippets/pass_thru.gold-html @@ -0,0 +1,38 @@ + + + + +

+ Pass thru test +

+

+

/*=============================================================================
+    Copyright (c) 2011 Daniel James
+
+    Use, modification and distribution is subject to the Boost Software
+    License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+    http://www.boost.org/LICENSE_1_0.txt)
+=============================================================================*/
+
+

+

+

struct Foo{
+
+  Foo();
+
+};
+
+
+int main()
+{
+    Foo x;
+}
+
+

+

+

def foo:
+    print('foo')
+
+

+ + diff --git a/src/boost/tools/quickbook/test/snippets/pass_thru.py b/src/boost/tools/quickbook/test/snippets/pass_thru.py new file mode 100644 index 00000000..412cee42 --- /dev/null +++ b/src/boost/tools/quickbook/test/snippets/pass_thru.py @@ -0,0 +1,13 @@ +# Copyright (c) 2011 Daniel James +# +# Use, modification and distribution is subject to the Boost Software +# License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +#[foo_py +def foo: + #=print('foo') + #<- + print('bar') + #-> +#] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/snippets/pass_thru.quickbook b/src/boost/tools/quickbook/test/snippets/pass_thru.quickbook new file mode 100644 index 00000000..7e831947 --- /dev/null +++ b/src/boost/tools/quickbook/test/snippets/pass_thru.quickbook @@ -0,0 +1,12 @@ +[article Pass thru test +[quickbook 1.5] +] + +[import pass_thru.cpp] +[import pass_thru.py] + +[foo_cpp_copyright] + +[foo_cpp] + +[foo_py] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.gold b/src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.gold new file mode 100644 index 00000000..1f9115c0 --- /dev/null +++ b/src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.gold @@ -0,0 +1,10 @@ + + +
+ Unbalanced snippet fail test 1 + +int main() {} + + +
diff --git a/src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.gold-html b/src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.gold-html new file mode 100644 index 00000000..af90d9d3 --- /dev/null +++ b/src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.gold-html @@ -0,0 +1,13 @@ + + + + +

+ Unbalanced snippet fail test 1 +

+

+

int main() {}
+
+

+ + diff --git a/src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.quickbook b/src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.quickbook new file mode 100644 index 00000000..7fdde6af --- /dev/null +++ b/src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.quickbook @@ -0,0 +1,8 @@ +[article Unbalanced snippet fail test 1 +[quickbook 1.5] +] + +[import unbalanced_snippet1.cpp] +[import unbalanced_snippet2.cpp] + +[unclosed] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_6-fail.quickbook b/src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_6-fail.quickbook new file mode 100644 index 00000000..c2fb98ec --- /dev/null +++ b/src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_6-fail.quickbook @@ -0,0 +1,7 @@ +[article Unbalanced snippet fail test 1 +[quickbook 1.6] +] + +[import unbalanced_snippet1.cpp] + +[unclosed] \ No newline at end of file diff --git a/src/boost/tools/quickbook/test/snippets/unbalanced_snippet1.cpp b/src/boost/tools/quickbook/test/snippets/unbalanced_snippet1.cpp new file mode 100644 index 00000000..ee598391 --- /dev/null +++ b/src/boost/tools/quickbook/test/snippets/unbalanced_snippet1.cpp @@ -0,0 +1,11 @@ +/*============================================================================= + Copyright (c) 2011 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +//[unclosed + +int main() {} diff --git a/src/boost/tools/quickbook/test/snippets/unbalanced_snippet2-1_6-fail.quickbook b/src/boost/tools/quickbook/test/snippets/unbalanced_snippet2-1_6-fail.quickbook new file mode 100644 index 00000000..a06a1644 --- /dev/null +++ b/src/boost/tools/quickbook/test/snippets/unbalanced_snippet2-1_6-fail.quickbook @@ -0,0 +1,5 @@ +[article Unbalanced snippet fail test 2 +[quickbook 1.6] +] + +[import unbalanced_snippet2.cpp] diff --git a/src/boost/tools/quickbook/test/snippets/unbalanced_snippet2.cpp b/src/boost/tools/quickbook/test/snippets/unbalanced_snippet2.cpp new file mode 100644 index 00000000..b2fcb247 --- /dev/null +++ b/src/boost/tools/quickbook/test/snippets/unbalanced_snippet2.cpp @@ -0,0 +1,9 @@ +//] + +/*============================================================================= + Copyright (c) 2011 Daniel James + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ -- cgit v1.2.3