@@ -329,7 +329,7 @@ def test_instruction
329
329
REXML ::Formatters ::Default . new . write ( instruction , out = "" )
330
330
assert_equal ( source , out )
331
331
332
- d = Document . new ( source )
332
+ d = Document . new ( source + "<a/>" )
333
333
instruction2 = d [ 0 ]
334
334
assert_equal ( instruction . to_s , instruction2 . to_s )
335
335
@@ -875,7 +875,7 @@ def test_entities
875
875
def test_element_decl
876
876
element_decl = Source . new ( "<!DOCTYPE foo [
877
877
<!ELEMENT bar (#PCDATA)>
878
- ]>" )
878
+ ]><a/> " )
879
879
doc = Document . new ( element_decl )
880
880
d = doc [ 0 ]
881
881
assert_equal ( "<!ELEMENT bar (#PCDATA)>" , d . to_s . split ( /\n / ) [ 1 ] . strip )
@@ -1329,7 +1329,7 @@ def test_ticket_53
1329
1329
end
1330
1330
1331
1331
def test_ticket_52
1332
- source = "<!-- this is a single line comment -->"
1332
+ source = "<!-- this is a single line comment --><a/> "
1333
1333
d = REXML ::Document . new ( source )
1334
1334
d . write ( k = "" )
1335
1335
assert_equal ( source , k )
@@ -1408,10 +1408,10 @@ def test_ticket_48_part_II
1408
1408
end
1409
1409
1410
1410
def test_ticket_88
1411
- doc = REXML ::Document . new ( "<?xml version=\" 1.0\" encoding=\" shift_jis\" ?>" )
1412
- assert_equal ( "<?xml version='1.0' encoding='SHIFT_JIS'?>" , doc . to_s )
1413
- doc = REXML ::Document . new ( "<?xml version = \" 1.0\" encoding = \" shift_jis\" ?>" )
1414
- assert_equal ( "<?xml version='1.0' encoding='SHIFT_JIS'?>" , doc . to_s )
1411
+ doc = REXML ::Document . new ( "<?xml version=\" 1.0\" encoding=\" shift_jis\" ?><a/> " )
1412
+ assert_equal ( "<?xml version='1.0' encoding='SHIFT_JIS'?><a/> " , doc . to_s )
1413
+ doc = REXML ::Document . new ( "<?xml version = \" 1.0\" encoding = \" shift_jis\" ?><a/> " )
1414
+ assert_equal ( "<?xml version='1.0' encoding='SHIFT_JIS'?><a/> " , doc . to_s )
1415
1415
end
1416
1416
1417
1417
def test_ticket_85
@@ -1550,10 +1550,6 @@ def test_ticket_138
1550
1550
REXML ::Document . new ( doc . root . to_s ) . root . attributes . to_h )
1551
1551
end
1552
1552
1553
- def test_empty_doc
1554
- assert ( REXML ::Document . new ( '' ) . children . empty? )
1555
- end
1556
-
1557
1553
private
1558
1554
def attribute ( name , value )
1559
1555
REXML ::Attribute . new ( name , value )
0 commit comments