home · contact · privacy
Harden tests via more dangerous source file name.
authorChristian Heller <c.heller@plomlompom.de>
Wed, 18 Jan 2017 23:47:31 +0000 (00:47 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Wed, 18 Jan 2017 23:47:31 +0000 (00:47 +0100)
test.sh
test/test_files/feed.xml.ignoring
test/test_files/index.html.ignoring
test/test_files/te&quot;st.html.ignoring [new file with mode: 0644]
test/test_files/te&quot;st.md [new file with mode: 0644]
test/test_files/test.html.ignoring [deleted file]
test/test_files/test.md [deleted file]

diff --git a/test.sh b/test.sh
index c6e9c8f2aa089ff5421ae0584ca50e90d0af0f07..ab23cf8a299229e7ce9b96db75597bcd1671991c 100755 (executable)
--- a/test.sh
+++ b/test.sh
@@ -49,7 +49,7 @@ rm -rf "$generated_files_dir"
 working_dir=$(pwd)
 cd "$generated_files_dir"
 redo
-cp "$working_dir/$expected_files_dir"/test.md .
+cp "$working_dir/$expected_files_dir"/te\&quot\;st.md .
 redo
 cp "$working_dir/$expected_files_dir"/bar\ baz.md .
 redo
@@ -102,11 +102,6 @@ for file in "$expected_files_dir"/*.html.ignoring; do
   cat "$cmp_file" | \
     sed 's/[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}/IGNORE/g' \
     > "$generated_file"
-#  cat "$cmp_file" | \
-#    sed 's/[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}/IGNORE/g' | \
-#    sed 's/IGNORET[0-9]\{2\}:[0-9]\{2\}:[0-9]\{2\}Z/IGNORE/g' | \
-#    sed 's/IGNORE [0-9]\{2\}:[0-9]\{2\} (UTC)/IGNORE/g' \
-#    > "$generated_file"
   diff_test "$file" "$generated_file"
 done
 
index 29d2392f498fc4e2b4ad8a59af6945774f565383..f819425a9867cf7c16a770b69c89db59a2bd2315 100644 (file)
@@ -12,7 +12,7 @@
 <id>urn:uuid:IGNORE</id>
 <updated>IGNORE</updated>
 <published>IGNORE</published>
-<link href="http://example.org/test.html" rel="alternate" type="text/html" />
+<link href="http://example.org/te%26quot%3Bst.html" rel="alternate" type="text/html" />
 <content type="html">
 &lt;p&gt;foo&lt;/p&gt;
 &lt;h2 id=&quot;bar&quot;&gt;bar&lt;/h2&gt;
index 8643e6f97073dab64c0cdd9c49e775daedebae8f..29853751c142ef5b80586dafc792346b500591a5 100644 (file)
@@ -10,5 +10,5 @@ h1 { font-size: 2em; }
 <ul>
 <li><a href="foo.html">a title with some nasty characters: &amp;&lt;&gt;&quot;' %BODY%</a> (<time>IGNORE</time>)</li>
 <li><a href="bar%20baz.html">foo</a> (<time>IGNORE</time>)</li>
-<li><a href="test.html">foo <em>bar</em> <strong>baz</strong></a> (<time>IGNORE</time>)</li>
+<li><a href="te%26quot%3Bst.html">foo <em>bar</em> <strong>baz</strong></a> (<time>IGNORE</time>)</li>
 </ul>
\ No newline at end of file
diff --git a/test/test_files/te&quot;st.html.ignoring b/test/test_files/te&quot;st.html.ignoring
new file mode 100644 (file)
index 0000000..d751b3b
--- /dev/null
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<meta charset="UTF-8">
+<style type="text/css">
+h1 { font-size: 2em; }
+h2 { font-size: 1.5em; }
+h3 { font-size: 1.17em; }
+h4 { font-size: 1.12em; }
+h5 { font-size: .83em; }
+h6 { font-size: .75em; }
+header h1 { margin-bottom: 0.1em; }
+header p { margin: 0; }
+</style>
+<title>Yet another blog – foo bar baz</title>
+<a href="index.html">Yet another blog</a>
+<article>
+<header>
+<h1>foo <em>bar</em> <strong>baz</strong></h1>
+<p>created: <time>IGNORE</time> / last update: <time>IGNORE</time></p>
+</header>
+<p>foo</p>
+<h2 id="bar">bar</h2>
+<p>baz</p>
+<footer>
+Links back:
+<ul>
+</ul>
+</footer>
+</article>
\ No newline at end of file
diff --git a/test/test_files/te&quot;st.md b/test/test_files/te&quot;st.md
new file mode 100644 (file)
index 0000000..7bf4dce
--- /dev/null
@@ -0,0 +1,6 @@
+%foo *bar* **baz**
+foo
+
+# bar
+
+baz
diff --git a/test/test_files/test.html.ignoring b/test/test_files/test.html.ignoring
deleted file mode 100644 (file)
index d751b3b..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html>
-<meta charset="UTF-8">
-<style type="text/css">
-h1 { font-size: 2em; }
-h2 { font-size: 1.5em; }
-h3 { font-size: 1.17em; }
-h4 { font-size: 1.12em; }
-h5 { font-size: .83em; }
-h6 { font-size: .75em; }
-header h1 { margin-bottom: 0.1em; }
-header p { margin: 0; }
-</style>
-<title>Yet another blog – foo bar baz</title>
-<a href="index.html">Yet another blog</a>
-<article>
-<header>
-<h1>foo <em>bar</em> <strong>baz</strong></h1>
-<p>created: <time>IGNORE</time> / last update: <time>IGNORE</time></p>
-</header>
-<p>foo</p>
-<h2 id="bar">bar</h2>
-<p>baz</p>
-<footer>
-Links back:
-<ul>
-</ul>
-</footer>
-</article>
\ No newline at end of file
diff --git a/test/test_files/test.md b/test/test_files/test.md
deleted file mode 100644 (file)
index 7bf4dce..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-%foo *bar* **baz**
-foo
-
-# bar
-
-baz