summaryrefslogtreecommitdiff
path: root/_test
diff options
context:
space:
mode:
authorChristopher Smith <chris@jalakai.co.uk>2014-03-18 18:25:42 +0000
committerChristopher Smith <chris@jalakai.co.uk>2014-03-18 18:25:42 +0000
commit177ef92c4ddd38cb906dd7d5f0208c698048cd57 (patch)
tree1ac59067a92789f3ae0196a93dd79d315a18e0b6 /_test
parent84abf1113fd407d4ffefe3313b8f0c3214f04b05 (diff)
parentf8fb2d1811251304687b805a60b489f63cb5c4fb (diff)
downloadrpg-177ef92c4ddd38cb906dd7d5f0208c698048cd57.tar.gz
rpg-177ef92c4ddd38cb906dd7d5f0208c698048cd57.tar.bz2
Merge pull request #616 from splitbrain/stripsourcemaps
strip sourcemaps in CSS and JS #601
Diffstat (limited to '_test')
-rw-r--r--_test/tests/inc/common_stripsourcemaps.test.php29
1 files changed, 29 insertions, 0 deletions
diff --git a/_test/tests/inc/common_stripsourcemaps.test.php b/_test/tests/inc/common_stripsourcemaps.test.php
new file mode 100644
index 000000000..c6a915dcf
--- /dev/null
+++ b/_test/tests/inc/common_stripsourcemaps.test.php
@@ -0,0 +1,29 @@
+<?php
+
+class common_stripsourcemaps_test extends DokuWikiTest {
+
+ function test_all() {
+
+ $text = <<<EOL
+//@ sourceMappingURL=/foo/bar/xxx.map
+//# sourceMappingURL=/foo/bar/xxx.map
+/*@ sourceMappingURL=/foo/bar/xxx.map */
+/*# sourceMappingURL=/foo/bar/xxx.map */
+bang
+EOL;
+
+ $expect = <<<EOL
+//
+//
+/**/
+/**/
+bang
+EOL;
+
+ stripsourcemaps($text);
+
+
+ $this->assertEquals($expect, $text);
+ }
+
+} \ No newline at end of file