File tree 2 files changed +14
-1
lines changed
2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -452,6 +452,16 @@ LUM-2345'
452
452
[[ " $status " -eq 0 ]]
453
453
}
454
454
455
+ @test " body with 100+ line length should be valid if no space" {
456
+ MESSAGE='
457
+ 0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_
458
+
459
+ LUM-2345'
460
+
461
+ run validate_body_length " $MESSAGE "
462
+ [[ " $status " -eq 0 ]]
463
+ }
464
+
455
465
@test " body with trailing space on line should not be valid" {
456
466
MESSAGE=' pdzofjzf '
457
467
@@ -612,7 +622,7 @@ LUM-2345'
612
622
@test " overall validation invalid body length" {
613
623
MESSAGE=' feat(scope1): subject
614
624
615
- 12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901
625
+ 1 2 3 4 5678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901
616
626
617
627
LUM-2345'
618
628
Original file line number Diff line number Diff line change @@ -189,6 +189,9 @@ validate_body_length() {
189
189
190
190
while IFS= read -r LINE ;
191
191
do
192
+ # Skip lines with no spaces as they can't be split
193
+ $( echo -n " $LINE " | grep -q " \s" ) || continue
194
+
192
195
local LENGTH
193
196
194
197
LENGTH=" $( echo -n " $LINE " | wc -c) "
You can’t perform that action at this time.
0 commit comments