You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
623 B
22 lines
623 B
// The version of the library is written twice, in pubspec.yaml and in
|
|
// lib/src/version.dart: they must agree.
|
|
@TestOn('vm')
|
|
library;
|
|
|
|
import 'dart:io';
|
|
|
|
import 'package:datekeys/datekeys.dart';
|
|
import 'package:test/test.dart';
|
|
|
|
void main() {
|
|
test('pubspec.yaml declares the version of lib/src/version.dart', () {
|
|
final pubspec = File('pubspec.yaml').readAsLinesSync();
|
|
final line = pubspec.singleWhere((l) => l.startsWith('version: '));
|
|
expect(line, 'version: $version');
|
|
});
|
|
|
|
test('the specification is a version of two numbers', () {
|
|
expect(specVersion, matches(RegExp(r'^0\.[0-9]+$')));
|
|
});
|
|
}
|