aboutsummaryrefslogtreecommitdiff
path: root/tests/html2tomboyXslTest.php
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2016-07-07 17:11:16 +0200
committerChristian Weiske <cweiske@cweiske.de>2016-07-07 17:15:41 +0200
commitca08ab1e5ebce1679f11e0d89b7e503f744c555e (patch)
tree7ac3192de588ab7475931632683ffff3f74bcd76 /tests/html2tomboyXslTest.php
parent4a2837ee386cbcc033baa56d9ad833f238e8589f (diff)
downloadgrauphel-ca08ab1e5ebce1679f11e0d89b7e503f744c555e.tar.gz
grauphel-ca08ab1e5ebce1679f11e0d89b7e503f744c555e.zip
XSL file to convert HTML to tomboy markup
Diffstat (limited to 'tests/html2tomboyXslTest.php')
-rw-r--r--tests/html2tomboyXslTest.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/html2tomboyXslTest.php b/tests/html2tomboyXslTest.php
new file mode 100644
index 0000000..5e9139e
--- /dev/null
+++ b/tests/html2tomboyXslTest.php
@@ -0,0 +1,24 @@
+<?php
+class html2tomboyXslTest extends PHPUnit_Framework_TestCase
+{
+ /**
+ * Use xsltproc and diff to check if the XSL file generates
+ * the same output as we expect.
+ */
+ public function testFormat()
+ {
+ exec(
+ 'xsltproc'
+ . ' ../templates/html2tomboy.xsl'
+ . ' data/full-formattest.html'
+ . ' | diff -u data/formattest.tomboynotecontent -',
+ $out,
+ $retval
+ );
+ $this->assertEquals(
+ 0, $retval,
+ "diff exit status is not 0:\n" . implode("\n", $out)
+ );
+ }
+}
+?> \ No newline at end of file