Write a proper check

This commit is contained in:
2026-05-19 23:24:52 +09:00
parent 8e8a4b172d
commit 29ff01b8fe
+12 -3
View File
@@ -93,9 +93,18 @@
];
};
in {
inherit sqlite-example-exts-static;
sqlite-with-static-ext = sqlite-with-static-exts.sqlite;
sqlite-cli-with-static-ext = sqlite-with-static-exts.sqlite-cli;
checkExts = pkgs.runCommand "test-sqlite-with-static-exts" {
nativeBuildInputs = [ sqlite-with-static-exts.sqlite-cli ];
passthru = {
inherit sqlite-example-exts-static;
inherit sqlite-with-static-exts;
};
} ''
mkdir -p "$out"
sqlite3 :memory: <<<"SELECT myadd(1, 2), mysub(5, 3), mymult(4, 6);" | tee "$out/test.log"
grep -q -F "3|2|24" "$out/test.log" || (echo "Unexpected output from sqlite3 with static extensions" && exit 1)
'';
});
};
}