From: Christian Heller Date: Wed, 18 Jan 2017 23:47:31 +0000 (+0100) Subject: Harden tests via more dangerous source file name. X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/%7B%7B%20web_path%20%7D%7D/decks/templates?a=commitdiff_plain;h=8e8f1f35cafef90dbcac0682c810b8aa4a07260e;p=redo-blog Harden tests via more dangerous source file name. --- diff --git a/test.sh b/test.sh index c6e9c8f..ab23cf8 100755 --- 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\"\;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 diff --git a/test/test_files/feed.xml.ignoring b/test/test_files/feed.xml.ignoring index 29d2392..f819425 100644 --- a/test/test_files/feed.xml.ignoring +++ b/test/test_files/feed.xml.ignoring @@ -12,7 +12,7 @@ urn:uuid:IGNORE IGNORE IGNORE - + <p>foo</p> <h2 id="bar">bar</h2> diff --git a/test/test_files/index.html.ignoring b/test/test_files/index.html.ignoring index 8643e6f..2985375 100644 --- a/test/test_files/index.html.ignoring +++ b/test/test_files/index.html.ignoring @@ -10,5 +10,5 @@ h1 { font-size: 2em; } \ No newline at end of file diff --git a/test/test_files/te"st.html.ignoring b/test/test_files/te"st.html.ignoring new file mode 100644 index 0000000..d751b3b --- /dev/null +++ b/test/test_files/te"st.html.ignoring @@ -0,0 +1,28 @@ + + + +Yet another blog – foo bar baz +Yet another blog +
+
+

foo bar baz

+

created: / last update:

+
+

foo

+

bar

+

baz

+
+Links back: +
    +
+
+
\ No newline at end of file diff --git a/test/test_files/te"st.md b/test/test_files/te"st.md new file mode 100644 index 0000000..7bf4dce --- /dev/null +++ b/test/test_files/te"st.md @@ -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 index d751b3b..0000000 --- a/test/test_files/test.html.ignoring +++ /dev/null @@ -1,28 +0,0 @@ - - - -Yet another blog – foo bar baz -Yet another blog -
-
-

foo bar baz

-

created: / last update:

-
-

foo

-

bar

-

baz

- -
\ No newline at end of file diff --git a/test/test_files/test.md b/test/test_files/test.md deleted file mode 100644 index 7bf4dce..0000000 --- a/test/test_files/test.md +++ /dev/null @@ -1,6 +0,0 @@ -%foo *bar* **baz** -foo - -# bar - -baz