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; | |
6 | |
7 import 'package:json_rpc_2/error_code.dart' as rpc_error_code; | 5 import 'package:json_rpc_2/error_code.dart' as rpc_error_code; |
8 import 'package:scheduled_test/scheduled_test.dart'; | 6 import 'package:scheduled_test/scheduled_test.dart'; |
9 | 7 |
10 import '../../descriptor.dart' as d; | 8 import '../../descriptor.dart' as d; |
11 import '../../test_pub.dart'; | 9 import '../../test_pub.dart'; |
12 import '../utils.dart'; | 10 import '../utils.dart'; |
13 | 11 |
14 main() { | 12 main() { |
15 setUp(() { | 13 setUp(() { |
16 d.dir(appPath, [ | 14 d.dir(appPath, [ |
(...skipping 24 matching lines...) Expand all Loading... |
41 | 39 |
42 integration("responds with an error if 'path' reaches out", () { | 40 integration("responds with an error if 'path' reaches out", () { |
43 pubServe(); | 41 pubServe(); |
44 expectWebSocketError("unserveDirectory", {"path": "a/../../bad.txt"}, | 42 expectWebSocketError("unserveDirectory", {"path": "a/../../bad.txt"}, |
45 rpc_error_code.INVALID_PARAMS, | 43 rpc_error_code.INVALID_PARAMS, |
46 '"path" cannot reach out of its containing directory. Got ' | 44 '"path" cannot reach out of its containing directory. Got ' |
47 '"a/../../bad.txt".'); | 45 '"a/../../bad.txt".'); |
48 endPubServe(); | 46 endPubServe(); |
49 }); | 47 }); |
50 } | 48 } |
OLD | NEW |