summaryrefslogtreecommitdiffstats
path: root/t/recipes/checks/menu-format/menu-format-general
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:42:30 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:42:30 +0000
commit75808db17caf8b960b351e3408e74142f4c85aac (patch)
tree7989e9c09a4240248bf4658a22208a0a52d991c4 /t/recipes/checks/menu-format/menu-format-general
parentInitial commit. (diff)
downloadlintian-75808db17caf8b960b351e3408e74142f4c85aac.tar.xz
lintian-75808db17caf8b960b351e3408e74142f4c85aac.zip
Adding upstream version 2.117.0.upstream/2.117.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 't/recipes/checks/menu-format/menu-format-general')
-rw-r--r--t/recipes/checks/menu-format/menu-format-general/build-spec/debian/control.in51
-rw-r--r--t/recipes/checks/menu-format/menu-format-general/build-spec/debian/menu-broken.install1
-rw-r--r--t/recipes/checks/menu-format/menu-format-general/build-spec/debian/menu-broken.manpages1
-rw-r--r--t/recipes/checks/menu-format/menu-format-general/build-spec/debian/menu-broken.menu12
-rw-r--r--t/recipes/checks/menu-format/menu-format-general/build-spec/debian/menu-cmd.install2
-rw-r--r--t/recipes/checks/menu-format/menu-format-general/build-spec/debian/menu-cmd.menu4
-rw-r--r--t/recipes/checks/menu-format/menu-format-general/build-spec/debian/menu-none.install1
-rw-r--r--t/recipes/checks/menu-format/menu-format-general/build-spec/debian/menu-none.manpages1
-rw-r--r--t/recipes/checks/menu-format/menu-format-general/build-spec/debian/menu-none.menu16
-rw-r--r--t/recipes/checks/menu-format/menu-format-general/build-spec/debian/menu-section.install2
-rw-r--r--t/recipes/checks/menu-format/menu-format-general/build-spec/debian/menu-section.manpages1
-rw-r--r--t/recipes/checks/menu-format/menu-format-general/build-spec/debian/menu-section.menu15
-rw-r--r--t/recipes/checks/menu-format/menu-format-general/build-spec/fill-values3
-rw-r--r--t/recipes/checks/menu-format/menu-format-general/build-spec/orig/Makefile11
-rw-r--r--t/recipes/checks/menu-format/menu-format-general/build-spec/orig/broken.xpm1
-rw-r--r--t/recipes/checks/menu-format/menu-format-general/build-spec/orig/pargs22
-rw-r--r--t/recipes/checks/menu-format/menu-format-general/build-spec/orig/pargs.desktop8
-rw-r--r--t/recipes/checks/menu-format/menu-format-general/build-spec/orig/pargs.png0
-rw-r--r--t/recipes/checks/menu-format/menu-format-general/build-spec/orig/too-large.xpm10
-rw-r--r--t/recipes/checks/menu-format/menu-format-general/eval/desc2
-rw-r--r--t/recipes/checks/menu-format/menu-format-general/eval/hints30
21 files changed, 194 insertions, 0 deletions
diff --git a/t/recipes/checks/menu-format/menu-format-general/build-spec/debian/control.in b/t/recipes/checks/menu-format/menu-format-general/build-spec/debian/control.in
new file mode 100644
index 0000000..10303b5
--- /dev/null
+++ b/t/recipes/checks/menu-format/menu-format-general/build-spec/debian/control.in
@@ -0,0 +1,51 @@
+Source: [% $source %]
+Priority: optional
+Section: devel
+Maintainer: [% $author %]
+Standards-Version: [% $standards_version %]
+Build-Depends: [% $build_depends %]
+Rules-Requires-Root: no
+
+Package: menu-none
+Architecture: all
+Depends: ${misc:Depends}
+Description: [% $description %] (no icon)
+ This is a test package designed to exercise some feature or tag of
+ Lintian. It is part of the Lintian test suite and may do very odd
+ things. It should not be installed like a regular package. It may
+ be an empty package.
+ .
+ Test for "none" icon and missing icons.
+
+Package: menu-cmd
+Architecture: all
+Depends: ${misc:Depends}
+Description: [% $description %] (cmd)
+ This is a test package designed to exercise some feature or tag of
+ Lintian. It is part of the Lintian test suite and may do very odd
+ things. It should not be installed like a regular package. It may
+ be an empty package.
+ .
+ Test for command not being in the package.
+
+Package: menu-broken
+Architecture: all
+Depends: ${misc:Depends}
+Description: [% $description %] (broken)
+ This is a test package designed to exercise some feature or tag of
+ Lintian. It is part of the Lintian test suite and may do very odd
+ things. It should not be installed like a regular package. It may
+ be an empty package.
+ .
+ Test for broken menu file.
+
+Package: menu-section
+Architecture: all
+Depends: ${misc:Depends}
+Description: [% $description %] (section)
+ This is a test package designed to exercise some feature or tag of
+ Lintian. It is part of the Lintian test suite and may do very odd
+ things. It should not be installed like a regular package. It may
+ be an empty package.
+ .
+ Test for menu file with weird sections.
diff --git a/t/recipes/checks/menu-format/menu-format-general/build-spec/debian/menu-broken.install b/t/recipes/checks/menu-format/menu-format-general/build-spec/debian/menu-broken.install
new file mode 100644
index 0000000..f352ad9
--- /dev/null
+++ b/t/recipes/checks/menu-format/menu-format-general/build-spec/debian/menu-broken.install
@@ -0,0 +1 @@
+pargs-broken usr/bin
diff --git a/t/recipes/checks/menu-format/menu-format-general/build-spec/debian/menu-broken.manpages b/t/recipes/checks/menu-format/menu-format-general/build-spec/debian/menu-broken.manpages
new file mode 100644
index 0000000..9f8d467
--- /dev/null
+++ b/t/recipes/checks/menu-format/menu-format-general/build-spec/debian/menu-broken.manpages
@@ -0,0 +1 @@
+pargs-broken.1
diff --git a/t/recipes/checks/menu-format/menu-format-general/build-spec/debian/menu-broken.menu b/t/recipes/checks/menu-format/menu-format-general/build-spec/debian/menu-broken.menu
new file mode 100644
index 0000000..fee3e7f
--- /dev/null
+++ b/t/recipes/checks/menu-format/menu-format-general/build-spec/debian/menu-broken.menu
@@ -0,0 +1,12 @@
+?package(menu-broken):needs="X11" section="Applications/Programming"\
+ title="pargs (missing slash)" command="/usr/bin/pargs-broken"\
+ longtitle="Argument printer (bad-test)"
+ icon="none" newtag=unquoted-value
+?package(wrong-package):needs="X11" section="Applications/Programming"\
+ title="pargs (wrong pkg)" command="/usr/bin/pargs-broken"\
+ longtitle="Argument printer"
+?package(menu-broken):needs="X11" section="Applications/Programming"\
+ title="pargs (dup+unparse)" command="/usr/bin/pargs-broken"\
+ longtitle="Argument printer"\
+ longtitle="Argument printer"\
+ unparseable-stuff
diff --git a/t/recipes/checks/menu-format/menu-format-general/build-spec/debian/menu-cmd.install b/t/recipes/checks/menu-format/menu-format-general/build-spec/debian/menu-cmd.install
new file mode 100644
index 0000000..b8f1c81
--- /dev/null
+++ b/t/recipes/checks/menu-format/menu-format-general/build-spec/debian/menu-cmd.install
@@ -0,0 +1,2 @@
+*.xpm usr/share/pixmaps/
+pargs.png usr/share/pixmaps/
diff --git a/t/recipes/checks/menu-format/menu-format-general/build-spec/debian/menu-cmd.menu b/t/recipes/checks/menu-format/menu-format-general/build-spec/debian/menu-cmd.menu
new file mode 100644
index 0000000..73bc14c
--- /dev/null
+++ b/t/recipes/checks/menu-format/menu-format-general/build-spec/debian/menu-cmd.menu
@@ -0,0 +1,4 @@
+?package(menu-cmd):needs="X11" section="Applications/Programming"\
+ title="pargs (png icon)" command="/usr/bin/not-here"\
+ longtitle="Argument printer" icon16x16="/usr/share/pixmaps/pargs.png" \
+ icon="/usr/share/pixmaps/broken.xpm" icon32x32="/usr/share/pixmaps/too-large.xpm"
diff --git a/t/recipes/checks/menu-format/menu-format-general/build-spec/debian/menu-none.install b/t/recipes/checks/menu-format/menu-format-general/build-spec/debian/menu-none.install
new file mode 100644
index 0000000..bf2c0f6
--- /dev/null
+++ b/t/recipes/checks/menu-format/menu-format-general/build-spec/debian/menu-none.install
@@ -0,0 +1 @@
+pargs usr/bin
diff --git a/t/recipes/checks/menu-format/menu-format-general/build-spec/debian/menu-none.manpages b/t/recipes/checks/menu-format/menu-format-general/build-spec/debian/menu-none.manpages
new file mode 100644
index 0000000..6fb56bc
--- /dev/null
+++ b/t/recipes/checks/menu-format/menu-format-general/build-spec/debian/menu-none.manpages
@@ -0,0 +1 @@
+pargs.1
diff --git a/t/recipes/checks/menu-format/menu-format-general/build-spec/debian/menu-none.menu b/t/recipes/checks/menu-format/menu-format-general/build-spec/debian/menu-none.menu
new file mode 100644
index 0000000..4bd3892
--- /dev/null
+++ b/t/recipes/checks/menu-format/menu-format-general/build-spec/debian/menu-none.menu
@@ -0,0 +1,16 @@
+?package(menu-none):needs="X11" section="Applications/Programming"\
+ title="pargs (icon none)" command="/usr/bin/pargs"\
+ longtitle="Argument printer"\
+ icon="none"
+?package(menu-none):needs="X11" section="Applications/Programming"\
+ title="pargs (mis. icon)" command="/usr/bin/pargs"\
+ longtitle="Argument printer"\
+ icon="/usr/share/menu-none/non-existent.xpm"\
+ icon32x32="/usr/share/menu-none/non-existent32.xpm"\
+ icon16x16="/usr/share/menu-none/non-existent16.xpm"
+?package(menu-none):needs="X11" section="Applications/Programming"\
+ title="pargs (rel. icon)" command="/usr/bin/pargs"\
+ longtitle="Argument printer"\
+ icon="non-existent.xpm"\
+ icon32x32="non-existent32.xpm"\
+ icon16x16="non-existent16.xpm"
diff --git a/t/recipes/checks/menu-format/menu-format-general/build-spec/debian/menu-section.install b/t/recipes/checks/menu-format/menu-format-general/build-spec/debian/menu-section.install
new file mode 100644
index 0000000..4cf0ec4
--- /dev/null
+++ b/t/recipes/checks/menu-format/menu-format-general/build-spec/debian/menu-section.install
@@ -0,0 +1,2 @@
+pargs-section usr/bin
+pargs.desktop usr/share/applications
diff --git a/t/recipes/checks/menu-format/menu-format-general/build-spec/debian/menu-section.manpages b/t/recipes/checks/menu-format/menu-format-general/build-spec/debian/menu-section.manpages
new file mode 100644
index 0000000..bfc1a5b
--- /dev/null
+++ b/t/recipes/checks/menu-format/menu-format-general/build-spec/debian/menu-section.manpages
@@ -0,0 +1 @@
+pargs-section.1
diff --git a/t/recipes/checks/menu-format/menu-format-general/build-spec/debian/menu-section.menu b/t/recipes/checks/menu-format/menu-format-general/build-spec/debian/menu-section.menu
new file mode 100644
index 0000000..f6d6893
--- /dev/null
+++ b/t/recipes/checks/menu-format/menu-format-general/build-spec/debian/menu-section.menu
@@ -0,0 +1,15 @@
+?package(menu-section):needs="X11" section="Root"\
+ title="pargs (new root)" command="/usr/bin/pargs-section"\
+ longtitle="Argument printer"
+?package(menu-section):needs="X11" section="Apps/Games/Toys"\
+ title="pargs (apps/games)" command="/usr/bin/pargs-section"\
+ longtitle="Argument printer"
+?package(menu-section):needs="X11" section="Games"\
+ title="pargs (games)" command="/usr/bin/pargs-section"\
+ longtitle="Argument printer"
+?package(menu-section):needs="X11" section="Apps/Programming"\
+ title="pargs (apps/prog)" command="/usr/bin/pargs-section"\
+ longtitle="Argument printer"
+?package(menu-section):needs="X11" section="WindowManagers/Programming"\
+ title="pargs (vm)" command="/usr/bin/pargs-section"\
+ longtitle="Argument printer"
diff --git a/t/recipes/checks/menu-format/menu-format-general/build-spec/fill-values b/t/recipes/checks/menu-format/menu-format-general/build-spec/fill-values
new file mode 100644
index 0000000..5c96d32
--- /dev/null
+++ b/t/recipes/checks/menu-format/menu-format-general/build-spec/fill-values
@@ -0,0 +1,3 @@
+Skeleton: upload-native
+Testname: menu-format-general
+Description: Test menu file tags
diff --git a/t/recipes/checks/menu-format/menu-format-general/build-spec/orig/Makefile b/t/recipes/checks/menu-format/menu-format-general/build-spec/orig/Makefile
new file mode 100644
index 0000000..2754f69
--- /dev/null
+++ b/t/recipes/checks/menu-format/menu-format-general/build-spec/orig/Makefile
@@ -0,0 +1,11 @@
+all: pargs
+ sed s/pargs/pargs-broken/ pargs > pargs-broken
+ sed s/pargs/pargs-section/ pargs > pargs-section
+ pod2man --section=1 pargs pargs.1
+ pod2man --section=1 pargs-broken pargs-broken.1
+ pod2man --section=1 pargs-section pargs-section.1
+
+
+clean:
+ rm -f pargs*.1
+ rm -f pargs-*
diff --git a/t/recipes/checks/menu-format/menu-format-general/build-spec/orig/broken.xpm b/t/recipes/checks/menu-format/menu-format-general/build-spec/orig/broken.xpm
new file mode 100644
index 0000000..2fa612c
--- /dev/null
+++ b/t/recipes/checks/menu-format/menu-format-general/build-spec/orig/broken.xpm
@@ -0,0 +1 @@
+/* Pretend to be an XPM file without being it */
diff --git a/t/recipes/checks/menu-format/menu-format-general/build-spec/orig/pargs b/t/recipes/checks/menu-format/menu-format-general/build-spec/orig/pargs
new file mode 100644
index 0000000..5a0017c
--- /dev/null
+++ b/t/recipes/checks/menu-format/menu-format-general/build-spec/orig/pargs
@@ -0,0 +1,22 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+print join("\n", @ARGV), "\n";
+exit 0;
+
+=head1 NAME
+
+pargs - print arguments (similar to echo)
+
+=head1 SYNOPSIS
+
+pargs [...]
+
+=head1 DESCRIPTION
+
+Prints all arguments separated by newlines.
+
+=cut
+
diff --git a/t/recipes/checks/menu-format/menu-format-general/build-spec/orig/pargs.desktop b/t/recipes/checks/menu-format/menu-format-general/build-spec/orig/pargs.desktop
new file mode 100644
index 0000000..b84ecf2
--- /dev/null
+++ b/t/recipes/checks/menu-format/menu-format-general/build-spec/orig/pargs.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=pargs
+Type=Application
+Comment=Argument Printer
+Categories=Development;
+Keywords=Argument;Printer;
+Icon=foo
+Exec=pargs-section
diff --git a/t/recipes/checks/menu-format/menu-format-general/build-spec/orig/pargs.png b/t/recipes/checks/menu-format/menu-format-general/build-spec/orig/pargs.png
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/t/recipes/checks/menu-format/menu-format-general/build-spec/orig/pargs.png
diff --git a/t/recipes/checks/menu-format/menu-format-general/build-spec/orig/too-large.xpm b/t/recipes/checks/menu-format/menu-format-general/build-spec/orig/too-large.xpm
new file mode 100644
index 0000000..1403c5d
--- /dev/null
+++ b/t/recipes/checks/menu-format/menu-format-general/build-spec/orig/too-large.xpm
@@ -0,0 +1,10 @@
+/* XPM */
+
+/*
+ This is a fake XPM file - it has just enough to fool Lintian into
+ believing this is a 256x256 image...
+ */
+
+ "256 256 10 10"
+
+ /* Lintian is not too bright... :P */
diff --git a/t/recipes/checks/menu-format/menu-format-general/eval/desc b/t/recipes/checks/menu-format/menu-format-general/eval/desc
new file mode 100644
index 0000000..b332370
--- /dev/null
+++ b/t/recipes/checks/menu-format/menu-format-general/eval/desc
@@ -0,0 +1,2 @@
+Testname: menu-format-general
+Check: menu-format
diff --git a/t/recipes/checks/menu-format/menu-format-general/eval/hints b/t/recipes/checks/menu-format/menu-format-general/eval/hints
new file mode 100644
index 0000000..9ad6e14
--- /dev/null
+++ b/t/recipes/checks/menu-format/menu-format-general/eval/hints
@@ -0,0 +1,30 @@
+menu-section (binary): non-wm-in-windowmanager-menu-section x11 [usr/share/menu/menu-section:15]
+menu-section (binary): menu-item-uses-windowmanagers-section [usr/share/menu/menu-section:15]
+menu-section (binary): menu-item-uses-apps-section [usr/share/menu/menu-section:12]
+menu-section (binary): menu-item-uses-apps-games-section [usr/share/menu/menu-section:6]
+menu-section (binary): menu-item-creates-new-section WindowManagers/Programming [usr/share/menu/menu-section:15]
+menu-section (binary): menu-item-creates-new-section Games [usr/share/menu/menu-section:9]
+menu-section (binary): menu-item-creates-new-root-section Root [usr/share/menu/menu-section:3]
+menu-section (binary): command-in-menu-file-and-desktop-file pargs-section [usr/share/menu/menu-section:9]
+menu-section (binary): command-in-menu-file-and-desktop-file pargs-section [usr/share/menu/menu-section:6]
+menu-section (binary): command-in-menu-file-and-desktop-file pargs-section [usr/share/menu/menu-section:3]
+menu-section (binary): command-in-menu-file-and-desktop-file pargs-section [usr/share/menu/menu-section:15]
+menu-section (binary): command-in-menu-file-and-desktop-file pargs-section [usr/share/menu/menu-section:12]
+menu-none (binary): menu-item-uses-icon-none icon [usr/share/menu/menu-none:4]
+menu-none (binary): menu-icon-uses-relative-path icon32x32 non-existent32.xpm [usr/share/menu/menu-none:16]
+menu-none (binary): menu-icon-uses-relative-path icon16x16 non-existent16.xpm [usr/share/menu/menu-none:16]
+menu-none (binary): menu-icon-uses-relative-path icon non-existent.xpm [usr/share/menu/menu-none:16]
+menu-none (binary): menu-icon-missing icon32x32 usr/share/menu-none/non-existent32.xpm [usr/share/menu/menu-none:10]
+menu-none (binary): menu-icon-missing icon32x32 non-existent32.xpm [usr/share/menu/menu-none:16]
+menu-none (binary): menu-icon-missing icon16x16 usr/share/menu-none/non-existent16.xpm [usr/share/menu/menu-none:10]
+menu-none (binary): menu-icon-missing icon16x16 non-existent16.xpm [usr/share/menu/menu-none:16]
+menu-none (binary): menu-icon-missing icon usr/share/menu-none/non-existent.xpm [usr/share/menu/menu-none:10]
+menu-none (binary): menu-icon-missing icon non-existent.xpm [usr/share/menu/menu-none:16]
+menu-cmd (binary): menu-icon-too-big icon32x32 usr/share/pixmaps/too-large.xpm: 256x256 > 32x32 [usr/share/menu/menu-cmd:4]
+menu-cmd (binary): menu-icon-not-in-xpm-format icon16x16 usr/share/pixmaps/pargs.png [usr/share/menu/menu-cmd:4]
+menu-cmd (binary): menu-icon-cannot-be-parsed icon usr/share/pixmaps/broken.xpm: looking for XPM header [usr/share/menu/menu-cmd:4]
+menu-cmd (binary): menu-command-not-in-package usr/bin/not-here [usr/share/menu/menu-cmd:4]
+menu-broken (binary): unparsable-menu-item [usr/share/menu/menu-broken:12]
+menu-broken (binary): pkg-not-in-package-test wrong-package [usr/share/menu/menu-broken:7]
+menu-broken (binary): duplicate-tag-in-menu longtitle [usr/share/menu/menu-broken:12]
+menu-broken (binary): bad-test-in-menu-item [usr/share/menu/menu-broken:4]