summaryrefslogtreecommitdiffstats
path: root/test/page.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/page.js')
-rw-r--r--test/page.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/page.js b/test/page.js
index 52d86d8..9afec1c 100644
--- a/test/page.js
+++ b/test/page.js
@@ -29,6 +29,8 @@ describe('Page', function() {
'variables/page/title.md': '{{ page.title }}',
'variables/page/previous.md': '{{ page.previous.title }} {{ page.previous.path }}',
'variables/page/next.md': '{{ page.next.title }} {{ page.next.path }}',
+ 'variables/page/dir/ltr.md': 'This is english: {{ page.dir }}',
+ 'variables/page/dir/rtl.md': 'بسيطة {{ page.dir }}',
'GLOSSARY.md': '# Glossary\n\n\n## abracadabra\n\nthis is the description'
}, [
@@ -312,6 +314,20 @@ describe('Page', function() {
return page.toHTML(output)
.should.be.fulfilledWith('<p>Test Variables variables/page/title.md</p>\n');
});
+
+ describe('page.dir', function() {
+ it('should detect ltr', function() {
+ var page = book.addPage('variables/page/dir/ltr.md');
+ return page.toHTML(output)
+ .should.be.fulfilledWith('<p>This is english: ltr</p>\n');
+ });
+
+ it('should detect rtl', function() {
+ var page = book.addPage('variables/page/dir/rtl.md');
+ return page.toHTML(output)
+ .should.be.fulfilledWith('<p>&#x628;&#x633;&#x64A;&#x637;&#x629; rtl</p>\n');
+ });
+ });
});
describe('Annotations / Glossary', function() {