]> git.eshelyaron.com Git - emacs.git/commitdiff
Move more test data to follow our conventions
authorStefan Kangas <stefan@marxist.se>
Fri, 23 Oct 2020 19:07:26 +0000 (21:07 +0200)
committerStefan Kangas <stefan@marxist.se>
Fri, 23 Oct 2020 19:07:26 +0000 (21:07 +0200)
* test/data/minibuffer-test-cttq$tion: Move from here...
* test/lisp/minibuffer-resources/data/minibuffer-test-cttq$tion:
...to here.
* test/lisp/minibuffer-resources/lisp/cedet/semantic-utest-c.test:
* test/lisp/minibuffer-resources/lisp/cedet/semantic-utest.test:
New files.
* test/lisp/minibuffer-tests.el (ert, ert-x): Require.
(completion-table-test-quoting): Use ert-resource-directory.

* test/data/net/cert.pem:
* test/data/net/key.pem: Move frome here...
* test/lisp/net/network-stream-resources/cert.pem:
* test/lisp/net/network-stream-resources/key.pem: ...to here.
* test/lisp/net/network-stream-tests.el (ert, ert-x): Require.
(network-stream-tests--datadir): Remove variable.
(make-tls-server): Use ert-resource-file.

* test/data/vc/diff-mode/hello_emacs.c:
* test/data/vc/diff-mode/hello_emacs_1.c:
* test/data/vc/diff-mode/hello_world.c:
* test/data/vc/diff-mode/hello_world_1.c: Move from here...
* test/lisp/vc/diff-mode-resources/hello_emacs.c:
* test/lisp/vc/diff-mode-resources/hello_emacs_1.c:
* test/lisp/vc/diff-mode-resources/hello_world.c:
* test/lisp/vc/diff-mode-resources/hello_world_1.c: ...to here.
* test/lisp/vc/diff-mode-tests.el (ert, ert-x): Require.
(diff-mode-tests--datadir): Remove variable.
(diff-mode-test-font-lock-syntax-one-line)
(diff-mode-test-font-lock): Use ert-resource-directory.

* test/data/xdg/l10n.desktop:
* test/data/xdg/malformed.desktop:
* test/data/xdg/mimeapps.list:
* test/data/xdg/mimeinfo.cache:
* test/data/xdg/test.desktop: Move from here...
* test/lisp/xdg-resources/l10n.desktop:
* test/lisp/xdg-resources/malformed.desktop:
* test/lisp/xdg-resources/mimeapps.list:
* test/lisp/xdg-resources/mimeinfo.cache:
* test/lisp/xdg-resources/test.desktop: ...to here.
* test/lisp/xdg-tests.el (ert-x): Require.
(xdg-tests-data-dir): Remove variable.
(xdg-desktop-parsing, xdg-mime-associations): Use ert-resource-file.

32 files changed:
test/data/minibuffer-test-cttq$tion [deleted file]
test/data/net/cert.pem [deleted file]
test/data/net/key.pem [deleted file]
test/data/vc/diff-mode/hello_emacs.c [deleted file]
test/data/vc/diff-mode/hello_emacs_1.c [deleted file]
test/data/vc/diff-mode/hello_world.c [deleted file]
test/data/vc/diff-mode/hello_world_1.c [deleted file]
test/data/xdg/l10n.desktop [deleted file]
test/data/xdg/malformed.desktop [deleted file]
test/data/xdg/mimeapps.list [deleted file]
test/data/xdg/mimeinfo.cache [deleted file]
test/data/xdg/test.desktop [deleted file]
test/data/xdg/wrong.desktop [deleted file]
test/lisp/minibuffer-resources/data/minibuffer-test-cttq$tion [new file with mode: 0644]
test/lisp/minibuffer-resources/lisp/cedet/semantic-utest-c.test [new file with mode: 0644]
test/lisp/minibuffer-resources/lisp/cedet/semantic-utest.test [new file with mode: 0644]
test/lisp/minibuffer-tests.el
test/lisp/net/network-stream-resources/cert.pem [new file with mode: 0644]
test/lisp/net/network-stream-resources/key.pem [new file with mode: 0644]
test/lisp/net/network-stream-tests.el
test/lisp/vc/diff-mode-resources/hello_emacs.c [new file with mode: 0644]
test/lisp/vc/diff-mode-resources/hello_emacs_1.c [new file with mode: 0644]
test/lisp/vc/diff-mode-resources/hello_world.c [new file with mode: 0644]
test/lisp/vc/diff-mode-resources/hello_world_1.c [new file with mode: 0644]
test/lisp/vc/diff-mode-tests.el
test/lisp/xdg-resources/l10n.desktop [new file with mode: 0644]
test/lisp/xdg-resources/malformed.desktop [new file with mode: 0644]
test/lisp/xdg-resources/mimeapps.list [new file with mode: 0644]
test/lisp/xdg-resources/mimeinfo.cache [new file with mode: 0644]
test/lisp/xdg-resources/test.desktop [new file with mode: 0644]
test/lisp/xdg-resources/wrong.desktop [new file with mode: 0644]
test/lisp/xdg-tests.el

