Set "modified:" from "date:" when the latter was set from the filesystem (#2748)

Sets the `modified:` metadata from `date:` if the user asked us
to use the filesystem for determining timestamps. Fixes #2497

* Added tests (ab)using the HTML reader a bit

There seems to be no way to test this generically since we need
to produce a valid document with meta information to be able to
compare, hence I used the lightest reader out there to do the
parsing of the samples.

* Fixed tests for generators since there were 4 more articles
introduced to the test content directory.
This commit is contained in:
(GalaxyMaster) 2020-05-04 01:45:25 +10:00 committed by GitHub
commit e6df353302
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 113 additions and 0 deletions

View file

@ -0,0 +1,15 @@
<html>
<head>
<title>This is a super article !</title>
<meta name="tags" content="foo, bar, foobar" />
<meta name="date" content="2010-12-02 10:14" />
<meta name="category" content="yeah" />
<meta name="author" content="Alexis Métaireau" />
<meta name="summary" content="Summary and stuff" />
<meta name="custom_field" content="http://notmyidea.org" />
</head>
<body>
Multi-line metadata should be supported
as well as <strong>inline markup</strong>.
</body>
</html>

View file

@ -0,0 +1,16 @@
<html>
<head>
<title>This is a super article !</title>
<meta name="tags" content="foo, bar, foobar" />
<meta name="date" content="2010-12-02 10:14" />
<meta name="modified" content="2010-12-31 23:59" />
<meta name="category" content="yeah" />
<meta name="author" content="Alexis Métaireau" />
<meta name="summary" content="Summary and stuff" />
<meta name="custom_field" content="http://notmyidea.org" />
</head>
<body>
Multi-line metadata should be supported
as well as <strong>inline markup</strong>.
</body>
</html>

View file

@ -0,0 +1,15 @@
<html>
<head>
<title>This is a super article !</title>
<meta name="tags" content="foo, bar, foobar" />
<meta name="modified" content="2010-12-02 10:14" />
<meta name="category" content="yeah" />
<meta name="author" content="Alexis Métaireau" />
<meta name="summary" content="Summary and stuff" />
<meta name="custom_field" content="http://notmyidea.org" />
</head>
<body>
Multi-line metadata should be supported
as well as <strong>inline markup</strong>.
</body>
</html>

View file

@ -0,0 +1,14 @@
<html>
<head>
<title>This is a super article !</title>
<meta name="tags" content="foo, bar, foobar" />
<meta name="category" content="yeah" />
<meta name="author" content="Alexis Métaireau" />
<meta name="summary" content="Summary and stuff" />
<meta name="custom_field" content="http://notmyidea.org" />
</head>
<body>
Multi-line metadata should be supported
as well as <strong>inline markup</strong>.
</body>
</html>