tests(f2/repl): migrate overlay tests
Change-Id: Ibd2b123f919abd84ecb9333bd952cf0bdb813992
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
Check basic `repl-overlays` functionality.
|
||||
@args --repl-overlays
|
||||
@args ${PWD}/extra_data/repl-overlay-packages-is-pkgs.nix
|
||||
nix-repl> pkgs
|
||||
{ default = "my package"; }
|
||||
@@ -1,7 +0,0 @@
|
||||
Check that multiple `repl-overlays` can compose together
|
||||
@args --repl-overlays
|
||||
@args "${PWD}/extra_data/repl-overlays-compose-1.nix ${PWD}/extra_data/repl-overlays-compose-2.nix"
|
||||
nix-repl> var
|
||||
"abc"
|
||||
nix-repl> varUsingFinal
|
||||
"final value is: puppy"
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
`repl-overlays` that try to parse out the `info` argument without a `...` error.
|
||||
@args --repl-overlays
|
||||
@args ${PWD}/extra_data/repl-overlay-no-dotdotdot.nix
|
||||
@should-start false
|
||||
error: Expected first argument of repl-overlays to have ... to allow future versions of Lix to add additional attributes to the argument
|
||||
at $TEST_DATA/extra_data/repl-overlay-no-dotdotdot.nix:4:3:
|
||||
3| in
|
||||
4| {currentSystem}: final: prev: {
|
||||
| ^
|
||||
5| inherit puppy;
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
`repl-overlays` that don't destructure the `info` argument are OK.
|
||||
@args --repl-overlays
|
||||
@args ${PWD}/extra_data/repl-overlay-no-formals.nix
|
||||
nix-repl> 1
|
||||
1
|
||||
@@ -176,11 +176,7 @@ TEST_F(ReplSessionTest, tidy)
|
||||
runReplTestPath(#name); \
|
||||
}
|
||||
|
||||
REPL_TEST(repl_overlays);
|
||||
REPL_TEST(repl_overlays_regression_l777);
|
||||
REPL_TEST(repl_overlays_compose);
|
||||
REPL_TEST(repl_overlays_destructure_without_dotdotdot_errors);
|
||||
REPL_TEST(repl_overlays_destructure_without_formals_ok);
|
||||
REPL_TEST(stack_vars);
|
||||
REPL_TEST(stacktrace_invalid_arg);
|
||||
REPL_TEST(stacktrace_oob);
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
---
|
||||
args: ['-f', '{PWD}/repl_overlays_compose.nix', '--repl-overlays', '{PWD}/repl-overlays-compose-1.nix {PWD}/repl-overlays-compose-2.nix']
|
||||
files: ['repl_overlays_compose.nix', 'repl-overlays-compose-1.nix', 'repl-overlays-compose-2.nix']
|
||||
---
|
||||
|
||||
```output
|
||||
Lix VERSION
|
||||
Type :? for help.
|
||||
Loading installable ''...
|
||||
Added 1 variables.
|
||||
Loading 'repl-overlays'...
|
||||
Added 3 variables.
|
||||
```
|
||||
Check that multiple `repl-overlays` can compose together
|
||||
```nix
|
||||
var
|
||||
varUsingFinal
|
||||
```
|
||||
```output
|
||||
"abc"
|
||||
|
||||
"final value is: puppy"
|
||||
|
||||
```
|
||||
@@ -0,0 +1,12 @@
|
||||
---
|
||||
args: ['--repl-overlays', '{PWD}/repl-overlay-no-formals.nix']
|
||||
files: ['repl-overlay-no-formals.nix']
|
||||
---
|
||||
|
||||
`repl-overlays` that don't destructure the `info` argument are OK.
|
||||
|
||||
```output
|
||||
Lix VERSION
|
||||
Type :? for help.
|
||||
Loading 'repl-overlays'...
|
||||
```
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
---
|
||||
args: ['--repl-overlays', '{PWD}/repl-overlay-no-dotdotdot.nix']
|
||||
should_fail: True
|
||||
files: ['repl-overlay-no-dotdotdot.nix']
|
||||
---
|
||||
|
||||
`repl-overlays` that try to parse the `info` argument without a `...` error.
|
||||
|
||||
```output
|
||||
Lix VERSION
|
||||
Type :? for help.
|
||||
Loading 'repl-overlays'...
|
||||
error: Expected first argument of repl-overlays to have ... to allow future versions of Lix to add additional attributes to the argument
|
||||
at /pwd/repl-overlay-no-dotdotdot.nix:4:3:
|
||||
3| in
|
||||
4| {currentSystem}: final: prev: {
|
||||
| ^
|
||||
5| inherit puppy;
|
||||
```
|
||||
@@ -0,0 +1,23 @@
|
||||
---
|
||||
args: ['-f', '{PWD}/repl_overlays.nix', '--repl-overlays', '{PWD}/repl-overlay-packages-is-pkgs.nix']
|
||||
files: ['repl_overlays.nix', 'repl-overlay-packages-is-pkgs.nix']
|
||||
---
|
||||
|
||||
```output
|
||||
Lix VERSION
|
||||
Type :? for help.
|
||||
Loading installable ''...
|
||||
Added 1 variables.
|
||||
Loading 'repl-overlays'...
|
||||
Added 2 variables.
|
||||
```
|
||||
|
||||
Check basic `repl-overlays` functionality.
|
||||
|
||||
```nix
|
||||
pkgs
|
||||
```
|
||||
```output
|
||||
{ default = "my package"; }
|
||||
|
||||
```
|
||||
Reference in New Issue
Block a user