Description: Collected Debian patches for xdg-utils
Author: Nicholas Guriev <guriev-ns@ya.ru>

The xdg-utils package is maintained in Git rather than maintaining
patches as separate files, and separating the patches doesn't seem to
be worth the effort.  They are therefore all included in this single
Debian patch.

For full commit history and separated commits, see the packaging Git
repository.
--- xdg-utils-1.1.2.orig/autotests/t-xdg-mime-query-default.sh
+++ xdg-utils-1.1.2/autotests/t-xdg-mime-query-default.sh
@@ -3,6 +3,8 @@ COMMAND_TESTED="xdg-mime query default"
 . ./test-lib.sh
 
 test_that_it reads \$XDG_CONFIG_HOME/mimeapps.list
+mock mosaic  # Default app should exist
+mock_desktop_file mosaic
 mock_default_app x-scheme-handler/http mosaic
 handler=$(run generic xdg-mime query default x-scheme-handler/http)
 assert_equal mosaic.desktop "$handler"
--- xdg-utils-1.1.2.orig/autotests/t-xdg-open.sh
+++ xdg-utils-1.1.2/autotests/t-xdg-open.sh
@@ -129,13 +129,6 @@ mock_desktop_file mosaic %u
 mock_default_app x-scheme-handler/http mosaic
 test_open_url generic mosaic
 
-test_that_it always uses \$BROWSER if set in generic mode
-BROWSER=cyberdog
-mock_desktop_file mosaic %u
-mock_default_app x-scheme-handler/http mosaic
-mock mosaic
-test_open_url generic cyberdog
-
 test_that_it works with multi-word \$BROWSER commands
 BROWSER="cyberdog --url %s"
 test_open_url generic cyberdog --url
--- xdg-utils-1.1.2.orig/autotests/t-xdg-settings.sh
+++ xdg-utils-1.1.2/autotests/t-xdg-settings.sh
@@ -12,12 +12,16 @@ assert_run gconftool-2 --get /desktop/gn
 for de in gnome3 cinnamon lxde mate generic; do
     test_that_it determines default browser from \
                  \$XDG_CONFIG_HOME/mimeapps.list in $de
+    mock mosaic  # Default app should exist
+    mock_desktop_file mosaic
     mock_default_app x-scheme-handler/http mosaic
     assert_equal mosaic.desktop \
                  "$(run $de xdg-settings get default-web-browser)"
 
     test_that_it determines default URL handler from \
                  \$XDG_CONFIG_HOME/mimeapps.list in $de
+    mock footorrent  # Default app should exist
+    mock_desktop_file footorrent
     mock_default_app x-scheme-handler/magnet footorrent
     assert_equal \
         footorrent.desktop \
