summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/plugins.js10
-rw-r--r--test/plugins/blocks/index.js5
2 files changed, 15 insertions, 0 deletions
diff --git a/test/plugins.js b/test/plugins.js
index 3c60a20..43ce497 100644
--- a/test/plugins.js
+++ b/test/plugins.js
@@ -98,6 +98,16 @@ describe('Plugins', function () {
);
});
+ it('should correctly accept shortcuts', function(done) {
+ qdone(
+ books[0].template.renderString('$$hello$$')
+ .then(function(content) {
+ assert.equal(content, "testhellotest");
+ }),
+ done
+ );
+ });
+
it('should correctly extend template blocks with defined end', function(done) {
qdone(
books[0].template.renderString('{% test2 %}hello{% endtest2end %}')
diff --git a/test/plugins/blocks/index.js b/test/plugins/blocks/index.js
index b8f72fe..0a02ff7 100644
--- a/test/plugins/blocks/index.js
+++ b/test/plugins/blocks/index.js
@@ -3,6 +3,11 @@ var assert = require("assert");
module.exports = {
blocks: {
"test": {
+ shortcuts: {
+ parsers: ["markdown"],
+ start: "$$",
+ end: "$$"
+ },
process: function(blk) {
return "test"+blk.body+"test";
}