@@ -17,40 +17,40 @@ public ContentsTests (ITestOutputHelper output)
17
17
this . output = output ;
18
18
}
19
19
20
- [ Theory ]
20
+ [ Theory , AutoInitShutdown ]
21
21
[ InlineData ( typeof ( FakeDriver ) ) ]
22
22
//[InlineData (typeof (NetDriver))]
23
23
//[InlineData (typeof (CursesDriver))]
24
24
//[InlineData (typeof (WindowsDriver))]
25
25
public void AddStr_With_Combining_Characters ( Type driverType )
26
26
{
27
- var driver = ( ConsoleDriver ) Activator . CreateInstance ( driverType ) ;
28
- Application . Init ( driver ) ;
29
- // driver.Init (null);
27
+ Application . Init ( ) ;
30
28
31
29
var acuteaccent = new System . Text . Rune ( 0x0301 ) ; // Combining acute accent (é)
32
30
var combined = "e" + acuteaccent ;
33
31
var expected = "é" ;
34
32
35
- driver . AddStr ( combined ) ;
36
- TestHelpers . AssertDriverContentsWithFrameAre ( expected , output ) ;
37
-
38
- #if false // Disabled Until #2616 is fixed
33
+ Application . Driver . AddStr ( combined ) ;
34
+ TestHelpers . AssertDriverContentsAre ( expected , output ) ;
39
35
40
36
// 3 char combine
41
- // a + ogonek + acute = <U+0061, U+0328, U+0301> ( ǫ́ )
37
+ // a + ogonek + acute = <U+0061, U+0328, U+0301> ( ą́ )
42
38
var ogonek = new System . Text . Rune ( 0x0328 ) ; // Combining ogonek (a small hook or comma shape)
43
39
combined = "a" + ogonek + acuteaccent ;
44
- expected = "ǫ́ " ;
40
+ expected = "ą́ " ;
45
41
46
- driver . Move ( 0 , 0 ) ;
47
- driver . AddStr ( combined ) ;
48
- TestHelpers . AssertDriverContentsWithFrameAre ( expected , output ) ;
42
+ Application . Driver . Move ( 0 , 0 ) ;
43
+ Application . Driver . AddStr ( combined ) ;
44
+ TestHelpers . AssertDriverContentsAre ( expected , output ) ;
49
45
50
- #endif
51
-
52
- // Shutdown must be called to safely clean up Application if Init has been called
53
- Application . Shutdown ( ) ;
46
+ // o + ogonek + acute = <U+0061, U+0328, U+0301> ( ǫ́ )
47
+ ogonek = new System . Text . Rune ( 0x0328 ) ; // Combining ogonek (a small hook or comma shape)
48
+ combined = "o" + ogonek + acuteaccent ;
49
+ expected = "ǫ́" ;
50
+
51
+ Application . Driver . Move ( 0 , 0 ) ;
52
+ Application . Driver . AddStr ( combined ) ;
53
+ TestHelpers . AssertDriverContentsAre ( expected , output ) ;
54
54
}
55
55
56
56
[ Theory ]
@@ -91,7 +91,7 @@ public void Move_Bad_Coordinates (Type driverType)
91
91
}
92
92
93
93
// TODO: Add these unit tests
94
-
94
+
95
95
// AddRune moves correctly
96
96
97
97
// AddRune with wide characters are handled correctly
0 commit comments