Skip to content

Conversation

@isidroas
Copy link
Contributor

@isidroas isidroas commented Oct 29, 2024

Commit history summary:

1. 709ce8e

Added long_line.ini test
# These tests are
# only interesting
# when
# INI_MAX_LINE=20

[width = 18]
_123456789=1234567

[width = 19]
_123456789=12345678

[width = 20]
_123456789=123456789

[2 assigns]
_123456789=12345678name=value

[no trailing \n]
# trigger a false
# positive in the
# incomplete line
# detection
_123456782=12345678

with the expected baseline_multi_max_line.txt

... [width = 18]
... _123456789=1234567;
... [width = 19]
... _123456789=12345678;
... [width = 20]
... _123456789=12345678;
... [2 assigns]
... _123456789=12345678;
... [no trailing \n]
... _123456782=12345678;
long_line.ini: e=10 user=100

failing with this error:

diff --git a/tests/baseline_multi_max_line.txt b/tests/baseline_multi_max_line.txt
index e6fbf8a..b63004e 100644
--- a/tests/baseline_multi_max_line.txt
+++ b/tests/baseline_multi_max_line.txt
@@ -6,6 +6,7 @@
... _123456789=12345678;
... [2 assigns]
... _123456789=12345678;
+... name=value;
... [no trailing \n]
... _123456782=12345678;
-long_line.ini: e=10 user=100
+long_line.ini: e=15 user=100

2. 4ef6f60 (fix: report too long lines)

Now it has only one error:

diff --git a/tests/baseline_multi_max_line.txt b/tests/baseline_multi_max_line.txt
index e6fbf8a..be50254 100644
--- a/tests/baseline_multi_max_line.txt
+++ b/tests/baseline_multi_max_line.txt
@@ -6,6 +6,7 @@
 ... _123456789=12345678;
 ... [2 assigns]
 ... _123456789=12345678;
+... name=value;
 ... [no trailing \n]
 ... _123456782=12345678;
 long_line.ini: e=10 user=100

3. a8b025b (fix: discard the rest of the line)

All tests are fixed ✅

Related to #145

@isidroas isidroas changed the title Remove all tests to unclutter failures Replicate and fix long lines Oct 29, 2024
@isidroas
Copy link
Contributor Author

Closing because I am not happy with my solution. However, the test could be reused.

@isidroas isidroas closed this Oct 29, 2024
@isidroas isidroas mentioned this pull request Mar 30, 2025
benhoyt pushed a commit that referenced this pull request Mar 30, 2025
Now that #188 is merged, the tests proposed in #181 are passing.
This PR adds them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant