summaryrefslogtreecommitdiffstats
path: root/vendor/mdbook/tests/dummy_book/src
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
commit698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch)
tree173a775858bd501c378080a10dca74132f05bc50 /vendor/mdbook/tests/dummy_book/src
parentInitial commit. (diff)
downloadrustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz
rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/mdbook/tests/dummy_book/src')
-rw-r--r--vendor/mdbook/tests/dummy_book/src/README.md5
-rw-r--r--vendor/mdbook/tests/dummy_book/src/SUMMARY.md22
-rw-r--r--vendor/mdbook/tests/dummy_book/src/conclusion.md20
-rw-r--r--vendor/mdbook/tests/dummy_book/src/example.rs6
-rw-r--r--vendor/mdbook/tests/dummy_book/src/first/duplicate-headers.md9
-rw-r--r--vendor/mdbook/tests/dummy_book/src/first/includes.md3
-rw-r--r--vendor/mdbook/tests/dummy_book/src/first/index.md5
-rw-r--r--vendor/mdbook/tests/dummy_book/src/first/markdown.md29
-rw-r--r--vendor/mdbook/tests/dummy_book/src/first/nested-test-with-anchors.rs11
-rw-r--r--vendor/mdbook/tests/dummy_book/src/first/nested-test.rs1
-rw-r--r--vendor/mdbook/tests/dummy_book/src/first/nested.md31
-rw-r--r--vendor/mdbook/tests/dummy_book/src/first/no-headers.md5
-rw-r--r--vendor/mdbook/tests/dummy_book/src/first/partially-included-test-with-anchors.rs11
-rw-r--r--vendor/mdbook/tests/dummy_book/src/first/partially-included-test.rs7
-rw-r--r--vendor/mdbook/tests/dummy_book/src/first/recursive.md2
-rw-r--r--vendor/mdbook/tests/dummy_book/src/first/unicode.md21
-rw-r--r--vendor/mdbook/tests/dummy_book/src/intro.md3
-rw-r--r--vendor/mdbook/tests/dummy_book/src/second.md5
-rw-r--r--vendor/mdbook/tests/dummy_book/src/second/nested.md16
19 files changed, 212 insertions, 0 deletions
diff --git a/vendor/mdbook/tests/dummy_book/src/README.md b/vendor/mdbook/tests/dummy_book/src/README.md
new file mode 100644
index 000000000..7d946e35d
--- /dev/null
+++ b/vendor/mdbook/tests/dummy_book/src/README.md
@@ -0,0 +1,5 @@
+# Dummy Book
+
+This file is just here to cause the index preprocessor to run.
+
+Does a pretty good job, too. \ No newline at end of file
diff --git a/vendor/mdbook/tests/dummy_book/src/SUMMARY.md b/vendor/mdbook/tests/dummy_book/src/SUMMARY.md
new file mode 100644
index 000000000..49b64a545
--- /dev/null
+++ b/vendor/mdbook/tests/dummy_book/src/SUMMARY.md
@@ -0,0 +1,22 @@
+# Summary
+
+[Dummy Book](README.md)
+
+---
+
+[Introduction](intro.md)
+
+- [First Chapter](first/index.md)
+ - [Nested Chapter](first/nested.md)
+ - [Includes](first/includes.md)
+ - [Recursive](first/recursive.md)
+ - [Markdown](first/markdown.md)
+ - [Unicode](first/unicode.md)
+ - [No Headers](first/no-headers.md)
+ - [Duplicate Headers](first/duplicate-headers.md)
+- [Second Chapter](second.md)
+ - [Nested Chapter](second/nested.md)
+
+---
+
+[Conclusion](conclusion.md)
diff --git a/vendor/mdbook/tests/dummy_book/src/conclusion.md b/vendor/mdbook/tests/dummy_book/src/conclusion.md
new file mode 100644
index 000000000..ba121c1fd
--- /dev/null
+++ b/vendor/mdbook/tests/dummy_book/src/conclusion.md
@@ -0,0 +1,20 @@
+# Conclusion
+
+<p>
+<!--secret secret-->
+I put &lt;HTML&gt; in here!<br/>
+</p>
+<script type="text/javascript" >
+// I probably shouldn't do this
+if (3 < 5 > 10)
+{
+ alert("The sky is falling!");
+}
+</script >
+<style >
+/*
+css looks, like this {
+ foo: < 3 <bar >
+}
+*/
+</style>
diff --git a/vendor/mdbook/tests/dummy_book/src/example.rs b/vendor/mdbook/tests/dummy_book/src/example.rs
new file mode 100644
index 000000000..6b49705c1
--- /dev/null
+++ b/vendor/mdbook/tests/dummy_book/src/example.rs
@@ -0,0 +1,6 @@
+fn main() {
+ println!("Hello World!");
+#
+# // You can even hide lines! :D
+# println!("I am hidden! Expand the code snippet to see me");
+}
diff --git a/vendor/mdbook/tests/dummy_book/src/first/duplicate-headers.md b/vendor/mdbook/tests/dummy_book/src/first/duplicate-headers.md
new file mode 100644
index 000000000..83522b440
--- /dev/null
+++ b/vendor/mdbook/tests/dummy_book/src/first/duplicate-headers.md
@@ -0,0 +1,9 @@
+# Duplicate headers
+
+This page validates behaviour of duplicate headers.
+
+# Header Text
+
+# Header Text
+
+# header-text
diff --git a/vendor/mdbook/tests/dummy_book/src/first/includes.md b/vendor/mdbook/tests/dummy_book/src/first/includes.md
new file mode 100644
index 000000000..a5a2fef1f
--- /dev/null
+++ b/vendor/mdbook/tests/dummy_book/src/first/includes.md
@@ -0,0 +1,3 @@
+# Includes
+
+{{#include ../SUMMARY.md::}} \ No newline at end of file
diff --git a/vendor/mdbook/tests/dummy_book/src/first/index.md b/vendor/mdbook/tests/dummy_book/src/first/index.md
new file mode 100644
index 000000000..200672b9c
--- /dev/null
+++ b/vendor/mdbook/tests/dummy_book/src/first/index.md
@@ -0,0 +1,5 @@
+# First Chapter
+
+more text.
+
+## Some Section
diff --git a/vendor/mdbook/tests/dummy_book/src/first/markdown.md b/vendor/mdbook/tests/dummy_book/src/first/markdown.md
new file mode 100644
index 000000000..d65d3d389
--- /dev/null
+++ b/vendor/mdbook/tests/dummy_book/src/first/markdown.md
@@ -0,0 +1,29 @@
+# Markdown tests
+
+Tests for some markdown output.
+
+## Tables
+
+| foo | bar |
+| --- | --- |
+| baz | bim |
+
+## Footnotes
+
+Footnote example[^1], or with a word[^word].
+
+[^1]: This is a footnote.
+
+[^word]: A longer footnote.
+ With multiple lines.
+ Third line.
+
+## Strikethrough
+
+~~strikethrough example~~
+
+## Tasklisks
+
+- [X] Apples
+- [X] Broccoli
+- [ ] Carrots
diff --git a/vendor/mdbook/tests/dummy_book/src/first/nested-test-with-anchors.rs b/vendor/mdbook/tests/dummy_book/src/first/nested-test-with-anchors.rs
new file mode 100644
index 000000000..783ab14de
--- /dev/null
+++ b/vendor/mdbook/tests/dummy_book/src/first/nested-test-with-anchors.rs
@@ -0,0 +1,11 @@
+// The next line will cause a `testing` test to fail if the anchor feature is broken in such a way
+// that the whole file gets mistakenly included.
+assert!(!$TEST_STATUS);
+
+// ANCHOR: myanchor
+// ANCHOR: unendinganchor
+// The next line will cause a `rendered_output` test to fail if the anchor feature is broken in
+// such a way that the content between anchors isn't included.
+// unique-string-for-anchor-test
+assert!($TEST_STATUS);
+// ANCHOR_END: myanchor
diff --git a/vendor/mdbook/tests/dummy_book/src/first/nested-test.rs b/vendor/mdbook/tests/dummy_book/src/first/nested-test.rs
new file mode 100644
index 000000000..2bc46e01a
--- /dev/null
+++ b/vendor/mdbook/tests/dummy_book/src/first/nested-test.rs
@@ -0,0 +1 @@
+assert!($TEST_STATUS);
diff --git a/vendor/mdbook/tests/dummy_book/src/first/nested.md b/vendor/mdbook/tests/dummy_book/src/first/nested.md
new file mode 100644
index 000000000..ae90763a0
--- /dev/null
+++ b/vendor/mdbook/tests/dummy_book/src/first/nested.md
@@ -0,0 +1,31 @@
+# Nested Chapter
+
+This file has some testable code.
+
+```rust
+assert!($TEST_STATUS);
+```
+
+## Some Section
+
+```rust
+{{#include nested-test.rs}}
+```
+
+## Anchors include the part of a file between special comments
+
+```rust
+{{#include nested-test-with-anchors.rs:myanchor}}
+```
+
+## Rustdoc include adds the rest of the file as hidden
+
+```rust
+{{#rustdoc_include partially-included-test.rs:5:7}}
+```
+
+## Rustdoc include works with anchors too
+
+```rust
+{{#rustdoc_include partially-included-test-with-anchors.rs:rustdoc-include-anchor}}
+```
diff --git a/vendor/mdbook/tests/dummy_book/src/first/no-headers.md b/vendor/mdbook/tests/dummy_book/src/first/no-headers.md
new file mode 100644
index 000000000..5d799aa68
--- /dev/null
+++ b/vendor/mdbook/tests/dummy_book/src/first/no-headers.md
@@ -0,0 +1,5 @@
+Capybara capybara capybara.
+
+Capybara capybara capybara.
+
+ThisLongWordIsIncludedSoWeCanCheckThatSufficientlyLongWordsAreOmittedFromTheSearchIndex.
diff --git a/vendor/mdbook/tests/dummy_book/src/first/partially-included-test-with-anchors.rs b/vendor/mdbook/tests/dummy_book/src/first/partially-included-test-with-anchors.rs
new file mode 100644
index 000000000..17b6afeff
--- /dev/null
+++ b/vendor/mdbook/tests/dummy_book/src/first/partially-included-test-with-anchors.rs
@@ -0,0 +1,11 @@
+fn some_other_function() {
+ // ANCHOR: unused-anchor-that-should-be-stripped
+ assert!($TEST_STATUS);
+ // ANCHOR_END: unused-anchor-that-should-be-stripped
+}
+
+// ANCHOR: rustdoc-include-anchor
+fn main() {
+ some_other_function();
+}
+// ANCHOR_END: rustdoc-include-anchor
diff --git a/vendor/mdbook/tests/dummy_book/src/first/partially-included-test.rs b/vendor/mdbook/tests/dummy_book/src/first/partially-included-test.rs
new file mode 100644
index 000000000..1f8421b54
--- /dev/null
+++ b/vendor/mdbook/tests/dummy_book/src/first/partially-included-test.rs
@@ -0,0 +1,7 @@
+fn some_function() {
+ assert!($TEST_STATUS);
+}
+
+fn main() {
+ some_function();
+}
diff --git a/vendor/mdbook/tests/dummy_book/src/first/recursive.md b/vendor/mdbook/tests/dummy_book/src/first/recursive.md
new file mode 100644
index 000000000..cb82a52f1
--- /dev/null
+++ b/vendor/mdbook/tests/dummy_book/src/first/recursive.md
@@ -0,0 +1,2 @@
+Around the world, around the world
+{{#include recursive.md}}
diff --git a/vendor/mdbook/tests/dummy_book/src/first/unicode.md b/vendor/mdbook/tests/dummy_book/src/first/unicode.md
new file mode 100644
index 000000000..160cc367d
--- /dev/null
+++ b/vendor/mdbook/tests/dummy_book/src/first/unicode.md
@@ -0,0 +1,21 @@
+# Unicode stress tests
+
+Please be careful editing, this contains carefully crafted characters.
+
+Two byte character: spatiëring
+
+Combining character: spatiëring
+
+Three byte character: 书こんにちは
+
+Four byte character: 𐌀‮𐌁‮𐌂‮𐌃‮𐌄‮𐌅‮𐌆‮𐌇‮𐌈‬
+
+Right-to-left: مرحبا
+
+Emoticons: 🔊 😍 💜 1️⃣
+
+right-to-left mark: hello באמת!‏
+
+
+Zalgo: ǫ̛̖̱̗̝͈̋͒͋̏ͥͫ̒̆ͩ̏͌̾͊͐ͪ̾̚
+
diff --git a/vendor/mdbook/tests/dummy_book/src/intro.md b/vendor/mdbook/tests/dummy_book/src/intro.md
new file mode 100644
index 000000000..1990ef58c
--- /dev/null
+++ b/vendor/mdbook/tests/dummy_book/src/intro.md
@@ -0,0 +1,3 @@
+# Introduction
+
+Here's some interesting text... \ No newline at end of file
diff --git a/vendor/mdbook/tests/dummy_book/src/second.md b/vendor/mdbook/tests/dummy_book/src/second.md
new file mode 100644
index 000000000..adf4fca62
--- /dev/null
+++ b/vendor/mdbook/tests/dummy_book/src/second.md
@@ -0,0 +1,5 @@
+# Second Chapter
+
+This makes sure you can insert runnable Rust files.
+
+{{#playground example.rs}}
diff --git a/vendor/mdbook/tests/dummy_book/src/second/nested.md b/vendor/mdbook/tests/dummy_book/src/second/nested.md
new file mode 100644
index 000000000..faf1187ff
--- /dev/null
+++ b/vendor/mdbook/tests/dummy_book/src/second/nested.md
@@ -0,0 +1,16 @@
+# Testing relative links for the print page
+
+When we link to [the first section](../first/nested.md), it should work on
+both the print page and the non-print page.
+
+A [fragment link](#some-section) should work.
+
+Link [outside](../../std/foo/bar.html).
+
+![Some image](../images/picture.png)
+
+<a href="../first/markdown.md">HTML Link</a>
+
+<img src="../images/picture.png" alt="raw html">
+
+## Some section