File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
projects/examples/wcf/Test Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,7 @@ static void Main(string[] args)
100
100
Util . WriteLine ( ConsoleColor . Magenta , "\t {0}\n \t {1}" , e . GetType ( ) . Name , e . Message ) ;
101
101
Util . WriteLine ( ConsoleColor . Green , e . StackTrace ) ;
102
102
failed ++ ;
103
+ Environment . ExitCode = - 1 ;
103
104
}
104
105
}
105
106
TimeSpan duration = DateTime . Now . Subtract ( started ) ;
@@ -140,7 +141,7 @@ static int Percent(int a, params int[] values)
140
141
141
142
static void WriteWholeLine ( )
142
143
{
143
- int i = Console . WindowWidth ;
144
+ int i = ConsoleWidth ( ) ;
144
145
while ( i > 1 )
145
146
{
146
147
Console . Write ( " " ) ;
@@ -157,7 +158,7 @@ static void WriteWholeLine(string format, params object[] args)
157
158
static void WriteWholeLine ( string o )
158
159
{
159
160
Console . Write ( o ) ;
160
- int i = Console . WindowWidth ;
161
+ int i = ConsoleWidth ( ) ;
161
162
while ( i > o . Length + 1 )
162
163
{
163
164
Console . Write ( " " ) ;
@@ -166,5 +167,10 @@ static void WriteWholeLine(string o)
166
167
Console . Write ( "\n " ) ;
167
168
168
169
}
170
+
171
+ static int ConsoleWidth ( )
172
+ {
173
+ return Environment . GetEnvironmentVariable ( "TERM" ) == null ? Console . WindowWidth : 80 ;
174
+ }
169
175
}
170
176
}
You can’t perform that action at this time.
0 commit comments