Skip to content

Commit

Permalink
Test space in the middle of a key (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
xuhdev authored Nov 25, 2024
1 parent e196495 commit 397141d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion parser/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011-2018 EditorConfig Team
# Copyright (c) 2011-2024 EditorConfig Team
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -74,6 +74,9 @@ new_ec_test_multiline(spaces_before_middle_property_ML whitespace.in test10.c
new_ec_test(value_with_whitespace_inside whitespace.in test11.c
"^key=value with whitespace inside[\n\r]+$")

# test spaces in the middle of a key
new_ec_test(spaces_in_middle_key whitespace.in test12.c "ke y=value[ \t\n\r]*")

# Tests for comment parsing

# test comments ignored before properties
Expand Down
4 changes: 4 additions & 0 deletions parser/whitespace.in
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,7 @@ key3=value3
; value with whitespace inside and the leading and trailing ws ignored
[test11.c]
key= value with whitespace inside

; space in the middle of a key
[test12.c]
ke y=value

0 comments on commit 397141d

Please sign in to comment.