@@ -6,7 +6,6 @@ var sys = require('util');
66var BufferList = require ( __dirname + '/buffer-list' )
77
88var Connection = require ( __dirname + '/../lib/connection' ) ;
9- var args = require ( __dirname + '/cli' ) ;
109
1110Client = require ( __dirname + '/../lib' ) . Client ;
1211
@@ -143,47 +142,21 @@ assert.isNull = function(item, message) {
143142
144143test = function ( name , action ) {
145144 test . testCount ++ ;
146- if ( args . verbose ) {
147- console . log ( name ) ;
148- }
149145 var result = action ( ) ;
150146 if ( result === false ) {
151- test . ignored . push ( name ) ;
152- if ( ! args . verbose ) {
153- process . stdout . write ( '?' ) ;
154- }
147+ process . stdout . write ( '?' ) ;
155148 } else {
156- if ( ! args . verbose ) {
157- process . stdout . write ( '.' ) ;
158- }
149+ process . stdout . write ( '.' ) ;
159150 }
160151} ;
161152
162153//print out the filename
163154process . stdout . write ( require ( 'path' ) . basename ( process . argv [ 1 ] ) ) ;
164- //print a new line since we'll be printing test names
165- if ( args . verbose ) {
166- console . log ( ) ;
167- }
168- test . testCount = test . testCount || 0 ;
169- test . ignored = test . ignored || [ ] ;
170- test . errors = test . errors || [ ] ;
171-
172- process . on ( 'exit' , function ( ) {
173- console . log ( '' ) ;
174- if ( test . ignored . length || test . errors . length ) {
175- test . ignored . forEach ( function ( name ) {
176- console . log ( "Ignored: " + name ) ;
177- } ) ;
178- test . errors . forEach ( function ( error ) {
179- console . log ( "Error: " + error . name ) ;
180- } ) ;
181- console . log ( '' ) ;
182- }
183- test . errors . forEach ( function ( error ) {
184- throw error . e ;
185- } ) ;
186- } ) ;
155+ var args = require ( __dirname + '/cli' ) ;
156+ if ( args . binary ) process . stdout . write ( ' (binary)' ) ;
157+ if ( args . native ) process . stdout . write ( ' (native)' ) ;
158+
159+ process . on ( 'exit' , console . log )
187160
188161process . on ( 'uncaughtException' , function ( err ) {
189162 console . error ( "\n %s" , err . stack || err . toString ( ) )
@@ -221,10 +194,11 @@ var Sink = function(expected, timeout, callback) {
221194 }
222195}
223196
197+
224198module . exports = {
225- args : args ,
226199 Sink : Sink ,
227200 pg : require ( __dirname + '/../lib/' ) ,
201+ args : args ,
228202 config : args ,
229203 sys : sys ,
230204 Client : Client
0 commit comments