From 8e8f1f35cafef90dbcac0682c810b8aa4a07260e Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Thu, 19 Jan 2017 00:47:31 +0100 Subject: [PATCH] Harden tests via more dangerous source file name. --- test.sh | 7 +------ test/test_files/feed.xml.ignoring | 2 +- test/test_files/index.html.ignoring | 2 +- .../{test.html.ignoring => te"st.html.ignoring} | 0 test/test_files/{test.md => te"st.md} | 0 5 files changed, 3 insertions(+), 8 deletions(-) rename test/test_files/{test.html.ignoring => te"st.html.ignoring} (100%) rename test/test_files/{test.md => te"st.md} (100%) 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/test.html.ignoring b/test/test_files/te"st.html.ignoring similarity index 100% rename from test/test_files/test.html.ignoring rename to test/test_files/te"st.html.ignoring diff --git a/test/test_files/test.md b/test/test_files/te"st.md similarity index 100% rename from test/test_files/test.md rename to test/test_files/te"st.md -- 2.30.2