// 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]+$'))); }); }