From f53d8135b0677f8e7987f8199c9fddebd59bee76 Mon Sep 17 00:00:00 2001 From: Christopher Pezley Date: Sun, 22 Oct 2017 19:39:46 +0200 Subject: [PATCH] Add test for opening non-ascii paths. --- tests/end2end/test_invocations.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/tests/end2end/test_invocations.py b/tests/end2end/test_invocations.py index 1a91be2e0..d119e2da0 100644 --- a/tests/end2end/test_invocations.py +++ b/tests/end2end/test_invocations.py @@ -70,7 +70,7 @@ def temp_basedir_env(tmpdir, short_tmpdir): @pytest.mark.linux -def test_ascii_locale(request, server, tmpdir, quteproc_new): +def test_downloads_with_ascii_locale(request, server, tmpdir, quteproc_new): """Test downloads with LC_ALL=C set. https://github.com/qutebrowser/qutebrowser/issues/908 @@ -102,6 +102,23 @@ def test_ascii_locale(request, server, tmpdir, quteproc_new): assert (tmpdir / '?-issue908.bin').exists() +@pytest.mark.linux +def test_open_with_ascii_locale(request, server, tmpdir, quteproc_new): + """Test opening non-ascii URL with LC_ALL=C set. + + https://github.com/qutebrowser/qutebrowser/issues/1450 + """ + args = ['--temp-basedir'] + _base_args(request.config) + quteproc_new.start(args, env={'LC_ALL': 'C'}) + + # Test opening a file whose name contains non-ascii characters. + # No exception thrown means test success. + url = 'file:///föö.html' + quteproc_new.send_cmd(':open {}'.format(url)) + quteproc_new.wait_for(category='url', + message='URL contains characters *') + + @pytest.mark.linux def test_misconfigured_user_dirs(request, server, temp_basedir_env, tmpdir, quteproc_new):