Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(337)

Side by Side Diff: sdk/lib/_internal/pub/test/lock_file_test.dart

Issue 34803006: Make pubspec.lock keep relative path if it is originally specified as relative in pubspec.yaml (iss… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Improve code according to the code review comments Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 lock_file_test; 5 library lock_file_test;
6 6
7 import 'package:unittest/unittest.dart'; 7 import 'package:unittest/unittest.dart';
8 import 'package:yaml/yaml.dart'; 8 import 'package:yaml/yaml.dart';
9 9
10 import '../lib/src/lock_file.dart'; 10 import '../lib/src/lock_file.dart';
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 setUp(() { 172 setUp(() {
173 lockfile = new LockFile.empty(); 173 lockfile = new LockFile.empty();
174 }); 174 });
175 175
176 test('dumps the lockfile to YAML', () { 176 test('dumps the lockfile to YAML', () {
177 lockfile.packages['foo'] = new PackageId( 177 lockfile.packages['foo'] = new PackageId(
178 'foo', mockSource.name, new Version.parse('1.2.3'), 'foo desc'); 178 'foo', mockSource.name, new Version.parse('1.2.3'), 'foo desc');
179 lockfile.packages['bar'] = new PackageId( 179 lockfile.packages['bar'] = new PackageId(
180 'bar', mockSource.name, new Version.parse('3.2.1'), 'bar desc'); 180 'bar', mockSource.name, new Version.parse('3.2.1'), 'bar desc');
181 181
182 expect(loadYaml(lockfile.serialize()), equals({ 182 expect(loadYaml(lockfile.serialize(null, sources)), equals({
183 'packages': { 183 'packages': {
184 'foo': { 184 'foo': {
185 'version': '1.2.3', 185 'version': '1.2.3',
186 'source': 'mock', 186 'source': 'mock',
187 'description': 'foo desc' 187 'description': 'foo desc'
188 }, 188 },
189 'bar': { 189 'bar': {
190 'version': '3.2.1', 190 'version': '3.2.1',
191 'source': 'mock', 191 'source': 'mock',
192 'description': 'bar desc' 192 'description': 'bar desc'
193 } 193 }
194 } 194 }
195 })); 195 }));
196 }); 196 });
197 }); 197 });
198 }); 198 });
199 } 199 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/pub/test/get/path/relative_path_test.dart ('k') | sdk/lib/_internal/pub/test/test_pub.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698