From 28b83f5f9511623e044e7e10c75fc0cd7856720a Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 25 Aug 2024 13:04:27 +0200 Subject: [PATCH] curl tests: fix default tests and display --- lib/curl_tests.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/curl_tests.py b/lib/curl_tests.py index 6bb4cbf..5f7d9d6 100644 --- a/lib/curl_tests.py +++ b/lib/curl_tests.py @@ -160,8 +160,8 @@ def run(tests): def display_result(result): - if result["effective_url"] == result["url"]: - print(f"URL : {result['url']} (redirected to -> {result['effective_url']})") + if result["effective_url"] != result["url"]: + print(f"URL : {result['url']} (redirected to: {result['effective_url']})") else: print(f"URL : {result['url']}") if result['code'] != 200: @@ -181,7 +181,7 @@ def main(): tests = sys.stdin.read() - if not tests: + if not tests.strip(): tests = "home.path = '/'" tests = toml.loads(tests)