diff --git a/test/data/minibuffer-test-cttq$tion b/test/data/minibuffer-test-cttq$tion
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/test/data/net/cert.pem b/test/data/net/cert.pem
deleted file mode 100644 (file)
index 4df4e92..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIELTCCAxWgAwIBAgIJAI6LqlFyaPRkMA0GCSqGSIb3DQEBCwUAMIGsMQswCQYD
-VQQGEwJBVTEYMBYGA1UECAwPTmV3IFNvdXRoIFdhbGVzMQ8wDQYDVQQHDAZTeWRu
-ZXkxITAfBgNVBAoMGEVtYWNzIFRlc3QgU2VydmljZXNzIExMQzESMBAGA1UECwwJ
-QXV0b21hdGVkMRcwFQYDVQQDDA50ZXN0LmVtYWNzLnpvdDEiMCAGCSqGSIb3DQEJ
-ARYTZW1hY3MtZGV2ZWxAZnNmLm9yZzAeFw0xNjAyMDgwNDA0MzJaFw0xNjAzMDkw
-NDA0MzJaMIGsMQswCQYDVQQGEwJBVTEYMBYGA1UECAwPTmV3IFNvdXRoIFdhbGVz
-MQ8wDQYDVQQHDAZTeWRuZXkxITAfBgNVBAoMGEVtYWNzIFRlc3QgU2VydmljZXNz
-IExMQzESMBAGA1UECwwJQXV0b21hdGVkMRcwFQYDVQQDDA50ZXN0LmVtYWNzLnpv
-dDEiMCAGCSqGSIb3DQEJARYTZW1hY3MtZGV2ZWxAZnNmLm9yZzCCASIwDQYJKoZI
-hvcNAQEBBQADggEPADCCAQoCggEBAM52lP7k1rBpctBX1irRVgDerxqlFSTkvg8L
-WmRCfwm3XY8EZWqM/8Eex5soH7myRlWfUH/cKxbqScZqXotj0hlPxdRkM6gWgHS9
-Mml7wnz2LZGvD5PfMfs+yBHKAMrqortFXCKksHsYIJ66l9gJMm1G5XjWha6CaEr/
-k2bE5Ovw0fB2B4vH0OqhJzGyenJOspXZz1ttn3h3UC5fbDXS8fUM9k/FbgJKypWr
-zB3P12GcMR939FsR5sqa8nNoCMw+WBzs4XuM5Ad+s/UtEaZvmtwvLwmdB7cgCEyM
-x5gaM969SlpOmuy7dDTCCK3lBl6B5dgFKvVcChYwSW+xJz5tfL0CAwEAAaNQME4w
-HQYDVR0OBBYEFG3YhH7ZzEdOGstkT67uUh1RylNjMB8GA1UdIwQYMBaAFG3YhH7Z
-zEdOGstkT67uUh1RylNjMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEB
-ADnJL2tBMnPepywA57yDfJz54FvrqRd+UAjSiB7/QySDpHnTM3b3sXWfwAkXPTjM
-c+jRW2kfdnL6OQW2tpcpPZANGnwK8MJrtGcbHhtPXjgDRhVZp64hsB7ayS+l0Dm7
-2ZBbi2SF8FgZVcQy0WD01ir2raSODo124dMrq+3aHP77YLbiNEKj+wFoDbndQ1FQ
-gtIJBE80FADoqc7LnBrpA20aVlfqhKZqe+leYDSZ+CE1iwlPdvD+RTUxVDs5EfpB
-qVOHDlzEfVmcMnddKTV8pNYuo93AG4s0KdrGG9RwSvtLaOoHd2i6RmIs+Yiumbau
-mXodMxxAEW/cM7Ita/2QVmk=
------END CERTIFICATE-----
diff --git a/test/data/net/key.pem b/test/data/net/key.pem
deleted file mode 100644 (file)
index 5db58f5..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
------BEGIN PRIVATE KEY-----
-MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDOdpT+5NawaXLQ
-V9Yq0VYA3q8apRUk5L4PC1pkQn8Jt12PBGVqjP/BHsebKB+5skZVn1B/3CsW6knG
-al6LY9IZT8XUZDOoFoB0vTJpe8J89i2Rrw+T3zH7PsgRygDK6qK7RVwipLB7GCCe
-upfYCTJtRuV41oWugmhK/5NmxOTr8NHwdgeLx9DqoScxsnpyTrKV2c9bbZ94d1Au
-X2w10vH1DPZPxW4CSsqVq8wdz9dhnDEfd/RbEebKmvJzaAjMPlgc7OF7jOQHfrP1
-LRGmb5rcLy8JnQe3IAhMjMeYGjPevUpaTprsu3Q0wgit5QZegeX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8Td
-qVfTssNTwf7OuQPTYGtXC6ysCh5ra13Tl4cvlbdhsQKBgFHXP+919wSncLS+2ySD
-waBzG6GyVOgV+FE3DrM3Xp4S6fldWYAndKHQ1HjJVDY8SkC2Tk1D7QSQnmS+ZzYs
-YqzcnkPCTHLb6wCErs4ZiW0gn9xJnfxyv6wPujsayL4TMsmsqkj/IAB61UjwaA/a
-Z+rUw/WkcNPD59AD1J0eeSZu
------END PRIVATE KEY-----
diff --git a/test/data/vc/diff-mode/hello_emacs.c b/test/data/vc/diff-mode/hello_emacs.c
deleted file mode 100644 (file)
index c7ed753..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <stdio.h>
-int main()
-{
-  printf("Hello, Emacs!\n");
-  return 0;
-}
diff --git a/test/data/vc/diff-mode/hello_emacs_1.c b/test/data/vc/diff-mode/hello_emacs_1.c
deleted file mode 100644 (file)
index 62145a6..0000000
+++ /dev/null
@@ -1 +0,0 @@
-int main() { printf("Hello, Emacs!\n"); return 0; }
\ No newline at end of file
diff --git a/test/data/vc/diff-mode/hello_world.c b/test/data/vc/diff-mode/hello_world.c
deleted file mode 100644 (file)
index dcbe06c..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <stdio.h>
-int main()
-{
-  printf("Hello, World!\n");
-  return 0;
-}
diff --git a/test/data/vc/diff-mode/hello_world_1.c b/test/data/vc/diff-mode/hello_world_1.c
deleted file mode 100644 (file)
index 606afb3..0000000
+++ /dev/null
@@ -1 +0,0 @@
-int main() { printf("Hello, World!\n"); return 0; }
\ No newline at end of file
diff --git a/test/data/xdg/l10n.desktop b/test/data/xdg/l10n.desktop
deleted file mode 100644 (file)
index 42da839..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-# localized strings
-[Desktop Entry]
-Comment=Cheers
-Comment[en_US@piglatin]=Eerschay
-Comment[sv]=Skål
diff --git a/test/data/xdg/malformed.desktop b/test/data/xdg/malformed.desktop
deleted file mode 100644 (file)
index 144a3f7..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-# unacceptable key=value format
-[Desktop Entry]
-Key=value
-aowef faoweif of
diff --git a/test/data/xdg/mimeapps.list b/test/data/xdg/mimeapps.list
deleted file mode 100644 (file)
index 27fbd94..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-[Default Applications]
-x-test/foo=a.desktop
-
-[Added Associations]
-x-test/foo=b.desktop
-x-test/baz=a.desktop
-
-[Removed Associations]
-x-test/foo=c.desktop;d.desktop
diff --git a/test/data/xdg/mimeinfo.cache b/test/data/xdg/mimeinfo.cache
deleted file mode 100644 (file)
index 6e54f60..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-[MIME Cache]
-x-test/foo=c.desktop;d.desktop
-x-test/bar=a.desktop;c.desktop
-x-test/baz=b.desktop;d.desktop
diff --git a/test/data/xdg/test.desktop b/test/data/xdg/test.desktop
deleted file mode 100644 (file)
index b848cef..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-# this is a comment
-[Desktop Entry]
-Name=Test
-[Another Section]
-Exec=frobnicate
diff --git a/test/data/xdg/wrong.desktop b/test/data/xdg/wrong.desktop
deleted file mode 100644 (file)
index e0b4c22..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-# the first section must be "Desktop Entry"
-[Why]
diff --git a/test/lisp/minibuffer-resources/data/minibuffer-test-cttq$tion b/test/lisp/minibuffer-resources/data/minibuffer-test-cttq$tion
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/test/lisp/minibuffer-resources/lisp/cedet/semantic-utest-c.test b/test/lisp/minibuffer-resources/lisp/cedet/semantic-utest-c.test
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/test/lisp/minibuffer-resources/lisp/cedet/semantic-utest.test b/test/lisp/minibuffer-resources/lisp/cedet/semantic-utest.test
new file mode 100644 (file)
index 0000000..e69de29
index 5da86f36148cf626c31d01e3860153082956abee..32734794413a328eb92cc315acdad0b4d755dbd0 100644 (file)
@@ -26,6 +26,9 @@
 
 ;;; Code:
 
