Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.20.1 #200

Merged
merged 3 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: dart_apitool
description: A tool to analyze the public API of a package, create a model of it and diff it against another version to check semver.
repository: https://github.com/bmw-tech/dart_apitool

version: 0.20.1-dev
version: 0.20.2-dev

environment:
sdk: ">=3.0.0 <4.0.0"
Expand Down
41 changes: 40 additions & 1 deletion test/integration_tests/cli/extract_command_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,8 @@ void main() {
},
timeout: integrationTestTimeout,
);
test('Can handle ffigen dependency overrides correctly', () async {
test('Can handle ffigen dependency overrides correctly (pub ref)',
() async {
final packageName = 'ffigen';
final packageVersion = '16.0.0';

Expand All @@ -251,5 +252,43 @@ void main() {
]);
expect(exitCode, 0);
});
test('Can handle ffigen dependency overrides correctly (git ref)',
() async {
final gitUrl = 'https://github.com/dart-lang/native.git';
final gitRef = 'cb477002e2d2559975d76165210eeca98821688d';
final relativePath = 'pkgs/ffigen';

// create temporary directory
final tempDir = await Directory.systemTemp.createTemp();

try {
// clone repo
final resultClone = Process.runSync('git', [
'clone',
gitUrl,
tempDir.path,
]);
assert(resultClone.exitCode == 0);

// checkout ref
final resultCheckout = Process.runSync(
'git',
[
'checkout',
gitRef,
],
workingDirectory: tempDir.path);
assert(resultCheckout.exitCode == 0);

final exitCode = await runner.run([
'extract',
'--input',
'${tempDir.path}/$relativePath',
]);
expect(exitCode, 0);
} finally {
tempDir.deleteSync(recursive: true);
}
});
});
}
Loading