diff --git a/tests/functional2/lang/__functor/in.nix b/tests/functional2/lang/__functor/in.nix index 310a030df..3fd32a3af 100644 --- a/tests/functional2/lang/__functor/in.nix +++ b/tests/functional2/lang/__functor/in.nix @@ -1 +1,7 @@ -({ __functor = self: x: self.foo && x; foo = false; } // { foo = true; }) true +( + { + __functor = self: x: self.foo && x; + foo = false; + } + // { foo = true; } +) true diff --git a/tests/functional2/lang/attrs/eval-okay-3.out.exp b/tests/functional2/lang/attrs/eval-okay-3.out.exp index 19de4fdf7..365050426 100644 --- a/tests/functional2/lang/attrs/eval-okay-3.out.exp +++ b/tests/functional2/lang/attrs/eval-okay-3.out.exp @@ -1 +1 @@ -"foo 22 80 itchyxac" +[ 22 80 "itchy" "x" "a" "c" ] diff --git a/tests/functional2/lang/attrs/eval-okay-5.err.exp b/tests/functional2/lang/attrs/eval-okay-5.err.exp index eb65e6535..8c43b2373 100644 --- a/tests/functional2/lang/attrs/eval-okay-5.err.exp +++ b/tests/functional2/lang/attrs/eval-okay-5.err.exp @@ -1,12 +1,12 @@ warning: using or as an identifier is deprecated because it cannot be used in most places (try let or = 1; in or). Use --extra-deprecated-features or-as-identifier to disable this warning. - at /pwd/in.nix:9:3: - 8| - 9| or = x: y: x || y; + at /pwd/in.nix:6:3: + 5| bs = { f-o-o.bar = "foo"; }; + 6| or = x: y: x || y; | ^ - 10| + 7| in warning: using or as an argument is deprecated because it is parsed with the wrong precedence which may cause unexpected behavior. Use --extra-deprecated-features or-as-identifier to disable this warning. - at /pwd/in.nix:23:11: - 22| # it short-circuits and never runs into the type error - 23| (fold or [] [true false false]) - | ^ - 24| ] + at /pwd/in.nix:20:9: + 19| # it short-circuits and never runs into the type error + 20| (fold or [] [true false false]) + | ^ + 21| ] diff --git a/tests/functional2/lang/attrs/eval-okay-strings-as-attrs-names.out.exp b/tests/functional2/lang/attrs/eval-okay-strings-as-attrs-names.out.exp index 27ba77dda..24c667774 100644 --- a/tests/functional2/lang/attrs/eval-okay-strings-as-attrs-names.out.exp +++ b/tests/functional2/lang/attrs/eval-okay-strings-as-attrs-names.out.exp @@ -1 +1 @@ -true +[ "test" "caseok" true [ "key 1" ] ] diff --git a/tests/functional2/lang/attrs/in-2.nix b/tests/functional2/lang/attrs/in-2.nix index 925dc1859..8af9b0b51 100644 --- a/tests/functional2/lang/attrs/in-2.nix +++ b/tests/functional2/lang/attrs/in-2.nix @@ -5,7 +5,6 @@ let Z = "z"; in -if builtins.hasAttr A as then - builtins.getAttr A as -else - assert builtins.hasAttr Z as; builtins.getAttr Z as +assert !(builtins.hasAttr A as); +assert builtins.hasAttr Z as; +builtins.getAttr Z as diff --git a/tests/functional2/lang/attrs/in-3.nix b/tests/functional2/lang/attrs/in-3.nix index f29de11fe..3d1dfc21b 100644 --- a/tests/functional2/lang/attrs/in-3.nix +++ b/tests/functional2/lang/attrs/in-3.nix @@ -14,9 +14,12 @@ let }; 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" +assert config.services.sshd.enable; +[ + config.services.sshd.port + 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 +] diff --git a/tests/functional2/lang/attrs/in-4.nix b/tests/functional2/lang/attrs/in-4.nix index 43ec81210..dd7c558f2 100644 --- a/tests/functional2/lang/attrs/in-4.nix +++ b/tests/functional2/lang/attrs/in-4.nix @@ -1,7 +1,14 @@ 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) ] +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) +] diff --git a/tests/functional2/lang/attrs/in-5.nix b/tests/functional2/lang/attrs/in-5.nix index 5d108bc7f..8b9cd1243 100644 --- a/tests/functional2/lang/attrs/in-5.nix +++ b/tests/functional2/lang/attrs/in-5.nix @@ -1,24 +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 for `fun or` being handled as intended. - # n.b. this code contains a type error, because the nul value should be false instead of []. - # but the code expands to `true || (false || (false || [])))`, so as long as at least one value in the list is true - # it short-circuits and never runs into the type error - (fold or [] [true false false]) - ] +[ + 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 for `fun or` being handled as intended. + # n.b. this code contains a type error, because the nul value should be false instead of []. + # but the code expands to `true || (false || (false || [])))`, so as long as at least one value in the list is true + # it short-circuits and never runs into the type error + (fold or [] [true false false]) +] diff --git a/tests/functional2/lang/attrs/in-duplicate-1.nix b/tests/functional2/lang/attrs/in-duplicate-1.nix index 2c02317d2..e590e8a04 100644 --- a/tests/functional2/lang/attrs/in-duplicate-1.nix +++ b/tests/functional2/lang/attrs/in-duplicate-1.nix @@ -1,4 +1,5 @@ -{ x = 123; +{ + x = 123; y = 456; x = 789; } diff --git a/tests/functional2/lang/attrs/in-duplicate-2.nix b/tests/functional2/lang/attrs/in-duplicate-2.nix index 2b3b4ccde..326c2bb50 100644 --- a/tests/functional2/lang/attrs/in-duplicate-2.nix +++ b/tests/functional2/lang/attrs/in-duplicate-2.nix @@ -1,13 +1,10 @@ rec { - as = { x = 123; y = 456; }; - bs = { x = 789; inherit (as) x; }; - } diff --git a/tests/functional2/lang/attrs/in-duplicate-3.nix b/tests/functional2/lang/attrs/in-duplicate-3.nix index 732fbf9e7..2f0dbc4b2 100644 --- a/tests/functional2/lang/attrs/in-duplicate-3.nix +++ b/tests/functional2/lang/attrs/in-duplicate-3.nix @@ -1,13 +1,10 @@ rec { - as = { x = 123; y = 456; }; - bs = rec { x = 789; inherit (as) x; }; - } diff --git a/tests/functional2/lang/attrs/in-duplicate-7.nix b/tests/functional2/lang/attrs/in-duplicate-7.nix index bbc3eb08c..df67151a6 100644 --- a/tests/functional2/lang/attrs/in-duplicate-7.nix +++ b/tests/functional2/lang/attrs/in-duplicate-7.nix @@ -1,7 +1,5 @@ rec { - x = 1; - as = { inherit x; inherit x; diff --git a/tests/functional2/lang/attrs/in-strings-as-attrs-names.nix b/tests/functional2/lang/attrs/in-strings-as-attrs-names.nix index 5e40928db..5c8c29ac9 100644 --- a/tests/functional2/lang/attrs/in-strings-as-attrs-names.nix +++ b/tests/functional2/lang/attrs/in-strings-as-attrs-names.nix @@ -14,7 +14,5 @@ let # variable. "foo bar" = 1; -in t1 == "test" - && t2 == "caseok" - && t3 == true - && t4 == ["key 1"] +in +[ t1 t2 t3 t4 ] diff --git a/tests/functional2/lang/attrs/parse-fail-duplicate-1.err.exp b/tests/functional2/lang/attrs/parse-fail-duplicate-1.err.exp index e5959efb7..f869a247e 100644 --- a/tests/functional2/lang/attrs/parse-fail-duplicate-1.err.exp +++ b/tests/functional2/lang/attrs/parse-fail-duplicate-1.err.exp @@ -1,6 +1,6 @@ -error: attribute 'x' already defined at /pwd/in.nix:1:3 - at /pwd/in.nix:3:3: - 2| y = 456; - 3| x = 789; +error: attribute 'x' already defined at /pwd/in.nix:2:3 + at /pwd/in.nix:4:3: + 3| y = 456; + 4| x = 789; | ^ - 4| } + 5| } diff --git a/tests/functional2/lang/attrs/parse-fail-duplicate-2.err.exp b/tests/functional2/lang/attrs/parse-fail-duplicate-2.err.exp index 178d0e80d..7c945acb6 100644 --- a/tests/functional2/lang/attrs/parse-fail-duplicate-2.err.exp +++ b/tests/functional2/lang/attrs/parse-fail-duplicate-2.err.exp @@ -1,6 +1,6 @@ -error: attribute 'x' already defined at /pwd/in.nix:9:5 - at /pwd/in.nix:10:18: - 9| x = 789; - 10| inherit (as) x; +error: attribute 'x' already defined at /pwd/in.nix:7:5 + at /pwd/in.nix:8:18: + 7| x = 789; + 8| inherit (as) x; | ^ - 11| }; + 9| }; diff --git a/tests/functional2/lang/attrs/parse-fail-duplicate-3.err.exp b/tests/functional2/lang/attrs/parse-fail-duplicate-3.err.exp index 178d0e80d..7c945acb6 100644 --- a/tests/functional2/lang/attrs/parse-fail-duplicate-3.err.exp +++ b/tests/functional2/lang/attrs/parse-fail-duplicate-3.err.exp @@ -1,6 +1,6 @@ -error: attribute 'x' already defined at /pwd/in.nix:9:5 - at /pwd/in.nix:10:18: - 9| x = 789; - 10| inherit (as) x; +error: attribute 'x' already defined at /pwd/in.nix:7:5 + at /pwd/in.nix:8:18: + 7| x = 789; + 8| inherit (as) x; | ^ - 11| }; + 9| }; diff --git a/tests/functional2/lang/attrs/parse-fail-duplicate-7.err.exp b/tests/functional2/lang/attrs/parse-fail-duplicate-7.err.exp index 8500a0c5b..ef6222c41 100644 --- a/tests/functional2/lang/attrs/parse-fail-duplicate-7.err.exp +++ b/tests/functional2/lang/attrs/parse-fail-duplicate-7.err.exp @@ -1,6 +1,6 @@ -error: attribute 'x' already defined at /pwd/in.nix:6:13 - at /pwd/in.nix:7:13: - 6| inherit x; - 7| inherit x; +error: attribute 'x' already defined at /pwd/in.nix:4:13 + at /pwd/in.nix:5:13: + 4| inherit x; + 5| inherit x; | ^ - 8| }; + 6| }; diff --git a/tests/functional2/lang/builtins.add/in.nix b/tests/functional2/lang/builtins.add/in.nix index c84181622..bc680ad88 100644 --- a/tests/functional2/lang/builtins.add/in.nix +++ b/tests/functional2/lang/builtins.add/in.nix @@ -1,8 +1,9 @@ +# See also the "arithmetic" tests [ -(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) + (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) ] diff --git a/tests/functional2/lang/builtins.any-all/in.nix b/tests/functional2/lang/builtins.any-all/in.nix index a3f26ea2a..2169cc85e 100644 --- a/tests/functional2/lang/builtins.any-all/in.nix +++ b/tests/functional2/lang/builtins.any-all/in.nix @@ -1,6 +1,7 @@ with builtins; -[ (any (x: x == 1) []) +[ + (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]) diff --git a/tests/functional2/lang/builtins.concatMap/in.nix b/tests/functional2/lang/builtins.concatMap/in.nix index 97da5d37a..c1ca65778 100644 --- a/tests/functional2/lang/builtins.concatMap/in.nix +++ b/tests/functional2/lang/builtins.concatMap/in.nix @@ -1,5 +1,6 @@ with import ./lib.nix; -[ (builtins.concatMap (x: if x / 2 * 2 == x then [] else [ x ]) (range 0 10)) +[ + (builtins.concatMap (x: if x / 2 * 2 == x then [] else [ x ]) (range 0 10)) (builtins.concatMap (x: [x] ++ ["z"]) ["a" "b"]) ] diff --git a/tests/functional2/lang/builtins.concatStringsSep/in.nix b/tests/functional2/lang/builtins.concatStringsSep/in.nix index adc4c41bd..97cec25fb 100644 --- a/tests/functional2/lang/builtins.concatStringsSep/in.nix +++ b/tests/functional2/lang/builtins.concatStringsSep/in.nix @@ -1,6 +1,7 @@ with builtins; -[ (concatStringsSep "" []) +[ + (concatStringsSep "" []) (concatStringsSep "" ["foo" "bar" "xyzzy"]) (concatStringsSep ", " ["foo" "bar" "xyzzy"]) (concatStringsSep ", " ["foo"]) diff --git a/tests/functional2/lang/builtins.floor-ceil/eval-okay.out.exp b/tests/functional2/lang/builtins.floor-ceil/eval-okay.out.exp index 193681924..87b3b2a78 100644 --- a/tests/functional2/lang/builtins.floor-ceil/eval-okay.out.exp +++ b/tests/functional2/lang/builtins.floor-ceil/eval-okay.out.exp @@ -1 +1 @@ -[ "23" "24" "23" "23" ] +[ 23 24 23 23 ] diff --git a/tests/functional2/lang/builtins.floor-ceil/in.nix b/tests/functional2/lang/builtins.floor-ceil/in.nix index 669c8ae9c..8e2d9b932 100644 --- a/tests/functional2/lang/builtins.floor-ceil/in.nix +++ b/tests/functional2/lang/builtins.floor-ceil/in.nix @@ -1,9 +1,7 @@ -with import ./lib.nix; - let n1 = builtins.floor 23.5; n2 = builtins.ceil 23.5; n3 = builtins.floor 23; n4 = builtins.ceil 23; in -map toString [ n1 n2 n3 n4 ] +[ n1 n2 n3 n4 ] diff --git a/tests/functional2/lang/builtins.intersectAttrs/in.nix b/tests/functional2/lang/builtins.intersectAttrs/in.nix index 39d49938c..f6e865721 100644 --- a/tests/functional2/lang/builtins.intersectAttrs/in.nix +++ b/tests/functional2/lang/builtins.intersectAttrs/in.nix @@ -1,6 +1,6 @@ let - alphabet = - { a = "a"; + alphabet = { + a = "a"; b = "b"; c = "c"; d = "d"; @@ -33,7 +33,8 @@ let }; alphabetFail = builtins.mapAttrs throw alphabet; in -[ (builtins.intersectAttrs { a = abort "l1"; } { b = abort "r1"; }) +[ + (builtins.intersectAttrs { a = abort "l1"; } { b = abort "r1"; }) (builtins.intersectAttrs { a = abort "l2"; } { a = 1; }) (builtins.intersectAttrs alphabetFail { a = 1; }) (builtins.intersectAttrs { a = abort "laa"; } alphabet) diff --git a/tests/functional2/lang/builtins.mapAttrs/in.nix b/tests/functional2/lang/builtins.mapAttrs/in.nix index f075b6275..ea0a0851c 100644 --- a/tests/functional2/lang/builtins.mapAttrs/in.nix +++ b/tests/functional2/lang/builtins.mapAttrs/in.nix @@ -1,3 +1 @@ -with import ./lib.nix; - builtins.mapAttrs (name: value: name + "-" + value) { x = "foo"; y = "bar"; } diff --git a/tests/functional2/lang/builtins.parseFlakeRef/in.nix b/tests/functional2/lang/builtins.parseFlakeRef/in.nix index db4ed2742..404c5df08 100644 --- a/tests/functional2/lang/builtins.parseFlakeRef/in.nix +++ b/tests/functional2/lang/builtins.parseFlakeRef/in.nix @@ -1 +1 @@ - builtins.parseFlakeRef "github:NixOS/nixpkgs/23.05?dir=lib" +builtins.parseFlakeRef "github:NixOS/nixpkgs/23.05?dir=lib" diff --git a/tests/functional2/lang/builtins.path/in.nix b/tests/functional2/lang/builtins.path/in.nix index e67168cf3..dddf7e9e1 100644 --- a/tests/functional2/lang/builtins.path/in.nix +++ b/tests/functional2/lang/builtins.path/in.nix @@ -1,7 +1,7 @@ -builtins.path - { path = ./.; - filter = path: _: baseNameOf path == "data"; - recursive = true; - sha256 = "1yhm3gwvg5a41yylymgblsclk95fs6jy72w0wv925mmidlhcq4sw"; - name = "output"; - } +builtins.path { + path = ./.; + filter = path: _: baseNameOf path == "data"; + recursive = true; + sha256 = "1yhm3gwvg5a41yylymgblsclk95fs6jy72w0wv925mmidlhcq4sw"; + name = "output"; +} diff --git a/tests/functional2/lang/builtins.removeAttrs/eval-fail.err.exp b/tests/functional2/lang/builtins.removeAttrs/eval-fail.err.exp index b2bfe49ae..2084eaf3e 100644 --- a/tests/functional2/lang/builtins.removeAttrs/eval-fail.err.exp +++ b/tests/functional2/lang/builtins.removeAttrs/eval-fail.err.exp @@ -1,7 +1,7 @@ error: attribute 'x' missing - at /pwd/in.nix:4:29: + at /pwd/in.nix:4:27: 3| in - 4| (removeAttrs attrs ["x"]).x - | ^ + 4| (removeAttrs attrs ["x"]).x + | ^ 5| Did you mean y? diff --git a/tests/functional2/lang/builtins.removeAttrs/in.nix b/tests/functional2/lang/builtins.removeAttrs/in.nix index 3ea7b1c86..803efc166 100644 --- a/tests/functional2/lang/builtins.removeAttrs/in.nix +++ b/tests/functional2/lang/builtins.removeAttrs/in.nix @@ -1,4 +1,4 @@ let attrs = {x = 123; y = 456;}; in - (removeAttrs attrs ["x"]).x +(removeAttrs attrs ["x"]).x diff --git a/tests/functional2/lang/builtins.replaceStrings/in.nix b/tests/functional2/lang/builtins.replaceStrings/in.nix index a803e6519..0d82b61c4 100644 --- a/tests/functional2/lang/builtins.replaceStrings/in.nix +++ b/tests/functional2/lang/builtins.replaceStrings/in.nix @@ -1,6 +1,7 @@ with builtins; -[ (replaceStrings ["o"] ["a"] "foobar") +[ + (replaceStrings ["o"] ["a"] "foobar") (replaceStrings ["o"] [""] "foobar") (replaceStrings ["oo"] ["u"] "foobar") (replaceStrings ["oo" "a"] ["a" "oo"] "foobar") diff --git a/tests/functional2/lang/builtins.sort/in.nix b/tests/functional2/lang/builtins.sort/in.nix index 50aa78e40..d525b2326 100644 --- a/tests/functional2/lang/builtins.sort/in.nix +++ b/tests/functional2/lang/builtins.sort/in.nix @@ -1,6 +1,7 @@ with builtins; -[ (sort lessThan [ 483 249 526 147 42 77 ]) +[ + (sort lessThan [ 483 249 526 147 42 77 ]) (sort (x: y: y < x) [ 483 249 526 147 42 77 ]) (sort lessThan [ "foo" "bar" "xyzzy" "fnord" ]) (sort (x: y: x.key < y.key) diff --git a/tests/functional2/lang/builtins.toJSON/in.nix b/tests/functional2/lang/builtins.toJSON/in.nix index ce67943be..085ada7ef 100644 --- a/tests/functional2/lang/builtins.toJSON/in.nix +++ b/tests/functional2/lang/builtins.toJSON/in.nix @@ -1,13 +1,13 @@ -builtins.toJSON - { a = 123; - b = -456; - c = "foo"; - d = "foo\n\"bar\""; - e = true; - f = false; - g = [ 1 2 3 ]; - h = [ "a" [ "b" { "foo\nbar" = {}; } ] ]; - i = 1 + 2; - j = 1.44; - k = { __toString = self: self.a; a = "foo"; }; - } +builtins.toJSON { + a = 123; + b = -456; + c = "foo"; + d = "foo\n\"bar\""; + e = true; + f = false; + g = [ 1 2 3 ]; + h = [ "a" [ "b" { "foo\nbar" = {}; } ] ]; + i = 1 + 2; + j = 1.44; + k = { __toString = self: self.a; a = "foo"; }; +} diff --git a/tests/functional2/lang/comments/parse-okay.out.exp b/tests/functional2/lang/comments/parse-okay.out.exp new file mode 100644 index 000000000..188a8860b --- /dev/null +++ b/tests/functional2/lang/comments/parse-okay.out.exp @@ -0,0 +1,153 @@ +_type: ExprConcatStrings +es: + - _type: ExprConcatStrings + es: + - _type: ExprConcatStrings + es: + - _type: ExprConcatStrings + es: + - _type: ExprConcatStrings + es: + - _type: ExprConcatStrings + es: + - _type: ExprConcatStrings + es: + - _type: ExprConcatStrings + es: + - _type: ExprConcatStrings + es: + - _type: ExprConcatStrings + es: + - _type: ExprConcatStrings + es: + - _type: ExprConcatStrings + es: + - _type: ExprConcatStrings + es: + - _type: ExprConcatStrings + es: + - _type: ExprConcatStrings + es: + - _type: ExprConcatStrings + es: + - _type: ExprConcatStrings + es: + - _type: ExprConcatStrings + es: + - _type: ExprConcatStrings + es: + - _type: ExprConcatStrings + es: + - _type: ExprConcatStrings + es: + - _type: ExprConcatStrings + es: + - _type: ExprConcatStrings + es: + - _type: ExprConcatStrings + es: + - _type: ExprConcatStrings + es: + - _type: ExprLiteral + value: a + valueType: String + - _type: ExprLiteral + value: b + valueType: String + isInterpolation: false + - _type: ExprLiteral + value: c + valueType: String + isInterpolation: false + - _type: ExprLiteral + value: d + valueType: String + isInterpolation: false + - _type: ExprLiteral + value: e + valueType: String + isInterpolation: false + - _type: ExprLiteral + value: f + valueType: String + isInterpolation: false + - _type: ExprLiteral + value: g + valueType: String + isInterpolation: false + - _type: ExprLiteral + value: h + valueType: String + isInterpolation: false + - _type: ExprLiteral + value: i + valueType: String + isInterpolation: false + - _type: ExprLiteral + value: j + valueType: String + isInterpolation: false + - _type: ExprLiteral + value: k + valueType: String + isInterpolation: false + - _type: ExprLiteral + value: l + valueType: String + isInterpolation: false + - _type: ExprLiteral + value: m + valueType: String + isInterpolation: false + - _type: ExprLiteral + value: n + valueType: String + isInterpolation: false + - _type: ExprLiteral + value: o + valueType: String + isInterpolation: false + - _type: ExprLiteral + value: p + valueType: String + isInterpolation: false + - _type: ExprLiteral + value: q + valueType: String + isInterpolation: false + - _type: ExprLiteral + value: r + valueType: String + isInterpolation: false + - _type: ExprLiteral + value: s + valueType: String + isInterpolation: false + - _type: ExprLiteral + value: t + valueType: String + isInterpolation: false + - _type: ExprLiteral + value: u + valueType: String + isInterpolation: false + - _type: ExprLiteral + value: v + valueType: String + isInterpolation: false + - _type: ExprLiteral + value: w + valueType: String + isInterpolation: false + - _type: ExprLiteral + value: x + valueType: String + isInterpolation: false + - _type: ExprLiteral + value: y + valueType: String + isInterpolation: false + - _type: ExprLiteral + value: z + valueType: String +isInterpolation: false diff --git a/tests/functional2/lang/function-args/in.nix b/tests/functional2/lang/function-args/in.nix index 68dca62ee..fce12f25c 100644 --- a/tests/functional2/lang/function-args/in.nix +++ b/tests/functional2/lang/function-args/in.nix @@ -66,15 +66,15 @@ let }; in - - [ pkgs.stdenv.name - pkgs.fetchurl.name - pkgs.aterm.name - pkgs2.aterm.name - pkgs.xorg.libX11.name - pkgs.xorg.libXv.name - pkgs.mplayer.name - pkgs2.mplayer.name - pkgs.nix.name - pkgs2.nix.name - ] +[ + pkgs.stdenv.name + pkgs.fetchurl.name + pkgs.aterm.name + pkgs2.aterm.name + pkgs.xorg.libX11.name + pkgs.xorg.libXv.name + pkgs.mplayer.name + pkgs2.mplayer.name + pkgs.nix.name + pkgs2.nix.name +] diff --git a/tests/functional2/lang/if/parse-okay.out.exp b/tests/functional2/lang/if/parse-okay.out.exp new file mode 100644 index 000000000..60dde3b1b --- /dev/null +++ b/tests/functional2/lang/if/parse-okay.out.exp @@ -0,0 +1,34 @@ +_type: ExprIf +cond: + _type: ExprOpNEq + e1: + _type: ExprLiteral + value: foo + valueType: String + e2: + _type: ExprConcatStrings + es: + - _type: ExprLiteral + value: f + valueType: String + - _type: ExprLiteral + value: oo + valueType: String + isInterpolation: false +else: + _type: ExprIf + cond: + _type: ExprVar + value: 'false' + else: + _type: ExprLiteral + value: 3 + valueType: Int + then: + _type: ExprLiteral + value: 2 + valueType: Int +then: + _type: ExprLiteral + value: 1 + valueType: Int diff --git a/tests/functional2/lang/types/in.nix b/tests/functional2/lang/types/in.nix index 9b58be5d1..12cac9717 100644 --- a/tests/functional2/lang/types/in.nix +++ b/tests/functional2/lang/types/in.nix @@ -1,6 +1,7 @@ with builtins; -[ (isNull null) +[ + (isNull null) (isNull (x: x)) (isFunction (x: x)) (isFunction "fnord") diff --git a/tests/functional2/lang/url-literals/in.nix b/tests/functional2/lang/url-literals/in.nix index f74a72bb1..675d6b5e1 100644 --- a/tests/functional2/lang/url-literals/in.nix +++ b/tests/functional2/lang/url-literals/in.nix @@ -1,5 +1,6 @@ # This test needs to be run with --extra-deprecated-features url-literals -[ x:x +[ + x:x https://svn.cs.uu.nl:12443/repos/trace/trunk http://www2.mplayerhq.hu/MPlayer/releases/fonts/font-arial-iso-8859-1.tar.bz2 http://losser.st-lab.cs.uu.nl/~armijn/.nix/gcc-3.3.4-static-nix.tar.gz