From ba4966744d9f41d0e088455e060f62fdf349de11 Mon Sep 17 00:00:00 2001 From: Thomas Ubensee <34603111+tomuben@users.noreply.github.com> Date: Thu, 24 Oct 2024 10:36:36 -0300 Subject: [PATCH] Added test in javacontainer_ctpg_test.cc --- .../test/cpp/javacontainer_ctpg_test.cc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/exaudfclient/base/javacontainer/test/cpp/javacontainer_ctpg_test.cc b/exaudfclient/base/javacontainer/test/cpp/javacontainer_ctpg_test.cc index e66168e5..c8cf50ca 100644 --- a/exaudfclient/base/javacontainer/test/cpp/javacontainer_ctpg_test.cc +++ b/exaudfclient/base/javacontainer/test/cpp/javacontainer_ctpg_test.cc @@ -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 ); +} \ No newline at end of file