fix(natu): preserve NixOS cfg bindings
This commit was merged in pull request #104.
This commit is contained in:
@@ -65,6 +65,18 @@ fn natu_reports_out_of_order_let_bindings() -> googletest::Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[gtest]
|
||||
fn natu_preserves_nixos_cfg_bindings() -> googletest::Result<()> {
|
||||
let report = natu::future_sight(vec![SourceFile {
|
||||
path: PathBuf::from("configs/nixos/test.nix"),
|
||||
source: "{ config, ... }: let\n cfg = config.example;\n value = cfg;\nin value\n".into(),
|
||||
}])
|
||||
.or_fail()?;
|
||||
|
||||
expect_that!(report.is_clean(), is_true());
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[gtest]
|
||||
fn natu_reports_unquoted_uri() -> googletest::Result<()> {
|
||||
let report = natu::future_sight(vec![fixture_source("testdata/lint_findings.nix")?]).or_fail()?;
|
||||
|
||||
Reference in New Issue
Block a user