summaryrefslogtreecommitdiffstats
path: root/test/summary.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/summary.js')
-rw-r--r--test/summary.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/summary.js b/test/summary.js
index 08b9db8..9859693 100644
--- a/test/summary.js
+++ b/test/summary.js
@@ -59,6 +59,34 @@ describe('Summary / Table of contents', function() {
});
});
+ describe('Unicode summary', function() {
+ var book;
+
+ before(function() {
+ return mockSummary({
+ 'SUMMARY.md': '# Summary\n\n'
+ + '* [Hello](./hello world.md)\n'
+ + '* [Spanish](./Descripción del problema.md)\n\n'
+ + '* [Chinese](读了这本书.md)\n\n'
+ })
+ .then(function(_book) {
+ book = _book;
+ });
+ });
+
+ it('should accept article with spaces', function() {
+ should(book.summary.getArticle('hello world.md')).be.ok();
+ });
+
+ it('should accept article with chinese filename', function() {
+ should(book.summary.getArticle('读了这本书.md')).be.ok();
+ });
+
+ it('should accept article with accents', function() {
+ should(book.summary.getArticle('Descripción del problema.md')).be.ok();
+ });
+ });
+
describe('Non-empty summary list', function() {
var book;