Skip to content

Commit db916a4

Browse files
committed
fix_publish_rejection_test
1 parent 9ccce20 commit db916a4

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

pkg/pub_integration/test/publish_rejection_test.dart

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,10 @@ void main() {
6565

6666
// customize content to clear publishing warnings
6767
final pubspecFile = File(p.join(pkgDir, 'pubspec.yaml'));
68-
final pubspecContent = await pubspecFile.readAsString();
68+
final pubspecContent = (await pubspecFile.readAsString())
69+
// Avoid specific sdk constraint.
70+
.replaceFirst(RegExp('sdk: .*'), 'sdk: ^3.0.0');
71+
6972
await pubspecFile.writeAsString(
7073
'homepage: https://github.com/abc/xyz\n$pubspecContent');
7174
await File(p.join(pkgDir, 'LICENSE'))
@@ -75,8 +78,8 @@ void main() {
7578
await localDartTool.publish(
7679
pkgDir,
7780
expectedErrorContains:
78-
'`description` contains a generic text fragment coming from package templates (`A sample command-line application`).\n'
79-
'Please follow the guides to describe your package:\n'
81+
'`description` contains a generic text fragment coming from package templates (`A sample command-line application`). '
82+
'Please follow the guides to describe your package: '
8083
'https://dart.dev/tools/pub/pubspec#description',
8184
);
8285
} finally {

0 commit comments

Comments
 (0)