aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDmitry Gutov2017-05-10 03:34:16 +0300
committerDmitry Gutov2017-05-10 03:34:58 +0300
commit17e540aa428c5392f7a9b4c1f7495bac8a8fe5da (patch)
treed720eb99d0b8907f4567dd9c72151dcfa1331b64 /test
parent58326f0f117b229b690023d3851a00d876a7aca6 (diff)
downloademacs-17e540aa428c5392f7a9b4c1f7495bac8a8fe5da.tar.gz
emacs-17e540aa428c5392f7a9b4c1f7495bac8a8fe5da.zip
Simplify url-encode-url and add a test
* lisp/url/url-util.el (url-encode-url): Simplify. url-generic-parse-url copes with multibyte strings just fine (https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24117#185). * test/lisp/url/url-parse-tests.el (url-generic-parse-url/multibyte-host-and-path): New test.
Diffstat (limited to 'test')
-rw-r--r--test/lisp/url/url-parse-tests.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/lisp/url/url-parse-tests.el b/test/lisp/url/url-parse-tests.el
index 05da7280aa2..fd8abb0a5e5 100644
--- a/test/lisp/url/url-parse-tests.el
+++ b/test/lisp/url/url-parse-tests.el
@@ -162,6 +162,11 @@
162 (should (equal (url-generic-parse-url "#") (url-parse-make-urlobj nil nil nil nil nil "" "" nil nil))) 162 (should (equal (url-generic-parse-url "#") (url-parse-make-urlobj nil nil nil nil nil "" "" nil nil)))
163 (should (equal (url-generic-parse-url "#foo") (url-parse-make-urlobj nil nil nil nil nil "" "foo" nil nil)))) 163 (should (equal (url-generic-parse-url "#foo") (url-parse-make-urlobj nil nil nil nil nil "" "foo" nil nil))))
164 164
165(ert-deftest url-generic-parse-url/multibyte-host-and-path ()
166 (should (equal (url-generic-parse-url "http://банки.рф/фыва/")
167 (url-parse-make-urlobj "http" nil nil "банки.рф" nil
168 "/фыва/" nil nil t))))
169
165(provide 'url-parse-tests) 170(provide 'url-parse-tests)
166 171
167;;; url-parse-tests.el ends here 172;;; url-parse-tests.el ends here