summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOndrej Holy <oholy@redhat.com>2019-02-25 10:08:38 +0100
committerOndrej Holy <oholy@redhat.com>2019-02-26 09:12:44 +0100
commit142d99cb117af76615f29bb08b042c9d72f5aa5c (patch)
tree6ab968634f672269a441aba9d4c8fe267b27758f /test
parent60221c0f3ead3bf4a26492439f37b698b47f388f (diff)
downloadgvfs-142d99cb117af76615f29bb08b042c9d72f5aa5c.tar.gz
test: Remove trailing newline from the IP string
test_unknown_host uses the following URI: sftp://10.220.47.158%0A:22222/. It contains %0A (newline character), which makes it invalid and may cause problems. Let's remove the trailing newline from the IP to make it valid. https://gitlab.gnome.org/GNOME/gvfs/issues/376
Diffstat (limited to 'test')
-rwxr-xr-xtest/gvfs-test3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/gvfs-test b/test/gvfs-test
index 8b9e0284..73b4e2fb 100755
--- a/test/gvfs-test
+++ b/test/gvfs-test
@@ -69,7 +69,8 @@ have_httpd = httpd_cmd is not None
sshd_path = shutil.which('sshd')
local_ip = subprocess.check_output("ip -4 addr | sed -nr '/127\.0\.0/ n; "
- "/inet / { s/^.*inet ([0-9.]+).*$/\\1/; p; q }'",
+ "/inet / { s/^.*inet ([0-9.]+).*$/\\1/; p; q }'"
+ "| tr -d '\n'",
shell=True, universal_newlines=True)
SMB_USER_PORT = 1445