mirror of
https://github.com/jekyll/jekyll.git
synced 2026-01-09 15:08:08 -05:00
generated site tests: put the static file mod time through a date filter
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
---
|
||||
---
|
||||
{% for file in site.static_files %}
|
||||
- {{ file.path }} last edited at {{ file.modified_time }} with extname {{ file.extname }}{% endfor %}
|
||||
- {{ file.path }} last edited at {{ file.modified_time | date:"%H:%m" }} with extname {{ file.extname }}{% endfor %}
|
||||
|
||||
@@ -44,11 +44,12 @@ class TestGeneratedSite < JekyllUnitTest
|
||||
end
|
||||
|
||||
should "print a nice list of static files" do
|
||||
time_regexp = "\\d+:\\d+"
|
||||
expected_output = Regexp.new <<-OUTPUT
|
||||
- /css/screen.css last edited at \\d+ with extname .css
|
||||
- /pgp.key last edited at \\d+ with extname .key
|
||||
- /products.yml last edited at \\d+ with extname .yml
|
||||
- /symlink-test/symlinked-dir/screen.css last edited at \\d+ 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
|
||||
|
||||
Reference in New Issue
Block a user