nixpkgs/pkgs/tools/networking/lychee/tests/ok.nix
Robert Hensing e0c43a96d2
testers.lycheeLinkCheck: init (#298665)
* testers.lycheeLinkCheck: init

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2024-05-27 01:14:19 +02:00

13 lines
459 B
Nix

{ runCommand, testers }:
let
sitePkg = runCommand "site" { } ''
dist=$out/dist
mkdir -p $dist
echo "<html><body><a href=\"https://example.com/foo.html\">foo</a><a href=\"https://nixos.org/this-is-ignored.html\">bar</a></body></html>" > $dist/index.html
echo "<html><body><a href=\".\">index</a></body></html>" > $dist/foo.html
'';
in testers.lycheeLinkCheck rec {
site = sitePkg + "/dist";
remap = { "https://example.com" = site; };
}