File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -218,6 +218,19 @@ def test_entity_value_and_notation_data_declaration
218
218
DETAIL
219
219
end
220
220
end
221
+
222
+ def test_no_space
223
+ exception = assert_raise ( REXML ::ParseException ) do
224
+ REXML ::Document . new ( '<!DOCTYPE root [<!ENTITY valid-namePUBLIC"valid-pubid-literal""valid-system-literal"NDATAvalid-name>]>' )
225
+ end
226
+ assert_equal ( <<-DETAIL . chomp , exception . to_s )
227
+ Malformed entity declaration
228
+ Line: 1
229
+ Position: 102
230
+ Last 80 unconsumed characters:
231
+ valid-namePUBLIC\" valid-pubid-literal\" \" valid-system-literal\" NDATAvalid-name>]>
232
+ DETAIL
233
+ end
221
234
end
222
235
223
236
# https://www.w3.org/TR/2006/REC-xml11-20060816/#NT-PEDecl
@@ -397,6 +410,19 @@ def test_entity_value_and_notation_data_declaration
397
410
DETAIL
398
411
end
399
412
end
413
+
414
+ def test_no_space
415
+ exception = assert_raise ( REXML ::ParseException ) do
416
+ REXML ::Document . new ( '<!DOCTYPE root [<!ENTITY %valid-nameSYSTEM"valid-system-literal">]>' )
417
+ end
418
+ assert_equal ( <<-DETAIL . chomp , exception . to_s )
419
+ Malformed entity declaration
420
+ Line: 1
421
+ Position: 67
422
+ Last 80 unconsumed characters:
423
+ %valid-nameSYSTEM\" valid-system-literal\" >]>
424
+ DETAIL
425
+ end
400
426
end
401
427
402
428
def test_empty
You can’t perform that action at this time.
0 commit comments