xref: /dokuwiki/_test/tests/inc/common_stripsourcemaps.test.php (revision f8fb2d1811251304687b805a60b489f63cb5c4fb)
1*f8fb2d18SAndreas Gohr<?php
2*f8fb2d18SAndreas Gohr
3*f8fb2d18SAndreas Gohrclass common_stripsourcemaps_test extends DokuWikiTest {
4*f8fb2d18SAndreas Gohr
5*f8fb2d18SAndreas Gohr    function test_all() {
6*f8fb2d18SAndreas Gohr
7*f8fb2d18SAndreas Gohr        $text = <<<EOL
8*f8fb2d18SAndreas Gohr//@ sourceMappingURL=/foo/bar/xxx.map
9*f8fb2d18SAndreas Gohr//# sourceMappingURL=/foo/bar/xxx.map
10*f8fb2d18SAndreas Gohr/*@ sourceMappingURL=/foo/bar/xxx.map */
11*f8fb2d18SAndreas Gohr/*# sourceMappingURL=/foo/bar/xxx.map */
12*f8fb2d18SAndreas Gohrbang
13*f8fb2d18SAndreas GohrEOL;
14*f8fb2d18SAndreas Gohr
15*f8fb2d18SAndreas Gohr        $expect = <<<EOL
16*f8fb2d18SAndreas Gohr//
17*f8fb2d18SAndreas Gohr//
18*f8fb2d18SAndreas Gohr/**/
19*f8fb2d18SAndreas Gohr/**/
20*f8fb2d18SAndreas Gohrbang
21*f8fb2d18SAndreas GohrEOL;
22*f8fb2d18SAndreas Gohr
23*f8fb2d18SAndreas Gohr        stripsourcemaps($text);
24*f8fb2d18SAndreas Gohr
25*f8fb2d18SAndreas Gohr
26*f8fb2d18SAndreas Gohr        $this->assertEquals($expect, $text);
27*f8fb2d18SAndreas Gohr    }
28*f8fb2d18SAndreas Gohr
29*f8fb2d18SAndreas Gohr}