OLD | NEW |
| (Empty) |
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 | |
3 // BSD-style license that can be found in the LICENSE file. | |
4 | |
5 library pub_tests; | |
6 | |
7 import 'package:unittest/unittest.dart'; | |
8 | |
9 import '../lib/src/sdk.dart' as sdk; | |
10 import '../lib/src/version.dart'; | |
11 | |
12 main() { | |
13 group("parseVersion()", () { | |
14 test("parses a release-style version", () { | |
15 expect(sdk.parseVersion("0.1.2.0_r17645"), | |
16 equals(new Version.parse("0.1.2+0.r17645"))); | |
17 }); | |
18 | |
19 test("parses a dev-only style version", () { | |
20 // The "version" file generated on developer builds is a little funky and | |
21 // we need to make sure we don't choke on it. | |
22 expect(sdk.parseVersion("0.1.2.0_r16279_bobross"), | |
23 equals(new Version.parse("0.1.2+0.r16279.bobross"))); | |
24 }); | |
25 }); | |
26 } | |
OLD | NEW |