Sha256: 3fc6ee10d5fbe44bfa105a52909955637b3ce8d587f23994ff8a47636680676f

Contents?: true

Size: 945 Bytes

Versions: 8

Compression:

Stored size: 945 Bytes

Contents

use toml_edit::DocumentMut;

fn main() {
    let args = libtest_mimic::Arguments::from_args();
    let tests = toml_test_data::invalid()
        .map(|case| {
            libtest_mimic::Trial::test(case.name.display().to_string(), || {
                let expect_path =
                    std::path::Path::new("tests/fixtures").join(case.name.with_extension("stderr"));
                let err = match run_case(case.fixture) {
                    Ok(()) => "".to_owned(),
                    Err(err) => err,
                };
                snapbox::assert_data_eq!(err, snapbox::Data::read_from(&expect_path, None).raw());
                Ok(())
            })
        })
        .collect();
    libtest_mimic::run(&args, tests).exit()
}

fn run_case(input: &[u8]) -> Result<(), String> {
    let raw = std::str::from_utf8(input).map_err(|e| e.to_string())?;
    let _ = raw.parse::<DocumentMut>().map_err(|e| e.to_string())?;
    Ok(())
}

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
wasmtime-29.0.0 ./ext/cargo-vendor/toml_edit-0.22.22/tests/invalid.rs
wasmtime-28.0.0 ./ext/cargo-vendor/toml_edit-0.22.22/tests/invalid.rs
wasmtime-27.0.0 ./ext/cargo-vendor/toml_edit-0.22.22/tests/invalid.rs
wasmtime-26.0.0 ./ext/cargo-vendor/toml_edit-0.22.22/tests/invalid.rs
wasmtime-25.0.2 ./ext/cargo-vendor/toml_edit-0.22.20/tests/invalid.rs
wasmtime-25.0.1 ./ext/cargo-vendor/toml_edit-0.22.20/tests/invalid.rs
wasmtime-25.0.0 ./ext/cargo-vendor/toml_edit-0.22.20/tests/invalid.rs
wasmtime-24.0.0 ./ext/cargo-vendor/toml_edit-0.22.20/tests/invalid.rs