codebook 0.3.42

A code-aware spell checker library (dependency for codebook-lsp)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use codebook::queries::LanguageType;

use super::utils::assert_spelling;

#[test]
fn test_toml_location() {
    let sample_toml = r#"
        name = "testx"
        [dependencies]
        toml = "0.5.8"
        testz = "0.1.0"
"#;
    // Dependency keys ("testz") are not spell-checked; string values are.
    assert_spelling(LanguageType::TOML, sample_toml, &["testx"], &["testz"]);
}