summaryrefslogtreecommitdiff
path: root/test/handler/test_nix_handler.vader
diff options
context:
space:
mode:
Diffstat (limited to 'test/handler/test_nix_handler.vader')
-rw-r--r--test/handler/test_nix_handler.vader40
1 files changed, 40 insertions, 0 deletions
diff --git a/test/handler/test_nix_handler.vader b/test/handler/test_nix_handler.vader
index 87e8b68f..db6b9a4b 100644
--- a/test/handler/test_nix_handler.vader
+++ b/test/handler/test_nix_handler.vader
@@ -49,3 +49,43 @@ Execute(The nix handler should parse message from old nix-instantiate correctly)
\ 'error: syntax error, unexpected IN, at /path/to/filename.nix:23:14',
\ 'error: syntax error, unexpected ''='', expecting '';'', at /path/to/filename.nix:3:12',
\ ])
+
+Execute(The nix command should not add 'log-format' option for nix version 2.3):
+ AssertEqual
+ \ 'nix-instantiate --parse -',
+ \ ale_linters#nix#nix#Command('', ['nix-instantiate (Nix) 2.3.0'], '')
+
+Execute(The nix command should add 'log-format' option for nix version 2.4):
+ AssertEqual
+ \ 'nix-instantiate --log-format internal-json --parse -',
+ \ ale_linters#nix#nix#Command('', ['nix-instantiate (Nix) 2.4.1'], '')
+
+Execute(The nix command should add 'log-format' option for nix version 2.5):
+ AssertEqual
+ \ 'nix-instantiate --log-format internal-json --parse -',
+ \ ale_linters#nix#nix#Command('', ['nix-instantiate (Nix) 2.5.0pre20211206_d1aaa7e'], '')
+
+Execute(The nix command should add 'log-format' option for nix version 2.6):
+ AssertEqual
+ \ 'nix-instantiate --log-format internal-json --parse -',
+ \ ale_linters#nix#nix#Command('', ['nix-instantiate (Nix) 2.6.0pre20211206_ignored'], '')
+
+Execute(The nix command should add 'log-format' option for nix version 2.7):
+ AssertEqual
+ \ 'nix-instantiate --log-format internal-json --parse -',
+ \ ale_linters#nix#nix#Command('', ['nix-instantiate (Nix) 2.7.0pre20211206_ignored'], '')
+
+Execute(The nix command should add 'log-format' option for nix version 2.8):
+ AssertEqual
+ \ 'nix-instantiate --log-format internal-json --parse -',
+ \ ale_linters#nix#nix#Command('', ['nix-instantiate (Nix) 2.8.0pre20211206_ignored'], '')
+
+Execute(The nix command should add 'log-format' option for nix version 2.9):
+ AssertEqual
+ \ 'nix-instantiate --log-format internal-json --parse -',
+ \ ale_linters#nix#nix#Command('', ['nix-instantiate (Nix) 2.9.0pre20211206_ignored'], '')
+
+Execute(The nix command should add 'log-format' option for nix version 3.0):
+ AssertEqual
+ \ 'nix-instantiate --log-format internal-json --parse -',
+ \ ale_linters#nix#nix#Command('', ['nix-instantiate (Nix) 3.0.0pre20211206_ignored'], '')