spidermonkey_*: add tests
This commit is contained in:
parent
9a99e98ea4
commit
457b124ad2
@ -1,6 +1,7 @@
|
||||
{ version, hash }:
|
||||
|
||||
{ lib
|
||||
{ callPackage
|
||||
, lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, fetchpatch
|
||||
@ -28,7 +29,7 @@
|
||||
, zlib
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: rec {
|
||||
pname = "spidermonkey";
|
||||
inherit version;
|
||||
|
||||
@ -160,6 +161,10 @@ stdenv.mkDerivation rec {
|
||||
ln -s $out/bin/js${lib.versions.major version} $out/bin/js
|
||||
'';
|
||||
|
||||
passthru.tests.run = callPackage ./test.nix {
|
||||
spidermonkey = finalAttrs.finalPackage;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Mozilla's JavaScript engine written in C/C++";
|
||||
homepage = "https://spidermonkey.dev/";
|
||||
@ -167,4 +172,4 @@ stdenv.mkDerivation rec {
|
||||
maintainers = with maintainers; [ abbradar lostnet ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
10
pkgs/development/interpreters/spidermonkey/test.nix
Normal file
10
pkgs/development/interpreters/spidermonkey/test.nix
Normal file
@ -0,0 +1,10 @@
|
||||
{ runCommand, spidermonkey }:
|
||||
|
||||
runCommand "spidermonkey-test-run" {
|
||||
nativeBuildInputs = [
|
||||
spidermonkey
|
||||
];
|
||||
} ''
|
||||
diff -U3 --color=auto <(js <(echo "console.log('Hello, world\!')")) <(echo 'Hello, world!')
|
||||
touch $out
|
||||
''
|
Loading…
Reference in New Issue
Block a user