summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ebook.js4
-rw-r--r--test/fixtures/test4/sub/PAGE.md7
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
+
![test image to be converted](../test.svg)
![test url](http://upload.wikimedia.org/wikipedia/commons/b/b0/NewTux.svg)
-
## 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
+
+![remote url](http://upload.wikimedia.org/wikipedia/commons/a/af/Tux.png)