diff options
author | David Faure <faure@kde.org> | 2021-04-24 22:55:41 +0200 |
---|---|---|
committer | David Faure <faure@kde.org> | 2021-04-25 12:10:09 +0200 |
commit | 09faac14d0c88dc6ee50a59c7d880e9631c39ff3 (patch) | |
tree | 1c7ba34d35ec87e7ad090549d2635b1719453b27 | |
parent | 1c40df97bda011fe2563e00655bd34326b97e254 (diff) | |
download | shared-mime-info-work/dfaure/issue155.tar.gz |
Lower priority of "BEGIN {" for perl, awk uses that toowork/dfaure/issue155
Closes https://gitlab.freedesktop.org/xdg/shared-mime-info/-/issues/155
-rw-r--r-- | data/freedesktop.org.xml.in | 2 | ||||
-rw-r--r-- | tests/mime-detection/list | 2 | ||||
-rw-r--r-- | tests/mime-detection/shell-calls-awk | 2 |
3 files changed, 5 insertions, 1 deletions
diff --git a/data/freedesktop.org.xml.in b/data/freedesktop.org.xml.in index d8127084..a9de9c7e 100644 --- a/data/freedesktop.org.xml.in +++ b/data/freedesktop.org.xml.in @@ -3420,7 +3420,6 @@ command to generate the output files. <match type="string" value="/bin/perl" offset="2:16"/> <match type="string" value="/bin/env perl" offset="2:16"/> <match type="string" value="use Test::" offset="0:256"/> - <match type="string" value="BEGIN {" offset="0:256"/> </magic> <magic priority="40"> <match type="string" value="use strict" offset="0:256"/> @@ -3429,6 +3428,7 @@ command to generate the output files. <match type="string" value="\n=pod" offset="0:256"/> <match type="string" value="\n=head1 NAME" offset="0:256"/> <match type="string" value="\n=head1 DESCRIPTION" offset="0:256"/> + <match type="string" value="BEGIN {" offset="0:256"/> </magic> <glob pattern="*.pl"/> <glob pattern="*.PL"/><!-- CPAN-style Perl build script --> diff --git a/tests/mime-detection/list b/tests/mime-detection/list index 94a4ad8a..ae8f3c45 100644 --- a/tests/mime-detection/list +++ b/tests/mime-detection/list @@ -390,6 +390,8 @@ example_mime.sage text/x-sagemath oxo test.pl application/x-perl test.pm application/x-perl test.t application/x-perl +# Not perl https://gitlab.freedesktop.org/xdg/shared-mime-info/-/issues/155 +shell-calls-awk application/x-shellscript x # Copied from http://en.wikipedia.org/wiki/Turtle_%28syntax%29#Example test.ttl text/turtle ox # Twig template diff --git a/tests/mime-detection/shell-calls-awk b/tests/mime-detection/shell-calls-awk new file mode 100644 index 00000000..f32d161a --- /dev/null +++ b/tests/mime-detection/shell-calls-awk @@ -0,0 +1,2 @@ +#!/bin/sh +awk 'BEGIN { print $0 }' |