From d437e0542fee936257cf7a09bae62831d66cd32a Mon Sep 17 00:00:00 2001 From: Christoph Berg Date: Tue, 14 Jul 2026 12:34:35 +0200 Subject: [PATCH] Relax check for expected size of test image On Ubuntu's httpbin server, the file served at /image/png has a different size (5642 bytes instead of 8090). Allow some slack in the test output. In passing, tell .editorconfig that expected output files have trailing whitespace that needs to be preserved. --- .editorconfig | 4 ++++ expected/http.out | 4 ++-- sql/http.sql | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.editorconfig b/.editorconfig index dbcf78e..8f70cdf 100644 --- a/.editorconfig +++ b/.editorconfig @@ -14,6 +14,10 @@ insert_final_newline = true [*.{c,h}] indent_style = tab +# expected output files have trailing whitespace +[*.out] +trim_trailing_whitespace = false + # YAML files want space indentation [*.{yml}] indent_style = space diff --git a/expected/http.out b/expected/http.out index cb6e94a..bbc7e0a 100644 --- a/expected/http.out +++ b/expected/http.out @@ -181,12 +181,12 @@ WITH ) SELECT http.content_type, - length(text_to_bytea(http.content)) AS length_binary + length(text_to_bytea(http.content)) between 5000 and 9000 AS length_binary FROM http, headers WHERE field ilike 'Content-Type'; content_type | length_binary --------------+--------------- - image/png | 8090 + image/png | t (1 row) -- Alter options and and reset them and throw errors diff --git a/sql/http.sql b/sql/http.sql index 860d762..f25d53b 100644 --- a/sql/http.sql +++ b/sql/http.sql @@ -123,7 +123,7 @@ WITH ) SELECT http.content_type, - length(text_to_bytea(http.content)) AS length_binary + length(text_to_bytea(http.content)) between 5000 and 9000 AS length_binary FROM http, headers WHERE field ilike 'Content-Type';