forked from Cutieguwu/raven
Refactored assets to use propper java syntax. Found error in the raven test command. Impropper formating when passing arguments to the java command.
This commit is contained in:
@@ -140,14 +140,14 @@ fn init() -> anyhow::Result<()> {
|
||||
f.write_all(include_bytes!("../assets/src/main/Main.java"))?;
|
||||
}
|
||||
|
||||
// Make src/test/Main.java
|
||||
// Make src/test/Test.java
|
||||
if let Result::Ok(mut f) = OpenOptions::new().write(true).create_new(is_empty).open(
|
||||
DIR_TEST
|
||||
.clone()
|
||||
.join("Main")
|
||||
.join("Test")
|
||||
.with_extension(JAVA_EXT_SOURCE),
|
||||
) {
|
||||
f.write_all(include_bytes!("../assets/src/test/Main.java"))?;
|
||||
f.write_all(include_bytes!("../assets/src/test/Test.java"))?;
|
||||
}
|
||||
|
||||
// git init .
|
||||
@@ -248,15 +248,18 @@ fn run<P: AsRef<Path>>(
|
||||
}
|
||||
|
||||
fn test(assertions: bool) -> anyhow::Result<(Option<String>, Option<String>)> {
|
||||
println!("Fence 1");
|
||||
java::CompilerBuilder::new()
|
||||
.class_path(DIR_TARGET.as_path())
|
||||
.destination(DIR_TARGET.as_path())
|
||||
.build()
|
||||
.compile(DIR_TEST.as_path())?;
|
||||
|
||||
println!("Fence 2");
|
||||
// Change cwd to avoid Java pathing issues.
|
||||
crate::env::set_cwd(DIR_TARGET.as_path())?;
|
||||
|
||||
println!("Fence 3");
|
||||
java::JVMBuilder::new()
|
||||
.assertions(assertions)
|
||||
.ram_min(ByteSize::mib(128))
|
||||
|
||||
Reference in New Issue
Block a user