diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-01-21 10:17:58 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2015-01-21 10:17:58 +0100 |
commit | 9f9265ad7620059c2ee6ec829235269a6ee02946 (patch) | |
tree | 7ec49e058a262f2d3b3d4b4b55e5f4f081b1d7d9 /test | |
parent | a5ebbc34c7333880b5a194cbe26041029e2cdbfb (diff) | |
download | gitbook-9f9265ad7620059c2ee6ec829235269a6ee02946.zip gitbook-9f9265ad7620059c2ee6ec829235269a6ee02946.tar.gz gitbook-9f9265ad7620059c2ee6ec829235269a6ee02946.tar.bz2 |
Add asciidoc support
Diffstat (limited to 'test')
-rw-r--r-- | test/fixtures/test3/README.adoc | 4 | ||||
-rw-r--r-- | test/fixtures/test3/SUMMARY.adoc | 5 | ||||
-rw-r--r-- | test/fixtures/test3/test.adoc | 0 | ||||
-rw-r--r-- | test/fixtures/test3/test1.adoc | 0 | ||||
-rw-r--r-- | test/fixtures/test3/test3.adoc | 0 | ||||
-rw-r--r-- | test/helper.js | 6 | ||||
-rw-r--r-- | test/parsing.js | 5 |
7 files changed, 19 insertions, 1 deletions
diff --git a/test/fixtures/test3/README.adoc b/test/fixtures/test3/README.adoc new file mode 100644 index 0000000..ea295ee --- /dev/null +++ b/test/fixtures/test3/README.adoc @@ -0,0 +1,4 @@ += My Book + +Test description + diff --git a/test/fixtures/test3/SUMMARY.adoc b/test/fixtures/test3/SUMMARY.adoc new file mode 100644 index 0000000..29fcb65 --- /dev/null +++ b/test/fixtures/test3/SUMMARY.adoc @@ -0,0 +1,5 @@ += Summary + +. link:test.adoc[Chapter 1] +.. link:test1.adoc[Article 1] +. link:test2.adoc[Chapter 2] diff --git a/test/fixtures/test3/test.adoc b/test/fixtures/test3/test.adoc new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/fixtures/test3/test.adoc diff --git a/test/fixtures/test3/test1.adoc b/test/fixtures/test3/test1.adoc new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/fixtures/test3/test1.adoc diff --git a/test/fixtures/test3/test3.adoc b/test/fixtures/test3/test3.adoc new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/fixtures/test3/test3.adoc diff --git a/test/helper.js b/test/helper.js index 74f461a..f29b3c7 100644 --- a/test/helper.js +++ b/test/helper.js @@ -15,12 +15,16 @@ global.qdone = function qdone(promise, done) { before(function(done) { global.book1 = new Book(path.join(__dirname, './fixtures/test1')); global.book2 = new Book(path.join(__dirname, './fixtures/test2')); + global.book3 = new Book(path.join(__dirname, './fixtures/test3')); qdone( global.book1.parse() .then(function() { return global.book2.parse(); - }), + }) + .then(function() { + return global.book3.parse(); + }), done ); }); diff --git a/test/parsing.js b/test/parsing.js index 4e76d2c..7be50cd 100644 --- a/test/parsing.js +++ b/test/parsing.js @@ -8,6 +8,11 @@ describe('Book parsing', function () { assert.equal(book1.options.description, 'Test description'); }); + it('should correctly parse the readme with asciidoc', function() { + assert.equal(book3.options.title, 'My Book'); + assert.equal(book3.options.description, 'Test description'); + }); + it('should correctly parse the summary', function() { var LEXED = book1.summary; |