OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS 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('reader_test'); | 5 #library('reader_test'); |
6 | 6 |
7 #import('dart:io'); | 7 #import('dart:io'); |
8 #import('../../../lib/unittest/unittest.dart'); | 8 #import('../../../pkg/unittest/unittest.dart'); |
9 #import('../../archive/archive.dart'); | 9 #import('../../archive/archive.dart'); |
10 | 10 |
11 final String dataPath = "utils/tests/archive/data"; | 11 final String dataPath = "utils/tests/archive/data"; |
12 | 12 |
13 main() { | 13 main() { |
14 test('reading a .tar.gz file', () { | 14 test('reading a .tar.gz file', () { |
15 var asyncDone = expectAsync0(() {}); | 15 var asyncDone = expectAsync0(() {}); |
16 | 16 |
17 var reader = new ArchiveReader(); | 17 var reader = new ArchiveReader(); |
18 reader.format.tar = true; | 18 reader.format.tar = true; |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 test("opening a non-existent archive", () { | 189 test("opening a non-existent archive", () { |
190 var reader = new ArchiveReader(); | 190 var reader = new ArchiveReader(); |
191 reader.format.tar = true; | 191 reader.format.tar = true; |
192 reader.filter.gzip = true; | 192 reader.filter.gzip = true; |
193 | 193 |
194 expect(reader.openFilename("$dataPath/non-existent.tar.gz"), | 194 expect(reader.openFilename("$dataPath/non-existent.tar.gz"), |
195 throwsA((e) => e is ArchiveException)); | 195 throwsA((e) => e is ArchiveException)); |
196 }); | 196 }); |
197 } | 197 } |
198 | 198 |
OLD | NEW |