From 0fec7d2db6d7f05ab228f12a6b57b2cd4a64276b Mon Sep 17 00:00:00 2001 From: Rebecca Turner Date: Thu, 4 Apr 2024 15:42:47 -0700 Subject: Rename some parse failure tests to `parse-fail-*` These were mistakenly labeled `eval-fail-*`. Note that the `lang.sh` runner passes `parse-fail-*` tests on stdin, so filenames are removed from error messages. Change-Id: I7f3a0d78b6cfa87af29aaa1b7af19d5a57fd4ade --- tests/functional/lang/eval-fail-eol-1.err.exp | 6 ------ tests/functional/lang/eval-fail-eol-1.nix | 3 --- tests/functional/lang/eval-fail-eol-2.err.exp | 6 ------ tests/functional/lang/eval-fail-eol-2.nix | 2 -- tests/functional/lang/eval-fail-eol-3.err.exp | 6 ------ tests/functional/lang/eval-fail-eol-3.nix | 3 --- tests/functional/lang/eval-fail-path-slash.err.exp | 6 ------ tests/functional/lang/eval-fail-path-slash.nix | 6 ------ tests/functional/lang/eval-fail-set.err.exp | 5 ----- tests/functional/lang/eval-fail-set.nix | 1 - tests/functional/lang/parse-fail-eol-1.err.exp | 6 ++++++ tests/functional/lang/parse-fail-eol-1.nix | 3 +++ tests/functional/lang/parse-fail-eol-2.err.exp | 6 ++++++ tests/functional/lang/parse-fail-eol-2.nix | 2 ++ tests/functional/lang/parse-fail-eol-3.err.exp | 6 ++++++ tests/functional/lang/parse-fail-eol-3.nix | 3 +++ tests/functional/lang/parse-fail-path-slash.err.exp | 6 ++++++ tests/functional/lang/parse-fail-path-slash.nix | 6 ++++++ tests/functional/lang/parse-fail-set.err.exp | 5 +++++ tests/functional/lang/parse-fail-set.nix | 1 + 20 files changed, 44 insertions(+), 44 deletions(-) delete mode 100644 tests/functional/lang/eval-fail-eol-1.err.exp delete mode 100644 tests/functional/lang/eval-fail-eol-1.nix delete mode 100644 tests/functional/lang/eval-fail-eol-2.err.exp delete mode 100644 tests/functional/lang/eval-fail-eol-2.nix delete mode 100644 tests/functional/lang/eval-fail-eol-3.err.exp delete mode 100644 tests/functional/lang/eval-fail-eol-3.nix delete mode 100644 tests/functional/lang/eval-fail-path-slash.err.exp delete mode 100644 tests/functional/lang/eval-fail-path-slash.nix delete mode 100644 tests/functional/lang/eval-fail-set.err.exp delete mode 100644 tests/functional/lang/eval-fail-set.nix create mode 100644 tests/functional/lang/parse-fail-eol-1.err.exp create mode 100644 tests/functional/lang/parse-fail-eol-1.nix create mode 100644 tests/functional/lang/parse-fail-eol-2.err.exp create mode 100644 tests/functional/lang/parse-fail-eol-2.nix create mode 100644 tests/functional/lang/parse-fail-eol-3.err.exp create mode 100644 tests/functional/lang/parse-fail-eol-3.nix create mode 100644 tests/functional/lang/parse-fail-path-slash.err.exp create mode 100644 tests/functional/lang/parse-fail-path-slash.nix create mode 100644 tests/functional/lang/parse-fail-set.err.exp create mode 100644 tests/functional/lang/parse-fail-set.nix (limited to 'tests/functional') diff --git a/tests/functional/lang/eval-fail-eol-1.err.exp b/tests/functional/lang/eval-fail-eol-1.err.exp deleted file mode 100644 index 3f5a5c22c..000000000 --- a/tests/functional/lang/eval-fail-eol-1.err.exp +++ /dev/null @@ -1,6 +0,0 @@ -error: undefined variable 'invalid' - at /pwd/lang/eval-fail-eol-1.nix:2:1: - 1| # foo - 2| invalid - | ^ - 3| # bar diff --git a/tests/functional/lang/eval-fail-eol-1.nix b/tests/functional/lang/eval-fail-eol-1.nix deleted file mode 100644 index 476223919..000000000 --- a/tests/functional/lang/eval-fail-eol-1.nix +++ /dev/null @@ -1,3 +0,0 @@ -# foo -invalid -# bar diff --git a/tests/functional/lang/eval-fail-eol-2.err.exp b/tests/functional/lang/eval-fail-eol-2.err.exp deleted file mode 100644 index ff13e2d55..000000000 --- a/tests/functional/lang/eval-fail-eol-2.err.exp +++ /dev/null @@ -1,6 +0,0 @@ -error: undefined variable 'invalid' - at /pwd/lang/eval-fail-eol-2.nix:2:1: - 1| # foo - 2| invalid - | ^ - 3| # bar diff --git a/tests/functional/lang/eval-fail-eol-2.nix b/tests/functional/lang/eval-fail-eol-2.nix deleted file mode 100644 index 0cf92a425..000000000 --- a/tests/functional/lang/eval-fail-eol-2.nix +++ /dev/null @@ -1,2 +0,0 @@ -# foo invalid -# bar diff --git a/tests/functional/lang/eval-fail-eol-3.err.exp b/tests/functional/lang/eval-fail-eol-3.err.exp deleted file mode 100644 index ada3c5ecd..000000000 --- a/tests/functional/lang/eval-fail-eol-3.err.exp +++ /dev/null @@ -1,6 +0,0 @@ -error: undefined variable 'invalid' - at /pwd/lang/eval-fail-eol-3.nix:2:1: - 1| # foo - 2| invalid - | ^ - 3| # bar diff --git a/tests/functional/lang/eval-fail-eol-3.nix b/tests/functional/lang/eval-fail-eol-3.nix deleted file mode 100644 index 33422452d..000000000 --- a/tests/functional/lang/eval-fail-eol-3.nix +++ /dev/null @@ -1,3 +0,0 @@ -# foo -invalid -# bar diff --git a/tests/functional/lang/eval-fail-path-slash.err.exp b/tests/functional/lang/eval-fail-path-slash.err.exp deleted file mode 100644 index e3531d352..000000000 --- a/tests/functional/lang/eval-fail-path-slash.err.exp +++ /dev/null @@ -1,6 +0,0 @@ -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| diff --git a/tests/functional/lang/eval-fail-path-slash.nix b/tests/functional/lang/eval-fail-path-slash.nix deleted file mode 100644 index 8c2e104c7..000000000 --- a/tests/functional/lang/eval-fail-path-slash.nix +++ /dev/null @@ -1,6 +0,0 @@ -# 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/ diff --git a/tests/functional/lang/eval-fail-set.err.exp b/tests/functional/lang/eval-fail-set.err.exp deleted file mode 100644 index 6dd646e11..000000000 --- a/tests/functional/lang/eval-fail-set.err.exp +++ /dev/null @@ -1,5 +0,0 @@ -error: undefined variable 'x' - at /pwd/lang/eval-fail-set.nix:1:3: - 1| 8.x - | ^ - 2| diff --git a/tests/functional/lang/eval-fail-set.nix b/tests/functional/lang/eval-fail-set.nix deleted file mode 100644 index c6b7980b6..000000000 --- a/tests/functional/lang/eval-fail-set.nix +++ /dev/null @@ -1 +0,0 @@ -8.x diff --git a/tests/functional/lang/parse-fail-eol-1.err.exp b/tests/functional/lang/parse-fail-eol-1.err.exp new file mode 100644 index 000000000..f7f79b460 --- /dev/null +++ b/tests/functional/lang/parse-fail-eol-1.err.exp @@ -0,0 +1,6 @@ +error: undefined variable 'invalid' + at «stdin»:2:1: + 1| # foo + 2| invalid + | ^ + 3| # bar diff --git a/tests/functional/lang/parse-fail-eol-1.nix b/tests/functional/lang/parse-fail-eol-1.nix new file mode 100644 index 000000000..476223919 --- /dev/null +++ b/tests/functional/lang/parse-fail-eol-1.nix @@ -0,0 +1,3 @@ +# foo +invalid +# bar diff --git a/tests/functional/lang/parse-fail-eol-2.err.exp b/tests/functional/lang/parse-fail-eol-2.err.exp new file mode 100644 index 000000000..f7f79b460 --- /dev/null +++ b/tests/functional/lang/parse-fail-eol-2.err.exp @@ -0,0 +1,6 @@ +error: undefined variable 'invalid' + at «stdin»:2:1: + 1| # foo + 2| invalid + | ^ + 3| # bar diff --git a/tests/functional/lang/parse-fail-eol-2.nix b/tests/functional/lang/parse-fail-eol-2.nix new file mode 100644 index 000000000..0cf92a425 --- /dev/null +++ b/tests/functional/lang/parse-fail-eol-2.nix @@ -0,0 +1,2 @@ +# foo invalid +# bar diff --git a/tests/functional/lang/parse-fail-eol-3.err.exp b/tests/functional/lang/parse-fail-eol-3.err.exp new file mode 100644 index 000000000..f7f79b460 --- /dev/null +++ b/tests/functional/lang/parse-fail-eol-3.err.exp @@ -0,0 +1,6 @@ +error: undefined variable 'invalid' + at «stdin»:2:1: + 1| # foo + 2| invalid + | ^ + 3| # bar diff --git a/tests/functional/lang/parse-fail-eol-3.nix b/tests/functional/lang/parse-fail-eol-3.nix new file mode 100644 index 000000000..33422452d --- /dev/null +++ b/tests/functional/lang/parse-fail-eol-3.nix @@ -0,0 +1,3 @@ +# foo +invalid +# bar diff --git a/tests/functional/lang/parse-fail-path-slash.err.exp b/tests/functional/lang/parse-fail-path-slash.err.exp new file mode 100644 index 000000000..0407543a1 --- /dev/null +++ b/tests/functional/lang/parse-fail-path-slash.err.exp @@ -0,0 +1,6 @@ +error: path has a trailing slash + at «stdin»:6:12: + 5| # and https://nixos.org/nix-dev/2016-June/020829.html + 6| /nix/store/ + | ^ + 7| diff --git a/tests/functional/lang/parse-fail-path-slash.nix b/tests/functional/lang/parse-fail-path-slash.nix new file mode 100644 index 000000000..8c2e104c7 --- /dev/null +++ b/tests/functional/lang/parse-fail-path-slash.nix @@ -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/ diff --git a/tests/functional/lang/parse-fail-set.err.exp b/tests/functional/lang/parse-fail-set.err.exp new file mode 100644 index 000000000..2f77406a7 --- /dev/null +++ b/tests/functional/lang/parse-fail-set.err.exp @@ -0,0 +1,5 @@ +error: undefined variable 'x' + at «stdin»:1:3: + 1| 8.x + | ^ + 2| diff --git a/tests/functional/lang/parse-fail-set.nix b/tests/functional/lang/parse-fail-set.nix new file mode 100644 index 000000000..c6b7980b6 --- /dev/null +++ b/tests/functional/lang/parse-fail-set.nix @@ -0,0 +1 @@ +8.x -- cgit v1.2.3