+(require 'ert)
+(require 'ert-x)
+
 (eval-when-compile (require 'cl-lib))
 
 (ert-deftest completion-test1 ()
@@ -85,7 +88,7 @@
 (ert-deftest completion-table-test-quoting ()
   (let ((process-environment
          `("CTTQ1=ed" "CTTQ2=et/" ,@process-environment))
-        (default-directory (expand-file-name "test" source-directory)))
+        (default-directory (ert-resource-directory)))
     (pcase-dolist (`(,input ,output)
                    '(
                      ;; Test that $ in files is properly $$ quoted.
diff --git a/test/lisp/net/network-stream-resources/cert.pem b/test/lisp/net/network-stream-resources/cert.pem
new file mode 100644 (file)
index 0000000..4df4e92
--- /dev/null
@@ -0,0 +1,25 @@
+-----BEGIN CERTIFICATE-----
+MIIELTCCAxWgAwIBAgIJAI6LqlFyaPRkMA0GCSqGSIb3DQEBCwUAMIGsMQswCQYD
+VQQGEwJBVTEYMBYGA1UECAwPTmV3IFNvdXRoIFdhbGVzMQ8wDQYDVQQHDAZTeWRu
+ZXkxITAfBgNVBAoMGEVtYWNzIFRlc3QgU2VydmljZXNzIExMQzESMBAGA1UECwwJ
+QXV0b21hdGVkMRcwFQYDVQQDDA50ZXN0LmVtYWNzLnpvdDEiMCAGCSqGSIb3DQEJ
+ARYTZW1hY3MtZGV2ZWxAZnNmLm9yZzAeFw0xNjAyMDgwNDA0MzJaFw0xNjAzMDkw
+NDA0MzJaMIGsMQswCQYDVQQGEwJBVTEYMBYGA1UECAwPTmV3IFNvdXRoIFdhbGVz
+MQ8wDQYDVQQHDAZTeWRuZXkxITAfBgNVBAoMGEVtYWNzIFRlc3QgU2VydmljZXNz
+IExMQzESMBAGA1UECwwJQXV0b21hdGVkMRcwFQYDVQQDDA50ZXN0LmVtYWNzLnpv
+dDEiMCAGCSqGSIb3DQEJARYTZW1hY3MtZGV2ZWxAZnNmLm9yZzCCASIwDQYJKoZI
+hvcNAQEBBQADggEPADCCAQoCggEBAM52lP7k1rBpctBX1irRVgDerxqlFSTkvg8L
+WmRCfwm3XY8EZWqM/8Eex5soH7myRlWfUH/cKxbqScZqXotj0hlPxdRkM6gWgHS9
+Mml7wnz2LZGvD5PfMfs+yBHKAMrqortFXCKksHsYIJ66l9gJMm1G5XjWha6CaEr/
+k2bE5Ovw0fB2B4vH0OqhJzGyenJOspXZz1ttn3h3UC5fbDXS8fUM9k/FbgJKypWr
+zB3P12GcMR939FsR5sqa8nNoCMw+WBzs4XuM5Ad+s/UtEaZvmtwvLwmdB7cgCEyM
+x5gaM969SlpOmuy7dDTCCK3lBl6B5dgFKvVcChYwSW+xJz5tfL0CAwEAAaNQME4w
+HQYDVR0OBBYEFG3YhH7ZzEdOGstkT67uUh1RylNjMB8GA1UdIwQYMBaAFG3YhH7Z
+zEdOGstkT67uUh1RylNjMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEB
+ADnJL2tBMnPepywA57yDfJz54FvrqRd+UAjSiB7/QySDpHnTM3b3sXWfwAkXPTjM
+c+jRW2kfdnL6OQW2tpcpPZANGnwK8MJrtGcbHhtPXjgDRhVZp64hsB7ayS+l0Dm7
+2ZBbi2SF8FgZVcQy0WD01ir2raSODo124dMrq+3aHP77YLbiNEKj+wFoDbndQ1FQ
+gtIJBE80FADoqc7LnBrpA20aVlfqhKZqe+leYDSZ+CE1iwlPdvD+RTUxVDs5EfpB
+qVOHDlzEfVmcMnddKTV8pNYuo93AG4s0KdrGG9RwSvtLaOoHd2i6RmIs+Yiumbau
+mXodMxxAEW/cM7Ita/2QVmk=
+-----END CERTIFICATE-----
diff --git a/test/lisp/net/network-stream-resources/key.pem b/test/lisp/net/network-stream-resources/key.pem
new file mode 100644 (file)
index 0000000..5db58f5
--- /dev/null
@@ -0,0 +1,28 @@
+-----BEGIN PRIVATE KEY-----
+MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDOdpT+5NawaXLQ
+V9Yq0VYA3q8apRUk5L4PC1pkQn8Jt12PBGVqjP/BHsebKB+5skZVn1B/3CsW6knG
+al6LY9IZT8XUZDOoFoB0vTJpe8J89i2Rrw+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jksclGNxqnkRwA/RI7
+fjlMCzxOkFjIeWivXd2kjIDvIM1uQNKsCWZWUks12e/1zSmb5HPSvyuZpQKBgQDQ
+qVgKP604ysmav9HOgXy+Tx2nAoYpxp2/f2gbzZcrVfz1szdN2fnsQWh6CMEhEYMU
+WQeBJIRM65w72qp1iYXPOaqZDT0suWiFl4I/4sBbbO2BkssNb2Xs8iJxcCOeH8Td
+qVfTssNTwf7OuQPTYGtXC6ysCh5ra13Tl4cvlbdhsQKBgFHXP+919wSncLS+2ySD
+waBzG6GyVOgV+FE3DrM3Xp4S6fldWYAndKHQ1HjJVDY8SkC2Tk1D7QSQnmS+ZzYs
+YqzcnkPCTHLb6wCErs4ZiW0gn9xJnfxyv6wPujsayL4TMsmsqkj/IAB61UjwaA/a
+Z+rUw/WkcNPD59AD1J0eeSZu
+-----END PRIVATE KEY-----
index cf416155e5026a255c9ea6638ed88b29481ef0af..07eb28232825b854fd46c56f269624e55fd0391a 100644 (file)
@@ -24,6 +24,8 @@
 
 ;;; Code:
 
+(require 'ert)
+(require 'ert-x)
 (require 'gnutls)
 (require 'network-stream)
 ;; The require above is needed for 'open-network-stream' to work, but
       (should (equal (buffer-string) "foo\n")))
     (delete-process server)))
 
-(defconst network-stream-tests--datadir
-  (expand-file-name "test/data/net" source-directory))
-
 (defun make-tls-server (port)
   (start-process "gnutls" (generate-new-buffer "*tls*")
                  "gnutls-serv" "--http"
                  "--x509keyfile"
-                 (concat network-stream-tests--datadir "/key.pem")
+                 (ert-resource-file "key.pem")
                  "--x509certfile"
-                 (concat network-stream-tests--datadir "/cert.pem")
+                 (ert-resource-file "cert.pem")
                  "--port" (format "%s" port)))
 
 (ert-deftest connect-to-tls-ipv4-wait ()
diff --git a/test/lisp/vc/diff-mode-resources/hello_emacs.c b/test/lisp/vc/diff-mode-resources/hello_emacs.c
new file mode 100644 (file)
index 0000000..c7ed753
--- /dev/null
@@ -0,0 +1,6 @@
+#include <stdio.h>
+int main()
+{
+  printf("Hello, Emacs!\n");
+  return 0;
+}
diff --git a/test/lisp/vc/diff-mode-resources/hello_emacs_1.c b/test/lisp/vc/diff-mode-resources/hello_emacs_1.c
new file mode 100644 (file)
index 0000000..62145a6
--- /dev/null
@@ -0,0 +1 @@
+int main() { printf("Hello, Emacs!\n"); return 0; }
\ No newline at end of file
diff --git a/test/lisp/vc/diff-mode-resources/hello_world.c b/test/lisp/vc/diff-mode-resources/hello_world.c
new file mode 100644 (file)
index 0000000..dcbe06c
--- /dev/null
@@ -0,0 +1,6 @@
+#include <stdio.h>
+int main()
+{
+  printf("Hello, World!\n");
+  return 0;
+}
diff --git a/test/lisp/vc/diff-mode-resources/hello_world_1.c b/test/lisp/vc/diff-mode-resources/hello_world_1.c
new file mode 100644 (file)
index 0000000..606afb3
--- /dev/null
@@ -0,0 +1 @@
+int main() { printf("Hello, World!\n"); return 0; }
\ No newline at end of file
index f17ec3648f16bf052e28d691d974c42868e186d1..b25836405cce0aa9fa68338d3a647c449e287961 100644 (file)
 
 ;;; Code:
 
+(require 'ert)
+(require 'ert-x)
 (require 'diff-mode)
 (require 'diff)
 
-(defconst diff-mode-tests--datadir
-  (expand-file-name "test/data/vc/diff-mode" source-directory))
-
 (ert-deftest diff-mode-test-ignore-trailing-dashes ()
   "Check to make sure we successfully ignore trailing -- made by
 'git format-patch'. This is bug #9597"
@@ -209,11 +208,11 @@ youthfulness
   ;; See comments in diff-hunk-file-names about nonascii.
   ;; In such cases, the diff-font-lock-syntax portion of this fails.
   :expected-result (if (string-match-p "[[:nonascii:]]"
-                                       diff-mode-tests--datadir)
+                                       (ert-resource-directory))
                        :failed :passed)
   (skip-unless (executable-find shell-file-name))
   (skip-unless (executable-find diff-command))
-  (let ((default-directory diff-mode-tests--datadir)
+  (let ((default-directory (ert-resource-directory))
         (old "hello_world.c")
         (new "hello_emacs.c")
         (diff-buffer (get-buffer-create "*Diff*"))
@@ -274,11 +273,11 @@ youthfulness
 (ert-deftest diff-mode-test-font-lock-syntax-one-line ()
   "Check diff syntax highlighting for one line with no newline at end."
   :expected-result (if (string-match-p "[[:nonascii:]]"
-                                       diff-mode-tests--datadir)
+                                       (ert-resource-directory))
                        :failed :passed)
   (skip-unless (executable-find shell-file-name))
   (skip-unless (executable-find diff-command))
-  (let ((default-directory diff-mode-tests--datadir)
+  (let ((default-directory (ert-resource-directory))
         (old "hello_world_1.c")
         (new "hello_emacs_1.c")
         (diff-buffer (get-buffer-create "*Diff*"))
diff --git a/test/lisp/xdg-resources/l10n.desktop b/test/lisp/xdg-resources/l10n.desktop
new file mode 100644 (file)
index 0000000..42da839
--- /dev/null
@@ -0,0 +1,5 @@
+# localized strings
+[Desktop Entry]
+Comment=Cheers
+Comment[en_US@piglatin]=Eerschay
+Comment[sv]=Skål
diff --git a/test/lisp/xdg-resources/malformed.desktop b/test/lisp/xdg-resources/malformed.desktop
new file mode 100644 (file)
index 0000000..144a3f7
--- /dev/null
@@ -0,0 +1,4 @@
+# unacceptable key=value format
+[Desktop Entry]
+Key=value
+aowef faoweif of
diff --git a/test/lisp/xdg-resources/mimeapps.list b/test/lisp/xdg-resources/mimeapps.list
new file mode 100644 (file)
index 0000000..27fbd94
--- /dev/null
@@ -0,0 +1,9 @@
+[Default Applications]
+x-test/foo=a.desktop
+
+[Added Associations]
+x-test/foo=b.desktop
+x-test/baz=a.desktop
+
+[Removed Associations]
+x-test/foo=c.desktop;d.desktop
diff --git a/test/lisp/xdg-resources/mimeinfo.cache b/test/lisp/xdg-resources/mimeinfo.cache
new file mode 100644 (file)
index 0000000..6e54f60
--- /dev/null
@@ -0,0 +1,4 @@
+[MIME Cache]
+x-test/foo=c.desktop;d.desktop
+x-test/bar=a.desktop;c.desktop
+x-test/baz=b.desktop;d.desktop
diff --git a/test/lisp/xdg-resources/test.desktop b/test/lisp/xdg-resources/test.desktop
new file mode 100644 (file)
index 0000000..b848cef
--- /dev/null
@@ -0,0 +1,5 @@
+# this is a comment
+[Desktop Entry]
+Name=Test
+[Another Section]
+Exec=frobnicate
diff --git a/test/lisp/xdg-resources/wrong.desktop b/test/lisp/xdg-resources/wrong.desktop
new file mode 100644 (file)
index 0000000..e0b4c22
--- /dev/null
@@ -0,0 +1,2 @@
+# the first section must be "Desktop Entry"
+[Why]
index 294996af5f8937466a33f8d3357dae7007a9c64e..c2a16006c35f32e06e98f5e2f37ff904dbb5d8a7 100644 (file)
 ;;; Code:
 
 (require 'ert)
+(require 'ert-x)
 (require 'xdg)
 
-(defconst xdg-tests-data-dir
-  (expand-file-name "test/data/xdg" source-directory))
-
 (ert-deftest xdg-desktop-parsing ()
   "Test `xdg-desktop-read-file' parsing of .desktop files."
-  (let ((tab1 (xdg-desktop-read-file
-               (expand-file-name "test.desktop" xdg-tests-data-dir)))
-        (tab2 (xdg-desktop-read-file
-               (expand-file-name "test.desktop" xdg-tests-data-dir)
+  (let ((tab1 (xdg-desktop-read-file (ert-resource-file "test.desktop")))
+        (tab2 (xdg-desktop-read-file (ert-resource-file "test.desktop")
                "Another Section")))
     (should (equal (gethash "Name" tab1) "Test"))
     (should (eq 'default (gethash "Exec" tab1 'default)))
     (should (equal "frobnicate" (gethash "Exec" tab2))))
   (should-error
-   (xdg-desktop-read-file
-    (expand-file-name "malformed.desktop" xdg-tests-data-dir)))
-  (let ((tab (xdg-desktop-read-file
-              (expand-file-name "l10n.desktop" xdg-tests-data-dir)))
+   (xdg-desktop-read-file (ert-resource-file "malformed.desktop")))
+  (let ((tab (xdg-desktop-read-file (ert-resource-file "l10n.desktop")))
         (env (getenv "LC_MESSAGES")))
     (unwind-protect
         (progn
@@ -67,8 +61,8 @@
 
 (ert-deftest xdg-mime-associations ()
   "Test reading MIME associations from files."
-  (let* ((apps (expand-file-name "mimeapps.list" xdg-tests-data-dir))
-         (cache (expand-file-name "mimeinfo.cache" xdg-tests-data-dir))
+  (let* ((apps (ert-resource-file "mimeapps.list"))
+         (cache (ert-resource-file "mimeinfo.cache"))
          (fs (list apps cache)))
     (should (equal (xdg-mime-collect-associations "x-test/foo" fs)
                    '("a.desktop" "b.desktop")))