-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add some files that we can use to test the functionality. Signed-off-by: Ruth Fuchss <[email protected]>
- Loading branch information
Showing
4 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/bash | ||
set -ex | ||
|
||
source sp-tests/get-installation-directory.sh | ||
|
||
# Copy the test files | ||
cp sp-tests/testfiles/test-md.md testdir/$install_directory/ | ||
cp sp-tests/testfiles/test-rst.rst testdir/$install_directory/ | ||
|
||
# Include the files in the toctree | ||
if ! grep -Fxq " test-md" testdir/$install_directory/index.rst | ||
then | ||
echo " test-md" >> testdir/$install_directory/index.rst | ||
echo " test-rst" >> testdir/$install_directory/index.rst | ||
fi | ||
|
||
# Build the documentation | ||
cd testdir/$install_directory | ||
make html | ||
|
||
# Test the output | ||
if ! grep -Fq "A documentation starter-pack" _build/test-md/index.html || \ | ||
! grep -Fq "A documentation starter-pack" _build/test-rst/index.html | ||
then | ||
echo "Related links don't work (in RST or Markdown)" | ||
exit 1 | ||
fi | ||
|
||
if ! grep -Fq "Open Documentation Hour" _build/test-md/index.html || \ | ||
! grep -Fq "Open Documentation Hour" _build/test-rst/index.html | ||
then | ||
echo "Discourse links don't work (in RST or Markdown)" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
discourse: 42771 | ||
relatedlinks: https://github.com/canonical/sphinx-docs-starter-pack | ||
--- | ||
|
||
# Markdown test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
:discourse: 42771 | ||
:relatedlinks: https://github.com/canonical/sphinx-docs-starter-pack | ||
|
||
reST test | ||
========= |