test(xatu): share lint findings fixture
This commit is contained in:
@@ -34,7 +34,6 @@ rust_test(
|
|||||||
data = [
|
data = [
|
||||||
"testdata/clean.nix",
|
"testdata/clean.nix",
|
||||||
"testdata/invalid.nix",
|
"testdata/invalid.nix",
|
||||||
"testdata/let_order.nix",
|
|
||||||
"testdata/lint_findings.nix",
|
"testdata/lint_findings.nix",
|
||||||
],
|
],
|
||||||
deps = [
|
deps = [
|
||||||
|
|||||||
7
src/xatu/testdata/let_order.nix
vendored
7
src/xatu/testdata/let_order.nix
vendored
@@ -1,7 +0,0 @@
|
|||||||
let
|
|
||||||
second = 2;
|
|
||||||
first = 1;
|
|
||||||
in {
|
|
||||||
firstField = first;
|
|
||||||
secondField = second;
|
|
||||||
}
|
|
||||||
7
src/xatu/testdata/lint_findings.nix
vendored
7
src/xatu/testdata/lint_findings.nix
vendored
@@ -1,5 +1,10 @@
|
|||||||
{
|
let
|
||||||
|
second = 2;
|
||||||
|
first = 1;
|
||||||
|
in {
|
||||||
package = package;
|
package = package;
|
||||||
from = pkgs.from;
|
from = pkgs.from;
|
||||||
url = https://example.com;
|
url = https://example.com;
|
||||||
|
firstField = first;
|
||||||
|
secondField = second;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ fn xatu_rejects_invalid_source() -> googletest::Result<()> {
|
|||||||
|
|
||||||
#[gtest]
|
#[gtest]
|
||||||
fn xatu_reports_out_of_order_let_binding() -> googletest::Result<()> {
|
fn xatu_reports_out_of_order_let_binding() -> googletest::Result<()> {
|
||||||
let report = xatu::future_sight(vec![fixture_source("testdata/let_order.nix")?]).or_fail()?;
|
let report = xatu::future_sight(vec![fixture_source("testdata/lint_findings.nix")?]).or_fail()?;
|
||||||
|
|
||||||
expect_that!(
|
expect_that!(
|
||||||
report
|
report
|
||||||
|
|||||||
Reference in New Issue
Block a user