TestGeneratedSite: add "|" to preserve newline

adding a pipe character ('|') preserves the formatting of
'expected_output' with a trailing newline bit, in windows.
This commit is contained in:
Ashwin Maroli 2016-11-02 12:18:05 +05:30
parent a1bdd31249
commit 0c234c90a9
1 changed files with 6 additions and 4 deletions

View File

@ -50,11 +50,13 @@ class TestGeneratedSite < JekyllUnitTest
should "print a nice list of static files" do
time_regexp = "\\d+:\\d+"
#
# adding a pipe character at the beginning preserves formatting with newlines
expected_output = Regexp.new <<-OUTPUT
- /css/screen.css last edited at #{time_regexp} with extname .css
- /pgp.key last edited at #{time_regexp} with extname .key
- /products.yml last edited at #{time_regexp} with extname .yml
- /symlink-test/symlinked-dir/screen.css last edited at #{time_regexp} with extname .css
| - /css/screen.css last edited at #{time_regexp} with extname .css
- /pgp.key last edited at #{time_regexp} with extname .key
- /products.yml last edited at #{time_regexp} with extname .yml
- /symlink-test/symlinked-dir/screen.css last edited at #{time_regexp} with extname .css
OUTPUT
assert_match expected_output, File.read(dest_dir("static_files.html"))
end