소스 검색

2004-06-06 Atsushi Enomoto <[email protected]>

	* XmlTextWriterTests.cs : Added indentation testcase (it might now
	  work due to CompareInfo.IndexOf() bug).

svn path=/trunk/mcs/; revision=28910
Atsushi Eno 21 년 전
부모
커밋
d4e8a093ba
2개의 변경된 파일17개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      mcs/class/System.XML/Test/System.Xml/ChangeLog
  2. 12 0
      mcs/class/System.XML/Test/System.Xml/XmlTextWriterTests.cs

+ 5 - 0
mcs/class/System.XML/Test/System.Xml/ChangeLog

@@ -1,3 +1,8 @@
+2004-06-06  Atsushi Enomoto <[email protected]>
+
+	* XmlTextWriterTests.cs : Added indentation testcase (it might now
+	  work due to CompareInfo.IndexOf() bug).
+
 2004-06-06  Atsushi Enomoto <[email protected]>
 
 	* XmlTextReaderTests.cs : added some namespace check tests.

+ 12 - 0
mcs/class/System.XML/Test/System.Xml/XmlTextWriterTests.cs

@@ -1251,5 +1251,17 @@ namespace MonoTests.System.Xml
 			xtw.WriteRaw ("");
 			AssertEquals (WriteState.Prolog, xtw.WriteState);
 		}
+
+		[Test]
+		public void Indent ()
+		{
+			XmlDocument doc = new XmlDocument ();
+			doc.LoadXml ("<root><test>test<foo></foo>string</test><test>string</test></root>");
+			StringWriter sw = new StringWriter ();
+			XmlTextWriter xtw = new XmlTextWriter (sw);
+			xtw.Formatting = Formatting.Indented;
+			doc.WriteContentTo (xtw);
+			AssertEquals (@"<root>\n  <test>test<foo></foo>string</test>\n  <test>string</test>\n</root>", sw.ToString ().Replace ("\r\n", "\n"));
+		}
 	}
 }