| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS d.file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS d.file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library pub_tests; | 5 library pub_tests; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:scheduled_test/scheduled_test.dart'; | 9 import 'package:scheduled_test/scheduled_test.dart'; |
| 10 | 10 |
| 11 import '../../descriptor.dart' as d; | 11 import '../../descriptor.dart' as d; |
| 12 import '../../test_pub.dart'; | 12 import '../../test_pub.dart'; |
| 13 import '../utils.dart'; | 13 import '../utils.dart'; |
| 14 | 14 |
| 15 main() { | 15 main() { |
| 16 initConfig(); | |
| 17 integration("binds a directory to a new port and immediately unbinds that " | 16 integration("binds a directory to a new port and immediately unbinds that " |
| 18 "directory", () { | 17 "directory", () { |
| 19 d.dir(appPath, [ | 18 d.dir(appPath, [ |
| 20 d.appPubspec(), | 19 d.appPubspec(), |
| 21 d.dir("test", [ | 20 d.dir("test", [ |
| 22 d.file("index.html", "<test body>") | 21 d.file("index.html", "<test body>") |
| 23 ]), | 22 ]), |
| 24 d.dir("web", [ | 23 d.dir("web", [ |
| 25 d.file("index.html", "<body>") | 24 d.file("index.html", "<body>") |
| 26 ]) | 25 ]) |
| (...skipping 16 matching lines...) Expand all Loading... |
| 43 // server that was turned off. We're asserting that the same server was | 42 // server that was turned off. We're asserting that the same server was |
| 44 // both started and stopped. | 43 // both started and stopped. |
| 45 expect(results[0]["result"]["url"], matches(r"http://localhost:\d+")); | 44 expect(results[0]["result"]["url"], matches(r"http://localhost:\d+")); |
| 46 expect(results[0]["result"], equals(results[1]["result"])); | 45 expect(results[0]["result"], equals(results[1]["result"])); |
| 47 }); | 46 }); |
| 48 }); | 47 }); |
| 49 | 48 |
| 50 endPubServe(); | 49 endPubServe(); |
| 51 }); | 50 }); |
| 52 } | 51 } |
| OLD | NEW |