@@ -391,11 +391,11 @@ selftest.define("run and SIGKILL parent process", ["yet-unsolved-windows-failure
391391 run . stop ( ) ;
392392} ) ;
393393
394- selftest . define ( "'meteor run --port' requires a port " , function ( ) {
394+ selftest . define ( "'meteor run --port' accepts/rejects proper values " , function ( ) {
395395 var s = new Sandbox ( ) ;
396396 var run ;
397397
398- s . createApp ( "myapp" , "app-prints-pid " ) ;
398+ s . createApp ( "myapp" , "standard-app " ) ;
399399 s . cd ( "myapp" ) ;
400400
401401 run = s . run ( "run" , "--port" , "example.com" ) ;
@@ -407,6 +407,37 @@ selftest.define("'meteor run --port' requires a port", function () {
407407 run . waitSecs ( 30 ) ;
408408 run . matchErr ( "--port must include a port" ) ;
409409 run . expectExit ( 1 ) ;
410+
411+ run = s . run ( "run" , "--port" , "3500" ) ;
412+ run . match ( 'App running at: http://localhost:3500/' ) ;
413+ run . stop ( ) ;
414+
415+ run = s . run ( "run" , "--port" , "127.0.0.1:3500" ) ;
416+ run . match ( 'App running at: http://127.0.0.1:3500/' ) ;
417+ run . stop ( ) ;
418+ } ) ;
419+
420+ selftest . define ( "'meteor test --port' accepts/rejects proper values" , function ( ) {
421+ var s = new Sandbox ( ) ;
422+ var run ;
423+
424+ s . createApp ( "myapp" , "standard-app" ) ;
425+ s . cd ( "myapp" ) ;
426+
427+ var runAddPackage = s . run ( "add" , "practicalmeteor:mocha" ) ;
428+ runAddPackage . waitSecs ( 30 ) ;
429+ runAddPackage . match ( / p r a c t i c a l m e t e o r : m o c h a \b .* ?a d d e d / )
430+ runAddPackage . expectExit ( 0 ) ;
431+
432+ run = s . run ( "test" , "--port" , "3700" , "--driver-package" , "practicalmeteor:mocha" ) ;
433+ run . waitSecs ( 30 ) ;
434+ run . match ( 'App running at: http://localhost:3700/' ) ;
435+ run . stop ( ) ;
436+
437+ run = s . run ( "test" , "--port" , "127.0.0.1:3700" , "--driver-package" , "practicalmeteor:mocha" ) ;
438+ run . waitSecs ( 30 ) ;
439+ run . match ( 'App running at: http://127.0.0.1:3700/' ) ;
440+ run . stop ( ) ;
410441} ) ;
411442
412443// Regression test for #3582. Previously, meteor run would ignore changes to
0 commit comments