Skip to content

Commit

Permalink
tests/lang/eval-okay-versions.nix: add test for previous commit
Browse files Browse the repository at this point in the history
This commit adds a test covering the discrepancy between parseDrvName's
implementation and documentation (the discrepancy was eliminated in the previous
commit).
  • Loading branch information
Adam Joseph committed Oct 9, 2022
1 parent 7ef71cd commit 5e24863
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/lang/eval-okay-versions.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)
Expand Down

0 comments on commit 5e24863

Please sign in to comment.