mirror of
https://github.com/NixOS/nix
synced 2025-07-10 04:43:53 +02:00
Put functional tests in tests/functional
I think it is bad for these reasons when `tests/` contains a mix of functional and integration tests - Concepts is harder to understand, the documentation makes a good unit vs functional vs integration distinction, but when the integration tests are just two subdirs within `tests/` this is not clear. - Source filtering in the `flake.nix` is more complex. We need to filter out some of the dirs from `tests/`, rather than simply pick the dirs we want and take all of them. This is a good sign the structure of what we are trying to do is not matching the structure of the files. With this change we have a clean: ```shell-session $ git show 'HEAD:tests' tree HEAD:tests functional/ installer/ nixos/ ```
This commit is contained in:
parent
3dd4475826
commit
68c81c7375
599 changed files with 84 additions and 87 deletions
BIN
tests/functional/lang/binary-data
Normal file
BIN
tests/functional/lang/binary-data
Normal file
Binary file not shown.
1
tests/functional/lang/data
Normal file
1
tests/functional/lang/data
Normal file
|
@ -0,0 +1 @@
|
|||
foo
|
1
tests/functional/lang/dir1/a.nix
Normal file
1
tests/functional/lang/dir1/a.nix
Normal file
|
@ -0,0 +1 @@
|
|||
"a"
|
1
tests/functional/lang/dir2/a.nix
Normal file
1
tests/functional/lang/dir2/a.nix
Normal file
|
@ -0,0 +1 @@
|
|||
"X"
|
1
tests/functional/lang/dir2/b.nix
Normal file
1
tests/functional/lang/dir2/b.nix
Normal file
|
@ -0,0 +1 @@
|
|||
"b"
|
1
tests/functional/lang/dir3/a.nix
Normal file
1
tests/functional/lang/dir3/a.nix
Normal file
|
@ -0,0 +1 @@
|
|||
"X"
|
1
tests/functional/lang/dir3/b.nix
Normal file
1
tests/functional/lang/dir3/b.nix
Normal file
|
@ -0,0 +1 @@
|
|||
"X"
|
1
tests/functional/lang/dir3/c.nix
Normal file
1
tests/functional/lang/dir3/c.nix
Normal file
|
@ -0,0 +1 @@
|
|||
"c"
|
1
tests/functional/lang/dir4/a.nix
Normal file
1
tests/functional/lang/dir4/a.nix
Normal file
|
@ -0,0 +1 @@
|
|||
"X"
|
1
tests/functional/lang/dir4/c.nix
Normal file
1
tests/functional/lang/dir4/c.nix
Normal file
|
@ -0,0 +1 @@
|
|||
"X"
|
0
tests/functional/lang/empty.exp
Normal file
0
tests/functional/lang/empty.exp
Normal file
10
tests/functional/lang/eval-fail-abort.err.exp
Normal file
10
tests/functional/lang/eval-fail-abort.err.exp
Normal file
|
@ -0,0 +1,10 @@
|
|||
error:
|
||||
… while calling the 'abort' builtin
|
||||
|
||||
at /pwd/lang/eval-fail-abort.nix:1:14:
|
||||
|
||||
1| if true then abort "this should fail" else 1
|
||||
| ^
|
||||
2|
|
||||
|
||||
error: evaluation aborted with the following error message: 'this should fail'
|
1
tests/functional/lang/eval-fail-abort.nix
Normal file
1
tests/functional/lang/eval-fail-abort.nix
Normal file
|
@ -0,0 +1 @@
|
|||
if true then abort "this should fail" else 1
|
1
tests/functional/lang/eval-fail-antiquoted-path.err.exp
Normal file
1
tests/functional/lang/eval-fail-antiquoted-path.err.exp
Normal file
|
@ -0,0 +1 @@
|
|||
error: getting attributes of path ‘PWD/lang/fnord’: No such file or directory
|
36
tests/functional/lang/eval-fail-assert.err.exp
Normal file
36
tests/functional/lang/eval-fail-assert.err.exp
Normal file
|
@ -0,0 +1,36 @@
|
|||
error:
|
||||
… while evaluating the attribute 'body'
|
||||
|
||||
at /pwd/lang/eval-fail-assert.nix:4:3:
|
||||
|
||||
3|
|
||||
4| body = x "x";
|
||||
| ^
|
||||
5| }
|
||||
|
||||
… from call site
|
||||
|
||||
at /pwd/lang/eval-fail-assert.nix:4:10:
|
||||
|
||||
3|
|
||||
4| body = x "x";
|
||||
| ^
|
||||
5| }
|
||||
|
||||
… while calling 'x'
|
||||
|
||||
at /pwd/lang/eval-fail-assert.nix:2:7:
|
||||
|
||||
1| let {
|
||||
2| x = arg: assert arg == "y"; 123;
|
||||
| ^
|
||||
3|
|
||||
|
||||
error: assertion '(arg == "y")' failed
|
||||
|
||||
at /pwd/lang/eval-fail-assert.nix:2:12:
|
||||
|
||||
1| let {
|
||||
2| x = arg: assert arg == "y"; 123;
|
||||
| ^
|
||||
3|
|
5
tests/functional/lang/eval-fail-assert.nix
Normal file
5
tests/functional/lang/eval-fail-assert.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
let {
|
||||
x = arg: assert arg == "y"; 123;
|
||||
|
||||
body = x "x";
|
||||
}
|
10
tests/functional/lang/eval-fail-bad-antiquote-1.err.exp
Normal file
10
tests/functional/lang/eval-fail-bad-antiquote-1.err.exp
Normal file
|
@ -0,0 +1,10 @@
|
|||
error:
|
||||
… while evaluating a path segment
|
||||
|
||||
at /pwd/lang/eval-fail-bad-antiquote-1.nix:1:2:
|
||||
|
||||
1| "${x: x}"
|
||||
| ^
|
||||
2|
|
||||
|
||||
error: cannot coerce a function to a string
|
1
tests/functional/lang/eval-fail-bad-antiquote-2.err.exp
Normal file
1
tests/functional/lang/eval-fail-bad-antiquote-2.err.exp
Normal file
|
@ -0,0 +1 @@
|
|||
error: operation 'addToStoreFromDump' is not supported by store 'dummy'
|
10
tests/functional/lang/eval-fail-bad-antiquote-3.err.exp
Normal file
10
tests/functional/lang/eval-fail-bad-antiquote-3.err.exp
Normal file
|
@ -0,0 +1,10 @@
|
|||
error:
|
||||
… while evaluating a path segment
|
||||
|
||||
at /pwd/lang/eval-fail-bad-antiquote-3.nix:1:3:
|
||||
|
||||
1| ''${x: x}''
|
||||
| ^
|
||||
2|
|
||||
|
||||
error: cannot coerce a function to a string
|
|
@ -0,0 +1,10 @@
|
|||
error:
|
||||
… while evaluating a path segment
|
||||
|
||||
at /pwd/lang/eval-fail-bad-string-interpolation-1.nix:1:2:
|
||||
|
||||
1| "${x: x}"
|
||||
| ^
|
||||
2|
|
||||
|
||||
error: cannot coerce a function to a string
|
|
@ -0,0 +1 @@
|
|||
"${x: x}"
|
|
@ -0,0 +1 @@
|
|||
error: operation 'addToStoreFromDump' is not supported by store 'dummy'
|
|
@ -0,0 +1 @@
|
|||
"${./fnord}"
|
|
@ -0,0 +1,10 @@
|
|||
error:
|
||||
… while evaluating a path segment
|
||||
|
||||
at /pwd/lang/eval-fail-bad-string-interpolation-3.nix:1:3:
|
||||
|
||||
1| ''${x: x}''
|
||||
| ^
|
||||
2|
|
||||
|
||||
error: cannot coerce a function to a string
|
|
@ -0,0 +1 @@
|
|||
''${x: x}''
|
18
tests/functional/lang/eval-fail-blackhole.err.exp
Normal file
18
tests/functional/lang/eval-fail-blackhole.err.exp
Normal file
|
@ -0,0 +1,18 @@
|
|||
error:
|
||||
… while evaluating the attribute 'body'
|
||||
|
||||
at /pwd/lang/eval-fail-blackhole.nix:2:3:
|
||||
|
||||
1| let {
|
||||
2| body = x;
|
||||
| ^
|
||||
3| x = y;
|
||||
|
||||
error: infinite recursion encountered
|
||||
|
||||
at /pwd/lang/eval-fail-blackhole.nix:3:7:
|
||||
|
||||
2| body = x;
|
||||
3| x = y;
|
||||
| ^
|
||||
4| y = x;
|
5
tests/functional/lang/eval-fail-blackhole.nix
Normal file
5
tests/functional/lang/eval-fail-blackhole.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
let {
|
||||
body = x;
|
||||
x = y;
|
||||
y = x;
|
||||
}
|
26
tests/functional/lang/eval-fail-deepseq.err.exp
Normal file
26
tests/functional/lang/eval-fail-deepseq.err.exp
Normal file
|
@ -0,0 +1,26 @@
|
|||
error:
|
||||
… while calling the 'deepSeq' builtin
|
||||
|
||||
at /pwd/lang/eval-fail-deepseq.nix:1:1:
|
||||
|
||||
1| builtins.deepSeq { x = abort "foo"; } 456
|
||||
| ^
|
||||
2|
|
||||
|
||||
… while evaluating the attribute 'x'
|
||||
|
||||
at /pwd/lang/eval-fail-deepseq.nix:1:20:
|
||||
|
||||
1| builtins.deepSeq { x = abort "foo"; } 456
|
||||
| ^
|
||||
2|
|
||||
|
||||
… while calling the 'abort' builtin
|
||||
|
||||
at /pwd/lang/eval-fail-deepseq.nix:1:24:
|
||||
|
||||
1| builtins.deepSeq { x = abort "foo"; } 456
|
||||
| ^
|
||||
2|
|
||||
|
||||
error: evaluation aborted with the following error message: 'foo'
|
1
tests/functional/lang/eval-fail-deepseq.nix
Normal file
1
tests/functional/lang/eval-fail-deepseq.nix
Normal file
|
@ -0,0 +1 @@
|
|||
builtins.deepSeq { x = abort "foo"; } 456
|
|
@ -0,0 +1,8 @@
|
|||
error: dynamic attribute 'b' already defined at /pwd/lang/eval-fail-dup-dynamic-attrs.nix:2:11
|
||||
|
||||
at /pwd/lang/eval-fail-dup-dynamic-attrs.nix:3:11:
|
||||
|
||||
2| set = { "${"" + "b"}" = 1; };
|
||||
3| set = { "${"b" + ""}" = 2; };
|
||||
| ^
|
||||
4| }
|
4
tests/functional/lang/eval-fail-dup-dynamic-attrs.nix
Normal file
4
tests/functional/lang/eval-fail-dup-dynamic-attrs.nix
Normal file
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
set = { "${"" + "b"}" = 1; };
|
||||
set = { "${"b" + ""}" = 2; };
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
error:
|
||||
… while calling the 'foldl'' builtin
|
||||
|
||||
at /pwd/lang/eval-fail-foldlStrict-strict-op-application.nix:2:1:
|
||||
|
||||
1| # Tests that the result of applying op is forced even if the value is never used
|
||||
2| builtins.foldl'
|
||||
| ^
|
||||
3| (_: f: f null)
|
||||
|
||||
… while calling anonymous lambda
|
||||
|
||||
at /pwd/lang/eval-fail-foldlStrict-strict-op-application.nix:3:7:
|
||||
|
||||
2| builtins.foldl'
|
||||
3| (_: f: f null)
|
||||
| ^
|
||||
4| null
|
||||
|
||||
… from call site
|
||||
|
||||
at /pwd/lang/eval-fail-foldlStrict-strict-op-application.nix:3:10:
|
||||
|
||||
2| builtins.foldl'
|
||||
3| (_: f: f null)
|
||||
| ^
|
||||
4| null
|
||||
|
||||
… while calling anonymous lambda
|
||||
|
||||
at /pwd/lang/eval-fail-foldlStrict-strict-op-application.nix:5:6:
|
||||
|
||||
4| null
|
||||
5| [ (_: throw "Not the final value, but is still forced!") (_: 23) ]
|
||||
| ^
|
||||
6|
|
||||
|
||||
error: Not the final value, but is still forced!
|
|
@ -0,0 +1,5 @@
|
|||
# Tests that the result of applying op is forced even if the value is never used
|
||||
builtins.foldl'
|
||||
(_: f: f null)
|
||||
null
|
||||
[ (_: throw "Not the final value, but is still forced!") (_: 23) ]
|
10
tests/functional/lang/eval-fail-fromTOML-timestamps.err.exp
Normal file
10
tests/functional/lang/eval-fail-fromTOML-timestamps.err.exp
Normal file
|
@ -0,0 +1,10 @@
|
|||
error:
|
||||
… while calling the 'fromTOML' builtin
|
||||
|
||||
at /pwd/lang/eval-fail-fromTOML-timestamps.nix:1:1:
|
||||
|
||||
1| builtins.fromTOML ''
|
||||
| ^
|
||||
2| key = "value"
|
||||
|
||||
error: while parsing a TOML string: Dates and times are not supported
|
130
tests/functional/lang/eval-fail-fromTOML-timestamps.nix
Normal file
130
tests/functional/lang/eval-fail-fromTOML-timestamps.nix
Normal file
|
@ -0,0 +1,130 @@
|
|||
builtins.fromTOML ''
|
||||
key = "value"
|
||||
bare_key = "value"
|
||||
bare-key = "value"
|
||||
1234 = "value"
|
||||
|
||||
"127.0.0.1" = "value"
|
||||
"character encoding" = "value"
|
||||
"ʎǝʞ" = "value"
|
||||
'key2' = "value"
|
||||
'quoted "value"' = "value"
|
||||
|
||||
name = "Orange"
|
||||
|
||||
physical.color = "orange"
|
||||
physical.shape = "round"
|
||||
site."google.com" = true
|
||||
|
||||
# This is legal according to the spec, but cpptoml doesn't handle it.
|
||||
#a.b.c = 1
|
||||
#a.d = 2
|
||||
|
||||
str = "I'm a string. \"You can quote me\". Name\tJos\u00E9\nLocation\tSF."
|
||||
|
||||
int1 = +99
|
||||
int2 = 42
|
||||
int3 = 0
|
||||
int4 = -17
|
||||
int5 = 1_000
|
||||
int6 = 5_349_221
|
||||
int7 = 1_2_3_4_5
|
||||
|
||||
hex1 = 0xDEADBEEF
|
||||
hex2 = 0xdeadbeef
|
||||
hex3 = 0xdead_beef
|
||||
|
||||
oct1 = 0o01234567
|
||||
oct2 = 0o755
|
||||
|
||||
bin1 = 0b11010110
|
||||
|
||||
flt1 = +1.0
|
||||
flt2 = 3.1415
|
||||
flt3 = -0.01
|
||||
flt4 = 5e+22
|
||||
flt5 = 1e6
|
||||
flt6 = -2E-2
|
||||
flt7 = 6.626e-34
|
||||
flt8 = 9_224_617.445_991_228_313
|
||||
|
||||
bool1 = true
|
||||
bool2 = false
|
||||
|
||||
odt1 = 1979-05-27T07:32:00Z
|
||||
odt2 = 1979-05-27T00:32:00-07:00
|
||||
odt3 = 1979-05-27T00:32:00.999999-07:00
|
||||
odt4 = 1979-05-27 07:32:00Z
|
||||
ldt1 = 1979-05-27T07:32:00
|
||||
ldt2 = 1979-05-27T00:32:00.999999
|
||||
ld1 = 1979-05-27
|
||||
lt1 = 07:32:00
|
||||
lt2 = 00:32:00.999999
|
||||
|
||||
arr1 = [ 1, 2, 3 ]
|
||||
arr2 = [ "red", "yellow", "green" ]
|
||||
arr3 = [ [ 1, 2 ], [3, 4, 5] ]
|
||||
arr4 = [ "all", 'strings', """are the same""", ''''type'''']
|
||||
arr5 = [ [ 1, 2 ], ["a", "b", "c"] ]
|
||||
|
||||
arr7 = [
|
||||
1, 2, 3
|
||||
]
|
||||
|
||||
arr8 = [
|
||||
1,
|
||||
2, # this is ok
|
||||
]
|
||||
|
||||
[table-1]
|
||||
key1 = "some string"
|
||||
key2 = 123
|
||||
|
||||
|
||||
[table-2]
|
||||
key1 = "another string"
|
||||
key2 = 456
|
||||
|
||||
[dog."tater.man"]
|
||||
type.name = "pug"
|
||||
|
||||
[a.b.c]
|
||||
[ d.e.f ]
|
||||
[ g . h . i ]
|
||||
[ j . "ʞ" . 'l' ]
|
||||
[x.y.z.w]
|
||||
|
||||
name = { first = "Tom", last = "Preston-Werner" }
|
||||
point = { x = 1, y = 2 }
|
||||
animal = { type.name = "pug" }
|
||||
|
||||
[[products]]
|
||||
name = "Hammer"
|
||||
sku = 738594937
|
||||
|
||||
[[products]]
|
||||
|
||||
[[products]]
|
||||
name = "Nail"
|
||||
sku = 284758393
|
||||
color = "gray"
|
||||
|
||||
[[fruit]]
|
||||
name = "apple"
|
||||
|
||||
[fruit.physical]
|
||||
color = "red"
|
||||
shape = "round"
|
||||
|
||||
[[fruit.variety]]
|
||||
name = "red delicious"
|
||||
|
||||
[[fruit.variety]]
|
||||
name = "granny smith"
|
||||
|
||||
[[fruit]]
|
||||
name = "banana"
|
||||
|
||||
[[fruit.variety]]
|
||||
name = "plantain"
|
||||
''
|
15
tests/functional/lang/eval-fail-hashfile-missing.err.exp
Normal file
15
tests/functional/lang/eval-fail-hashfile-missing.err.exp
Normal file
|
@ -0,0 +1,15 @@
|
|||
error:
|
||||
… while calling the 'toString' builtin
|
||||
|
||||
at /pwd/lang/eval-fail-hashfile-missing.nix:4:3:
|
||||
|
||||
3| in
|
||||
4| toString (builtins.concatLists (map (hash: map (builtins.hashFile hash) paths) ["md5" "sha1" "sha256" "sha512"]))
|
||||
| ^
|
||||
5|
|
||||
|
||||
… while evaluating the first argument passed to builtins.toString
|
||||
|
||||
… while calling the 'hashFile' builtin
|
||||
|
||||
error: opening file '/pwd/lang/this-file-is-definitely-not-there-7392097': No such file or directory
|
5
tests/functional/lang/eval-fail-hashfile-missing.nix
Normal file
5
tests/functional/lang/eval-fail-hashfile-missing.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
let
|
||||
paths = [ ./this-file-is-definitely-not-there-7392097 "/and/neither/is/this/37293620" ];
|
||||
in
|
||||
toString (builtins.concatLists (map (hash: map (builtins.hashFile hash) paths) ["md5" "sha1" "sha256" "sha512"]))
|
||||
|
10
tests/functional/lang/eval-fail-list.err.exp
Normal file
10
tests/functional/lang/eval-fail-list.err.exp
Normal file
|
@ -0,0 +1,10 @@
|
|||
error:
|
||||
… while evaluating one of the elements to concatenate
|
||||
|
||||
at /pwd/lang/eval-fail-list.nix:1:2:
|
||||
|
||||
1| 8++1
|
||||
| ^
|
||||
2|
|
||||
|
||||
error: value is an integer while a list was expected
|
1
tests/functional/lang/eval-fail-list.nix
Normal file
1
tests/functional/lang/eval-fail-list.nix
Normal file
|
@ -0,0 +1 @@
|
|||
8++1
|
16
tests/functional/lang/eval-fail-missing-arg.err.exp
Normal file
16
tests/functional/lang/eval-fail-missing-arg.err.exp
Normal file
|
@ -0,0 +1,16 @@
|
|||
error:
|
||||
… from call site
|
||||
|
||||
at /pwd/lang/eval-fail-missing-arg.nix:1:1:
|
||||
|
||||
1| ({x, y, z}: x + y + z) {x = "foo"; z = "bar";}
|
||||
| ^
|
||||
2|
|
||||
|
||||
error: function 'anonymous lambda' called without required argument 'y'
|
||||
|
||||
at /pwd/lang/eval-fail-missing-arg.nix:1:2:
|
||||
|
||||
1| ({x, y, z}: x + y + z) {x = "foo"; z = "bar";}
|
||||
| ^
|
||||
2|
|
1
tests/functional/lang/eval-fail-missing-arg.nix
Normal file
1
tests/functional/lang/eval-fail-missing-arg.nix
Normal file
|
@ -0,0 +1 @@
|
|||
({x, y, z}: x + y + z) {x = "foo"; z = "bar";}
|
1
tests/functional/lang/eval-fail-nonexist-path.err.exp
Normal file
1
tests/functional/lang/eval-fail-nonexist-path.err.exp
Normal file
|
@ -0,0 +1 @@
|
|||
error: operation 'addToStoreFromDump' is not supported by store 'dummy'
|
4
tests/functional/lang/eval-fail-nonexist-path.nix
Normal file
4
tests/functional/lang/eval-fail-nonexist-path.nix
Normal file
|
@ -0,0 +1,4 @@
|
|||
# This must fail to evaluate, since ./fnord doesn't exist. If it did
|
||||
# exist, it would produce "/nix/store/<hash>-fnord/xyzzy" (with an
|
||||
# appropriate context).
|
||||
"${./fnord}/xyzzy"
|
8
tests/functional/lang/eval-fail-path-slash.err.exp
Normal file
8
tests/functional/lang/eval-fail-path-slash.err.exp
Normal file
|
@ -0,0 +1,8 @@
|
|||
error: path has a trailing slash
|
||||
|
||||
at /pwd/lang/eval-fail-path-slash.nix:6:12:
|
||||
|
||||
5| # and https://nixos.org/nix-dev/2016-June/020829.html
|
||||
6| /nix/store/
|
||||
| ^
|
||||
7|
|
6
tests/functional/lang/eval-fail-path-slash.nix
Normal file
6
tests/functional/lang/eval-fail-path-slash.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
# Trailing slashes in paths are not allowed.
|
||||
# This restriction could be lifted sometime,
|
||||
# for example if we make '/' a path concatenation operator.
|
||||
# See https://github.com/NixOS/nix/issues/1138
|
||||
# and https://nixos.org/nix-dev/2016-June/020829.html
|
||||
/nix/store/
|
16
tests/functional/lang/eval-fail-recursion.err.exp
Normal file
16
tests/functional/lang/eval-fail-recursion.err.exp
Normal file
|
@ -0,0 +1,16 @@
|
|||
error:
|
||||
… in the right operand of the update (//) operator
|
||||
|
||||
at /pwd/lang/eval-fail-recursion.nix:1:12:
|
||||
|
||||
1| let a = {} // a; in a.foo
|
||||
| ^
|
||||
2|
|
||||
|
||||
error: infinite recursion encountered
|
||||
|
||||
at /pwd/lang/eval-fail-recursion.nix:1:15:
|
||||
|
||||
1| let a = {} // a; in a.foo
|
||||
| ^
|
||||
2|
|
1
tests/functional/lang/eval-fail-recursion.nix
Normal file
1
tests/functional/lang/eval-fail-recursion.nix
Normal file
|
@ -0,0 +1 @@
|
|||
let a = {} // a; in a.foo
|
19
tests/functional/lang/eval-fail-remove.err.exp
Normal file
19
tests/functional/lang/eval-fail-remove.err.exp
Normal file
|
@ -0,0 +1,19 @@
|
|||
error:
|
||||
… while evaluating the attribute 'body'
|
||||
|
||||
at /pwd/lang/eval-fail-remove.nix:4:3:
|
||||
|
||||
3|
|
||||
4| body = (removeAttrs attrs ["x"]).x;
|
||||
| ^
|
||||
5| }
|
||||
|
||||
error: attribute 'x' missing
|
||||
|
||||
at /pwd/lang/eval-fail-remove.nix:4:10:
|
||||
|
||||
3|
|
||||
4| body = (removeAttrs attrs ["x"]).x;
|
||||
| ^
|
||||
5| }
|
||||
Did you mean y?
|
5
tests/functional/lang/eval-fail-remove.nix
Normal file
5
tests/functional/lang/eval-fail-remove.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
let {
|
||||
attrs = {x = 123; y = 456;};
|
||||
|
||||
body = (removeAttrs attrs ["x"]).x;
|
||||
}
|
36
tests/functional/lang/eval-fail-scope-5.err.exp
Normal file
36
tests/functional/lang/eval-fail-scope-5.err.exp
Normal file
|
@ -0,0 +1,36 @@
|
|||
error:
|
||||
… while evaluating the attribute 'body'
|
||||
|
||||
at /pwd/lang/eval-fail-scope-5.nix:8:3:
|
||||
|
||||
7|
|
||||
8| body = f {};
|
||||
| ^
|
||||
9|
|
||||
|
||||
… from call site
|
||||
|
||||
at /pwd/lang/eval-fail-scope-5.nix:8:10:
|
||||
|
||||
7|
|
||||
8| body = f {};
|
||||
| ^
|
||||
9|
|
||||
|
||||
… while calling 'f'
|
||||
|
||||
at /pwd/lang/eval-fail-scope-5.nix:6:7:
|
||||
|
||||
5|
|
||||
6| f = {x ? y, y ? x}: x + y;
|
||||
| ^
|
||||
7|
|
||||
|
||||
error: infinite recursion encountered
|
||||
|
||||
at /pwd/lang/eval-fail-scope-5.nix:6:12:
|
||||
|
||||
5|
|
||||
6| f = {x ? y, y ? x}: x + y;
|
||||
| ^
|
||||
7|
|
10
tests/functional/lang/eval-fail-scope-5.nix
Normal file
10
tests/functional/lang/eval-fail-scope-5.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
let {
|
||||
|
||||
x = "a";
|
||||
y = "b";
|
||||
|
||||
f = {x ? y, y ? x}: x + y;
|
||||
|
||||
body = f {};
|
||||
|
||||
}
|
18
tests/functional/lang/eval-fail-seq.err.exp
Normal file
18
tests/functional/lang/eval-fail-seq.err.exp
Normal file
|
@ -0,0 +1,18 @@
|
|||
error:
|
||||
… while calling the 'seq' builtin
|
||||
|
||||
at /pwd/lang/eval-fail-seq.nix:1:1:
|
||||
|
||||
1| builtins.seq (abort "foo") 2
|
||||
| ^
|
||||
2|
|
||||
|
||||
… while calling the 'abort' builtin
|
||||
|
||||
at /pwd/lang/eval-fail-seq.nix:1:15:
|
||||
|
||||
1| builtins.seq (abort "foo") 2
|
||||
| ^
|
||||
2|
|
||||
|
||||
error: evaluation aborted with the following error message: 'foo'
|
1
tests/functional/lang/eval-fail-seq.nix
Normal file
1
tests/functional/lang/eval-fail-seq.nix
Normal file
|
@ -0,0 +1 @@
|
|||
builtins.seq (abort "foo") 2
|
4
tests/functional/lang/eval-fail-set-override.err.exp
Normal file
4
tests/functional/lang/eval-fail-set-override.err.exp
Normal file
|
@ -0,0 +1,4 @@
|
|||
error:
|
||||
… while evaluating the `__overrides` attribute
|
||||
|
||||
error: value is an integer while a set was expected
|
1
tests/functional/lang/eval-fail-set-override.nix
Normal file
1
tests/functional/lang/eval-fail-set-override.nix
Normal file
|
@ -0,0 +1 @@
|
|||
rec { __overrides = 1; }
|
7
tests/functional/lang/eval-fail-set.err.exp
Normal file
7
tests/functional/lang/eval-fail-set.err.exp
Normal file
|
@ -0,0 +1,7 @@
|
|||
error: undefined variable 'x'
|
||||
|
||||
at /pwd/lang/eval-fail-set.nix:1:3:
|
||||
|
||||
1| 8.x
|
||||
| ^
|
||||
2|
|
1
tests/functional/lang/eval-fail-set.nix
Normal file
1
tests/functional/lang/eval-fail-set.nix
Normal file
|
@ -0,0 +1 @@
|
|||
8.x
|
10
tests/functional/lang/eval-fail-substring.err.exp
Normal file
10
tests/functional/lang/eval-fail-substring.err.exp
Normal file
|
@ -0,0 +1,10 @@
|
|||
error:
|
||||
… while calling the 'substring' builtin
|
||||
|
||||
at /pwd/lang/eval-fail-substring.nix:1:1:
|
||||
|
||||
1| builtins.substring (builtins.sub 0 1) 1 "x"
|
||||
| ^
|
||||
2|
|
||||
|
||||
error: negative start position in 'substring'
|
1
tests/functional/lang/eval-fail-substring.nix
Normal file
1
tests/functional/lang/eval-fail-substring.nix
Normal file
|
@ -0,0 +1 @@
|
|||
builtins.substring (builtins.sub 0 1) 1 "x"
|
12
tests/functional/lang/eval-fail-to-path.err.exp
Normal file
12
tests/functional/lang/eval-fail-to-path.err.exp
Normal file
|
@ -0,0 +1,12 @@
|
|||
error:
|
||||
… while calling the 'toPath' builtin
|
||||
|
||||
at /pwd/lang/eval-fail-to-path.nix:1:1:
|
||||
|
||||
1| builtins.toPath "foo/bar"
|
||||
| ^
|
||||
2|
|
||||
|
||||
… while evaluating the first argument passed to builtins.toPath
|
||||
|
||||
error: string 'foo/bar' doesn't represent an absolute path
|
1
tests/functional/lang/eval-fail-to-path.nix
Normal file
1
tests/functional/lang/eval-fail-to-path.nix
Normal file
|
@ -0,0 +1 @@
|
|||
builtins.toPath "foo/bar"
|
57
tests/functional/lang/eval-fail-toJSON.err.exp
Normal file
57
tests/functional/lang/eval-fail-toJSON.err.exp
Normal file
|
@ -0,0 +1,57 @@
|
|||
error:
|
||||
… while calling the 'toJSON' builtin
|
||||
|
||||
at /pwd/lang/eval-fail-toJSON.nix:1:1:
|
||||
|
||||
1| builtins.toJSON {
|
||||
| ^
|
||||
2| a.b = [
|
||||
|
||||
… while evaluating attribute 'a'
|
||||
|
||||
at /pwd/lang/eval-fail-toJSON.nix:2:3:
|
||||
|
||||
1| builtins.toJSON {
|
||||
2| a.b = [
|
||||
| ^
|
||||
3| true
|
||||
|
||||
… while evaluating attribute 'b'
|
||||
|
||||
at /pwd/lang/eval-fail-toJSON.nix:2:3:
|
||||
|
||||
1| builtins.toJSON {
|
||||
2| a.b = [
|
||||
| ^
|
||||
3| true
|
||||
|
||||
… while evaluating list element at index 3
|
||||
|
||||
… while evaluating attribute 'c'
|
||||
|
||||
at /pwd/lang/eval-fail-toJSON.nix:7:7:
|
||||
|
||||
6| {
|
||||
7| c.d = throw "hah no";
|
||||
| ^
|
||||
8| }
|
||||
|
||||
… while evaluating attribute 'd'
|
||||
|
||||
at /pwd/lang/eval-fail-toJSON.nix:7:7:
|
||||
|
||||
6| {
|
||||
7| c.d = throw "hah no";
|
||||
| ^
|
||||
8| }
|
||||
|
||||
… while calling the 'throw' builtin
|
||||
|
||||
at /pwd/lang/eval-fail-toJSON.nix:7:13:
|
||||
|
||||
6| {
|
||||
7| c.d = throw "hah no";
|
||||
| ^
|
||||
8| }
|
||||
|
||||
error: hah no
|
10
tests/functional/lang/eval-fail-toJSON.nix
Normal file
10
tests/functional/lang/eval-fail-toJSON.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
builtins.toJSON {
|
||||
a.b = [
|
||||
true
|
||||
false
|
||||
"it's a bird"
|
||||
{
|
||||
c.d = throw "hah no";
|
||||
}
|
||||
];
|
||||
}
|
17
tests/functional/lang/eval-fail-undeclared-arg.err.exp
Normal file
17
tests/functional/lang/eval-fail-undeclared-arg.err.exp
Normal file
|
@ -0,0 +1,17 @@
|
|||
error:
|
||||
… from call site
|
||||
|
||||
at /pwd/lang/eval-fail-undeclared-arg.nix:1:1:
|
||||
|
||||
1| ({x, z}: x + z) {x = "foo"; y = "bla"; z = "bar";}
|
||||
| ^
|
||||
2|
|
||||
|
||||
error: function 'anonymous lambda' called with unexpected argument 'y'
|
||||
|
||||
at /pwd/lang/eval-fail-undeclared-arg.nix:1:2:
|
||||
|
||||
1| ({x, z}: x + z) {x = "foo"; y = "bla"; z = "bar";}
|
||||
| ^
|
||||
2|
|
||||
Did you mean one of x or z?
|
1
tests/functional/lang/eval-fail-undeclared-arg.nix
Normal file
1
tests/functional/lang/eval-fail-undeclared-arg.nix
Normal file
|
@ -0,0 +1 @@
|
|||
({x, z}: x + z) {x = "foo"; y = "bla"; z = "bar";}
|
1
tests/functional/lang/eval-okay-any-all.exp
Normal file
1
tests/functional/lang/eval-okay-any-all.exp
Normal file
|
@ -0,0 +1 @@
|
|||
[ false false true true true true false true ]
|
11
tests/functional/lang/eval-okay-any-all.nix
Normal file
11
tests/functional/lang/eval-okay-any-all.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
with builtins;
|
||||
|
||||
[ (any (x: x == 1) [])
|
||||
(any (x: x == 1) [2 3 4])
|
||||
(any (x: x == 1) [1 2 3 4])
|
||||
(any (x: x == 1) [4 3 2 1])
|
||||
(all (x: x == 1) [])
|
||||
(all (x: x == 1) [1])
|
||||
(all (x: x == 1) [1 2 3])
|
||||
(all (x: x == 1) [1 1 1])
|
||||
]
|
1
tests/functional/lang/eval-okay-arithmetic.exp
Normal file
1
tests/functional/lang/eval-okay-arithmetic.exp
Normal file
|
@ -0,0 +1 @@
|
|||
2216
|
59
tests/functional/lang/eval-okay-arithmetic.nix
Normal file
59
tests/functional/lang/eval-okay-arithmetic.nix
Normal file
|
@ -0,0 +1,59 @@
|
|||
with import ./lib.nix;
|
||||
|
||||
let {
|
||||
|
||||
/* Supposedly tail recursive version:
|
||||
|
||||
range_ = accum: first: last:
|
||||
if first == last then ([first] ++ accum)
|
||||
else range_ ([first] ++ accum) (builtins.add first 1) last;
|
||||
|
||||
range = range_ [];
|
||||
*/
|
||||
|
||||
x = 12;
|
||||
|
||||
err = abort "urgh";
|
||||
|
||||
body = sum
|
||||
[ (sum (range 1 50))
|
||||
(123 + 456)
|
||||
(0 + -10 + -(-11) + -x)
|
||||
(10 - 7 - -2)
|
||||
(10 - (6 - -1))
|
||||
(10 - 1 + 2)
|
||||
(3 * 4 * 5)
|
||||
(56088 / 123 / 2)
|
||||
(3 + 4 * const 5 0 - 6 / id 2)
|
||||
|
||||
(builtins.bitAnd 12 10) # 0b1100 & 0b1010 = 8
|
||||
(builtins.bitOr 12 10) # 0b1100 | 0b1010 = 14
|
||||
(builtins.bitXor 12 10) # 0b1100 ^ 0b1010 = 6
|
||||
|
||||
(if 3 < 7 then 1 else err)
|
||||
(if 7 < 3 then err else 1)
|
||||
(if 3 < 3 then err else 1)
|
||||
|
||||
(if 3 <= 7 then 1 else err)
|
||||
(if 7 <= 3 then err else 1)
|
||||
(if 3 <= 3 then 1 else err)
|
||||
|
||||
(if 3 > 7 then err else 1)
|
||||
(if 7 > 3 then 1 else err)
|
||||
(if 3 > 3 then err else 1)
|
||||
|
||||
(if 3 >= 7 then err else 1)
|
||||
(if 7 >= 3 then 1 else err)
|
||||
(if 3 >= 3 then 1 else err)
|
||||
|
||||
(if 2 > 1 == 1 < 2 then 1 else err)
|
||||
(if 1 + 2 * 3 >= 7 then 1 else err)
|
||||
(if 1 + 2 * 3 < 7 then err else 1)
|
||||
|
||||
# Not integer, but so what.
|
||||
(if "aa" < "ab" then 1 else err)
|
||||
(if "aa" < "aa" then err else 1)
|
||||
(if "foo" < "foobar" then 1 else err)
|
||||
];
|
||||
|
||||
}
|
1
tests/functional/lang/eval-okay-attrnames.exp
Normal file
1
tests/functional/lang/eval-okay-attrnames.exp
Normal file
|
@ -0,0 +1 @@
|
|||
"newxfoonewxy"
|
11
tests/functional/lang/eval-okay-attrnames.nix
Normal file
11
tests/functional/lang/eval-okay-attrnames.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
with import ./lib.nix;
|
||||
|
||||
let
|
||||
|
||||
attrs = {y = "y"; x = "x"; foo = "foo";} // rec {x = "newx"; bar = x;};
|
||||
|
||||
names = builtins.attrNames attrs;
|
||||
|
||||
values = map (name: builtins.getAttr name attrs) names;
|
||||
|
||||
in assert values == builtins.attrValues attrs; concat values
|
1
tests/functional/lang/eval-okay-attrs.exp
Normal file
1
tests/functional/lang/eval-okay-attrs.exp
Normal file
|
@ -0,0 +1 @@
|
|||
987
|
5
tests/functional/lang/eval-okay-attrs.nix
Normal file
5
tests/functional/lang/eval-okay-attrs.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
let {
|
||||
as = { x = 123; y = 456; } // { z = 789; } // { z = 987; };
|
||||
|
||||
body = if as ? a then as.a else assert as ? z; as.z;
|
||||
}
|
1
tests/functional/lang/eval-okay-attrs2.exp
Normal file
1
tests/functional/lang/eval-okay-attrs2.exp
Normal file
|
@ -0,0 +1 @@
|
|||
987
|
10
tests/functional/lang/eval-okay-attrs2.nix
Normal file
10
tests/functional/lang/eval-okay-attrs2.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
let {
|
||||
as = { x = 123; y = 456; } // { z = 789; } // { z = 987; };
|
||||
|
||||
A = "a";
|
||||
Z = "z";
|
||||
|
||||
body = if builtins.hasAttr A as
|
||||
then builtins.getAttr A as
|
||||
else assert builtins.hasAttr Z as; builtins.getAttr Z as;
|
||||
}
|
1
tests/functional/lang/eval-okay-attrs3.exp
Normal file
1
tests/functional/lang/eval-okay-attrs3.exp
Normal file
|
@ -0,0 +1 @@
|
|||
"foo 22 80 itchyxac"
|
22
tests/functional/lang/eval-okay-attrs3.nix
Normal file
22
tests/functional/lang/eval-okay-attrs3.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
let
|
||||
|
||||
config =
|
||||
{
|
||||
services.sshd.enable = true;
|
||||
services.sshd.port = 22;
|
||||
services.httpd.port = 80;
|
||||
hostName = "itchy";
|
||||
a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z = "x";
|
||||
foo = {
|
||||
a = "a";
|
||||
b.c = "c";
|
||||
};
|
||||
};
|
||||
|
||||
in
|
||||
if config.services.sshd.enable
|
||||
then "foo ${toString config.services.sshd.port} ${toString config.services.httpd.port} ${config.hostName}"
|
||||
+ "${config.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z}"
|
||||
+ "${config.foo.a}"
|
||||
+ "${config.foo.b.c}"
|
||||
else "bar"
|
1
tests/functional/lang/eval-okay-attrs4.exp
Normal file
1
tests/functional/lang/eval-okay-attrs4.exp
Normal file
|
@ -0,0 +1 @@
|
|||
[ true false true false false true false false ]
|
7
tests/functional/lang/eval-okay-attrs4.nix
Normal file
7
tests/functional/lang/eval-okay-attrs4.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
let
|
||||
|
||||
as = { x.y.z = 123; a.b.c = 456; };
|
||||
|
||||
bs = null;
|
||||
|
||||
in [ (as ? x) (as ? y) (as ? x.y.z) (as ? x.y.z.a) (as ? x.y.a) (as ? a.b.c) (bs ? x) (bs ? x.y.z) ]
|
1
tests/functional/lang/eval-okay-attrs5.exp
Normal file
1
tests/functional/lang/eval-okay-attrs5.exp
Normal file
|
@ -0,0 +1 @@
|
|||
[ 123 "foo" 456 456 "foo" "xyzzy" "xyzzy" true ]
|
21
tests/functional/lang/eval-okay-attrs5.nix
Normal file
21
tests/functional/lang/eval-okay-attrs5.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
with import ./lib.nix;
|
||||
|
||||
let
|
||||
|
||||
as = { x.y.z = 123; a.b.c = 456; };
|
||||
|
||||
bs = { f-o-o.bar = "foo"; };
|
||||
|
||||
or = x: y: x || y;
|
||||
|
||||
in
|
||||
[ as.x.y.z
|
||||
as.foo or "foo"
|
||||
as.x.y.bla or as.a.b.c
|
||||
as.a.b.c or as.x.y.z
|
||||
as.x.y.bla or bs.f-o-o.bar or "xyzzy"
|
||||
as.x.y.bla or bs.bar.foo or "xyzzy"
|
||||
(123).bla or null.foo or "xyzzy"
|
||||
# Backwards compatibility test.
|
||||
(fold or [] [true false false])
|
||||
]
|
1
tests/functional/lang/eval-okay-attrs6.exp
Normal file
1
tests/functional/lang/eval-okay-attrs6.exp
Normal file
|
@ -0,0 +1 @@
|
|||
{ __overrides = { bar = "qux"; }; bar = "qux"; foo = "bar"; }
|
4
tests/functional/lang/eval-okay-attrs6.nix
Normal file
4
tests/functional/lang/eval-okay-attrs6.nix
Normal file
|
@ -0,0 +1,4 @@
|
|||
rec {
|
||||
"${"foo"}" = "bar";
|
||||
__overrides = { bar = "qux"; };
|
||||
}
|
1
tests/functional/lang/eval-okay-autoargs.exp
Normal file
1
tests/functional/lang/eval-okay-autoargs.exp
Normal file
|
@ -0,0 +1 @@
|
|||
"xyzzy!xyzzy!foobar"
|
1
tests/functional/lang/eval-okay-autoargs.flags
Normal file
1
tests/functional/lang/eval-okay-autoargs.flags
Normal file
|
@ -0,0 +1 @@
|
|||
--arg lib import(lang/lib.nix) --argstr xyzzy xyzzy! -A result
|
15
tests/functional/lang/eval-okay-autoargs.nix
Normal file
15
tests/functional/lang/eval-okay-autoargs.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
let
|
||||
|
||||
foobar = "foobar";
|
||||
|
||||
in
|
||||
|
||||
{ xyzzy2 ? xyzzy # mutually recursive args
|
||||
, xyzzy ? "blaat" # will be overridden by --argstr
|
||||
, fb ? foobar
|
||||
, lib # will be set by --arg
|
||||
}:
|
||||
|
||||
{
|
||||
result = lib.concat [xyzzy xyzzy2 fb];
|
||||
}
|
1
tests/functional/lang/eval-okay-backslash-newline-1.exp
Normal file
1
tests/functional/lang/eval-okay-backslash-newline-1.exp
Normal file
|
@ -0,0 +1 @@
|
|||
"a\nb"
|
2
tests/functional/lang/eval-okay-backslash-newline-1.nix
Normal file
2
tests/functional/lang/eval-okay-backslash-newline-1.nix
Normal file
|
@ -0,0 +1,2 @@
|
|||
"a\
|
||||
b"
|
1
tests/functional/lang/eval-okay-backslash-newline-2.exp
Normal file
1
tests/functional/lang/eval-okay-backslash-newline-2.exp
Normal file
|
@ -0,0 +1 @@
|
|||
"a\nb"
|
2
tests/functional/lang/eval-okay-backslash-newline-2.nix
Normal file
2
tests/functional/lang/eval-okay-backslash-newline-2.nix
Normal file
|
@ -0,0 +1,2 @@
|
|||
''a''\
|
||||
b''
|
1
tests/functional/lang/eval-okay-builtins-add.exp
Normal file
1
tests/functional/lang/eval-okay-builtins-add.exp
Normal file
|
@ -0,0 +1 @@
|
|||
[ 5 4 "int" "tt" "float" 4 ]
|
8
tests/functional/lang/eval-okay-builtins-add.nix
Normal file
8
tests/functional/lang/eval-okay-builtins-add.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
[
|
||||
(builtins.add 2 3)
|
||||
(builtins.add 2 2)
|
||||
(builtins.typeOf (builtins.add 2 2))
|
||||
("t" + "t")
|
||||
(builtins.typeOf (builtins.add 2.0 2))
|
||||
(builtins.add 2.0 2)
|
||||
]
|
1
tests/functional/lang/eval-okay-builtins.exp
Normal file
1
tests/functional/lang/eval-okay-builtins.exp
Normal file
|
@ -0,0 +1 @@
|
|||
/foo
|
12
tests/functional/lang/eval-okay-builtins.nix
Normal file
12
tests/functional/lang/eval-okay-builtins.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
assert builtins ? currentSystem;
|
||||
assert !builtins ? __currentSystem;
|
||||
|
||||
let {
|
||||
|
||||
x = if builtins ? dirOf then builtins.dirOf /foo/bar else "";
|
||||
|
||||
y = if builtins ? fnord then builtins.fnord "foo" else "";
|
||||
|
||||
body = x + y;
|
||||
|
||||
}
|
1
tests/functional/lang/eval-okay-callable-attrs.exp
Normal file
1
tests/functional/lang/eval-okay-callable-attrs.exp
Normal file
|
@ -0,0 +1 @@
|
|||
true
|
1
tests/functional/lang/eval-okay-callable-attrs.nix
Normal file
1
tests/functional/lang/eval-okay-callable-attrs.nix
Normal file
|
@ -0,0 +1 @@
|
|||
({ __functor = self: x: self.foo && x; foo = false; } // { foo = true; }) true
|
1
tests/functional/lang/eval-okay-catattrs.exp
Normal file
1
tests/functional/lang/eval-okay-catattrs.exp
Normal file
|
@ -0,0 +1 @@
|
|||
[ 1 2 ]
|
1
tests/functional/lang/eval-okay-catattrs.nix
Normal file
1
tests/functional/lang/eval-okay-catattrs.nix
Normal file
|
@ -0,0 +1 @@
|
|||
builtins.catAttrs "a" [ { a = 1; } { b = 0; } { a = 2; } ]
|
1
tests/functional/lang/eval-okay-closure.exp
Normal file
1
tests/functional/lang/eval-okay-closure.exp
Normal file
|
@ -0,0 +1 @@
|
|||
[ { foo = true; key = -13; } { foo = true; key = -12; } { foo = true; key = -11; } { foo = true; key = -9; } { foo = true; key = -8; } { foo = true; key = -7; } { foo = true; key = -5; } { foo = true; key = -4; } { foo = true; key = -3; } { key = -1; } { foo = true; key = 0; } { foo = true; key = 1; } { foo = true; key = 2; } { foo = true; key = 4; } { foo = true; key = 5; } { foo = true; key = 6; } { key = 8; } { foo = true; key = 9; } { foo = true; key = 10; } { foo = true; key = 13; } { foo = true; key = 14; } { foo = true; key = 15; } { key = 17; } { foo = true; key = 18; } { foo = true; key = 19; } { foo = true; key = 22; } { foo = true; key = 23; } { key = 26; } { foo = true; key = 27; } { foo = true; key = 28; } { foo = true; key = 31; } { foo = true; key = 32; } { key = 35; } { foo = true; key = 36; } { foo = true; key = 40; } { foo = true; key = 41; } { key = 44; } { foo = true; key = 45; } { foo = true; key = 49; } { key = 53; } { foo = true; key = 54; } { foo = true; key = 58; } { key = 62; } { foo = true; key = 67; } { key = 71; } { key = 80; } ]
|
343
tests/functional/lang/eval-okay-closure.exp.xml
Normal file
343
tests/functional/lang/eval-okay-closure.exp.xml
Normal file
|
@ -0,0 +1,343 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<expr>
|
||||
<list>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="-13" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="-12" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="-11" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="-9" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="-8" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="-7" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="-5" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="-4" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="-3" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="key">
|
||||
<int value="-1" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="0" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="1" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="2" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="4" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="5" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="6" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="key">
|
||||
<int value="8" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="9" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="10" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="13" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="14" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="15" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="key">
|
||||
<int value="17" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="18" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="19" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="22" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="23" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="key">
|
||||
<int value="26" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="27" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="28" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="31" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="32" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="key">
|
||||
<int value="35" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="36" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="40" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="41" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="key">
|
||||
<int value="44" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="45" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="49" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="key">
|
||||
<int value="53" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="54" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="58" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="key">
|
||||
<int value="62" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="67" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="key">
|
||||
<int value="71" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="key">
|
||||
<int value="80" />
|
||||
</attr>
|
||||
</attrs>
|
||||
</list>
|
||||
</expr>
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue