diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-01-29 22:42:41 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2015-01-29 22:42:41 +0100 |
commit | 56907044443ba42eaa0faa7733d90d41cf513966 (patch) | |
tree | ebce42b47978129b499d58b00c8e11d245eb7243 /test | |
parent | 8a8ffb613442bb37570a5081bf3e1b7943c4b61e (diff) | |
download | gitbook-56907044443ba42eaa0faa7733d90d41cf513966.zip gitbook-56907044443ba42eaa0faa7733d90d41cf513966.tar.gz gitbook-56907044443ba42eaa0faa7733d90d41cf513966.tar.bz2 |
Download external images in ebook format
Diffstat (limited to 'test')
-rw-r--r-- | test/ebook.js | 4 | ||||
-rw-r--r-- | test/fixtures/test4/sub/PAGE.md | 7 |
2 files changed, 10 insertions, 1 deletions
diff --git a/test/ebook.js b/test/ebook.js index 38e6f13..9432afa 100644 --- a/test/ebook.js +++ b/test/ebook.js @@ -18,6 +18,10 @@ describe('eBook Generator', function () { var readmeContent = fs.readFileSync(path.join(output, "index.html"), {encoding: "utf8"}); var pageContent = fs.readFileSync(path.join(output, "sub/PAGE.html"), {encoding: "utf8"}); + // Remote image + assert(pageContent.indexOf('src="../Tux.png"') >= 0); + assert(fs.existsSync(path.join(output, "Tux.png"))); + assert(fs.existsSync(path.join(output, "test.png"))); assert(fs.existsSync(path.join(output, "NewTux.png"))); diff --git a/test/fixtures/test4/sub/PAGE.md b/test/fixtures/test4/sub/PAGE.md index f2ebc34..6de478e 100644 --- a/test/fixtures/test4/sub/PAGE.md +++ b/test/fixtures/test4/sub/PAGE.md @@ -1,9 +1,10 @@ ## +## Image from root page +   - ## Inline svg {% html %} @@ -11,3 +12,7 @@ <rect width="300" height="100" style="fill:rgb(0,0,255);stroke-width:3;stroke:rgb(0,0,0)"> </svg> {% endhtml %} + +## Remote image + + |