mirror of
https://github.com/NixOS/nix
synced 2025-07-08 06:53:54 +02:00
Merge remote-tracking branch 'origin/master' into lazy-trees
This commit is contained in:
commit
e2353b9b45
33 changed files with 196 additions and 55 deletions
1
tests/lang/eval-okay-eq.exp
Normal file
1
tests/lang/eval-okay-eq.exp
Normal file
|
@ -0,0 +1 @@
|
|||
true
|
|
@ -1 +0,0 @@
|
|||
Bool(True)
|
|
@ -4,6 +4,7 @@ let
|
|||
name2 = "hello";
|
||||
name3 = "915resolution-0.5.2";
|
||||
name4 = "xf86-video-i810-1.7.4";
|
||||
name5 = "name-that-ends-with-dash--1.0";
|
||||
|
||||
eq = 0;
|
||||
lt = builtins.sub 0 1;
|
||||
|
@ -23,6 +24,8 @@ let
|
|||
((builtins.parseDrvName name3).version == "0.5.2")
|
||||
((builtins.parseDrvName name4).name == "xf86-video-i810")
|
||||
((builtins.parseDrvName name4).version == "1.7.4")
|
||||
((builtins.parseDrvName name5).name == "name-that-ends-with-dash")
|
||||
((builtins.parseDrvName name5).version == "-1.0")
|
||||
(versionTest "1.0" "2.3" lt)
|
||||
(versionTest "2.1" "2.3" lt)
|
||||
(versionTest "2.3" "2.3" eq)
|
||||
|
|
|
@ -111,6 +111,7 @@ nix_tests = \
|
|||
fetchClosure.sh \
|
||||
completions.sh \
|
||||
impure-derivations.sh \
|
||||
path-from-hash-part.sh \
|
||||
toString-path.sh
|
||||
|
||||
ifeq ($(HAVE_LIBCPUID), 1)
|
||||
|
|
10
tests/path-from-hash-part.sh
Normal file
10
tests/path-from-hash-part.sh
Normal file
|
@ -0,0 +1,10 @@
|
|||
source common.sh
|
||||
|
||||
path=$(nix build --no-link --print-out-paths -f simple.nix)
|
||||
|
||||
hash_part=$(basename $path)
|
||||
hash_part=${hash_part:0:32}
|
||||
|
||||
path2=$(nix store path-from-hash-part $hash_part)
|
||||
|
||||
[[ $path = $path2 ]]
|
Loading…
Add table
Add a link
Reference in a new issue