Commit bb66d532 authored by Joost van Pinxten's avatar Joost van Pinxten

Add two cases to the cite_details test feature for the raw bibtex entry.

1. When the raw bibtex entry should be output
2. When Liquid tags inside the bibtex entry should be executed
parent d072f25b
...@@ -29,6 +29,63 @@ Feature: Citations ...@@ -29,6 +29,63 @@ Feature: Citations
And the "_site/scholar.html" file should exist And the "_site/scholar.html" file should exist
And I should see "Details</a>" in "_site/scholar.html" And I should see "Details</a>" in "_site/scholar.html"
@tags @bibliography @config @template @cite_details
Scenario: Raw bibtex template in details page
Given I have a scholar configuration with:
| key | value |
| source | ./_bibliography |
| bibliography_template | {{entry.bibtex}} |
| details_layout | details.html |
| use_raw_bibtex_entry | true |
And I have a "_bibliography" directory
And I have a file "_bibliography/references.bib":
"""
@book{a,
title = {{"b" | prepend: "a"}}
}
"""
And I have a "_layouts" directory
And I have a file "_layouts/details.html":
"""
---
---
{{ page.entry.bibtex }}
"""
When I run jekyll
Then the _site directory should exist
And the "_site/bibliography/a.html" file should exist
And I should see """{{"b" prepend: "a"}}""" in "_site/bibliography/a.html"
And I should not see "ab" in "_site/bibliography/a.html"
@tags @bibliography @config @template @cite_details
Scenario: Raw bibtex template in details page
Given I have a scholar configuration with:
| key | value |
| source | ./_bibliography |
| bibliography_template | {{entry.bibtex}} |
| details_layout | details.html |
And I have a "_bibliography" directory
And I have a file "_bibliography/references.bib":
"""
@book{a,
title = {{"b" | prepend: "a"}}
}
"""
And I have a "_layouts" directory
And I have a file "_layouts/details.html":
"""
---
---
{{ page.entry.bibtex }}
"""
When I run jekyll
Then the _site directory should exist
And the "_site/bibliography/a.html" file should exist
And I should not see """{{"b" prepend: "a"}}""" in "_site/bibliography/a.html"
And I should see "ab" in "_site/bibliography/a.html"
@tags @cite_details @tags @cite_details
Scenario: A Simple Cite Details Link With A Text Argument Scenario: A Simple Cite Details Link With A Text Argument
Given I have a scholar configuration with: Given I have a scholar configuration with:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment