jspg additional properties bug squashed

This commit is contained in:
2025-09-30 19:56:34 -04:00
parent cc04f38c14
commit d6b34c99bb
26 changed files with 6340 additions and 6328 deletions

View File

@ -3,42 +3,42 @@ use std::fs;
use boon::{CompileError, Compiler, Schemas};
fn test(path: &str) -> Result<(), CompileError> {
let mut schemas = Schemas::new();
let mut compiler = Compiler::new();
compiler.compile(path, &mut schemas)?;
Ok(())
let mut schemas = Schemas::new();
let mut compiler = Compiler::new();
compiler.compile(path, &mut schemas)?;
Ok(())
}
#[test]
fn test_absolute() -> Result<(), CompileError> {
let path = fs::canonicalize("tests/examples/schema.json").unwrap();
test(path.to_string_lossy().as_ref())
let path = fs::canonicalize("tests/examples/schema.json").unwrap();
test(path.to_string_lossy().as_ref())
}
#[test]
fn test_relative_slash() -> Result<(), CompileError> {
test("tests/examples/schema.json")
test("tests/examples/schema.json")
}
#[test]
#[cfg(windows)]
fn test_relative_backslash() -> Result<(), CompileError> {
test("tests\\examples\\schema.json")
test("tests\\examples\\schema.json")
}
#[test]
fn test_absolutei_space() -> Result<(), CompileError> {
let path = fs::canonicalize("tests/examples/sample schema.json").unwrap();
test(path.to_string_lossy().as_ref())
let path = fs::canonicalize("tests/examples/sample schema.json").unwrap();
test(path.to_string_lossy().as_ref())
}
#[test]
fn test_relative_slash_space() -> Result<(), CompileError> {
test("tests/examples/sample schema.json")
test("tests/examples/sample schema.json")
}
#[test]
#[cfg(windows)]
fn test_relative_backslash_space() -> Result<(), CompileError> {
test("tests\\examples\\sample schema.json")
test("tests\\examples\\sample schema.json")
}