summaryrefslogtreecommitdiff
path: root/_test/tests/inc/common_stripsourcemaps.test.php
blob: c6a915dcf6de73492c9ee0172cf8b577c2a9d6f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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);
    }

}