Edge case on flutter/flutter/issues/135402 with test (#138814)

fixes flutter/flutter/issues/135402
Edge case that was reported by a user along with a test case specifically covering their output.
This commit is contained in:
Reid Baker
2023-11-27 11:14:58 -05:00
committed by GitHub
parent 2328995804
commit 311193d3f1
2 changed files with 12 additions and 3 deletions

View File

@@ -296,6 +296,15 @@ Java HotSpot(TM) 64-Bit Server VM (build 21+35-LTS-2513, mixed mode, sharing)
java 21 2023-09-19 LTS
Java(TM) SE Runtime Environment (build 21+35-LTS-2513)
Java HotSpot(TM) 64-Bit Server VM (build 21+35-LTS-2513, mixed mode, sharing)
''');
final Version? version = java.version;
expect(version, equals(Version(21, 0, 0)));
});
testWithoutContext('parses openjdk 21 with no patch numbers', () {
addJavaVersionCommand('''
openjdk version "21" 2023-09-19
OpenJDK Runtime Environment (build 21+35)
OpenJDK 64-Bit Server VM (build 21+35, mixed mode, sharing)
''');
final Version? version = java.version;
expect(version, equals(Version(21, 0, 0)));