tvl-depot/users/wpcarro/emacs/pkgs/list/default.nix
William Carroll 65fb82097b fix(wpcarro/emacs): Fix list.el tests
I was getting false-positive ERT test results because I forgot to use the
`should` macro in my assertions. I discovered this when debugging a subtle bug
in cycle.el that depends on `list-contains?` return `t` or `nil` instead of
truthy or falsy values.

Change-Id: Ibbf89fd1c4f50f86d5efcaa4cd87280b97e111ce
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6003
Reviewed-by: wpcarro <wpcarro@gmail.com>
Autosubmit: wpcarro <wpcarro@gmail.com>
Tested-by: BuildkiteCI
2022-07-30 04:23:16 +00:00

29 lines
651 B
Nix

{ pkgs, depot, ... }:
let
list = pkgs.callPackage
({ emacsPackages }:
emacsPackages.trivialBuild {
pname = "list";
version = "1.0.0";
src = ./list.el;
packageRequires =
(with emacsPackages; [
dash
]) ++
(with depot.users.wpcarro.emacs.pkgs; [
maybe
set
]);
})
{ };
emacs = (pkgs.emacsPackagesFor pkgs.emacs28).emacsWithPackages (epkgs: [ list ]);
in
list.overrideAttrs (_old: {
doCheck = true;
checkPhase = ''
${emacs}/bin/emacs -batch \
-l ert -l ${./tests.el} -f ert-run-tests-batch-and-exit
'';
})