diff options
author | Vincenzo Mantova <1962985+xworld21@users.noreply.github.com> | 2023-07-10 21:28:36 +0100 |
---|---|---|
committer | Vincenzo Mantova <1962985+xworld21@users.noreply.github.com> | 2023-07-29 18:10:45 +0200 |
commit | 56af1c19817f4a3a58937a7918e140a9797aa1b1 (patch) | |
tree | fa5d76f08c92a61be36d6b0f516f85f6a80cbab7 /pkgs/test | |
parent | 39750551aa6aa0ea758af5457ea74f7bdfe7eb93 (diff) |
tests.texlive.rpdfcrop: init, check that rpdfcrop runs in restricted mode
Diffstat (limited to 'pkgs/test')
-rw-r--r-- | pkgs/test/texlive/default.nix | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/pkgs/test/texlive/default.nix b/pkgs/test/texlive/default.nix index 5de8d9f26e4ad..a1a23bc01edad 100644 --- a/pkgs/test/texlive/default.nix +++ b/pkgs/test/texlive/default.nix @@ -210,6 +210,16 @@ mkdir "$out" ''; + # verify that the restricted mode gets enabled when + # needed (detected by checking if it disallows --gscmd) + rpdfcrop = runCommand "texlive-test-rpdfcrop" { + nativeBuildInputs = [ (texlive.combine { inherit (texlive) scheme-infraonly pdfcrop; }) ]; + } '' + ! (pdfcrop --gscmd echo $(command -v pdfcrop) 2>&1 || true) | grep 'restricted mode' >/dev/null + (rpdfcrop --gscmd echo $(command -v pdfcrop) 2>&1 || true) | grep 'restricted mode' >/dev/null + mkdir "$out" + ''; + # check that all binaries run successfully, in the following sense: # (1) run --version, -v, --help, -h successfully; or # (2) run --help, -h, or no argument with error code but show help text; or |