From 5c9dc4f8309905e557b898d1ec5c5adfdc5c322e Mon Sep 17 00:00:00 2001 From: Dwayne Litzenberger Date: Sat, 31 Mar 2018 19:24:58 -0700 Subject: [PATCH] Perl detection: Don't match ECMAScript "use strict" syntax https://bugs.freedesktop.org/show_bug.cgi?id=105838 --- freedesktop.org.xml.in | 5 ++++- tests/js-use-strict.html | 20 ++++++++++++++++++++ tests/js-use-strict.js | 9 +++++++++ tests/list | 6 ++++++ 4 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 tests/js-use-strict.html create mode 100644 tests/js-use-strict.js diff --git a/freedesktop.org.xml.in b/freedesktop.org.xml.in index 72c41d6..9c53352 100644 --- a/freedesktop.org.xml.in +++ b/freedesktop.org.xml.in @@ -3287,7 +3287,10 @@ command to generate the output files. - + + + diff --git a/tests/js-use-strict.html b/tests/js-use-strict.html new file mode 100644 index 0000000..648a508 --- /dev/null +++ b/tests/js-use-strict.html @@ -0,0 +1,20 @@ + + + + + + Test + + +

Test

+ + diff --git a/tests/js-use-strict.js b/tests/js-use-strict.js new file mode 100644 index 0000000..1c14f94 --- /dev/null +++ b/tests/js-use-strict.js @@ -0,0 +1,9 @@ + +function f() { + "use strict"; + return true; +} +function g() { + 'use strict'; + return true; +} diff --git a/tests/list b/tests/list index 269c50a..7497588 100644 --- a/tests/list +++ b/tests/list @@ -337,6 +337,12 @@ pyside.py text/x-python test.pl application/x-perl test.pm application/x-perl test.t application/x-perl +# Not Perl +# https://bugs.freedesktop.org/show_bug.cgi?id=63612 +js-use-strict.html application/x-perl xxx +js-use-strict.html text/html +js-use-strict.js application/x-perl xxx +js-use-strict.js application/javascript ox # Copied from http://en.wikipedia.org/wiki/Turtle_%28syntax%29#Example test.ttl text/turtle ox # Twig template -- 2.16.3