Skip to content

Commit

Permalink
Added test in javacontainer_ctpg_test.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
tomuben committed Oct 24, 2024
1 parent 67d283e commit ba49667
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,19 @@ TEST(JavaContainer, import_script_with_escaped_options) {
"-XX:+UseSerialGC" };
EXPECT_EQ(vm.getJavaVMInternalStatus().m_jvmOptions, expectedJVMOptions);
}

TEST(JavaContainer, basic_jars_order_remains) {
const std::string script_code = "%jar base/javacontainer/test/test1.jar:base/javacontainer/test/abc.jar;";

EXPECT_THROW({
try
{
JavaVMTest vm(script_code);
}
catch( const SWIGVMContainers::JavaVMach::exception& e )
{
EXPECT_THAT( e.what(), MatchesRegex("^.*Java VM cannot find 'base/javacontainer/test/test1\\.jar': No such file or directory$"));
throw;
}
}, SWIGVMContainers::JavaVMach::exception );
}

0 comments on commit ba49667

Please sign in to comment.