summaryrefslogtreecommitdiff
path: root/snakemake-test.el
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2016-11-01 22:09:15 -0400
committerKyle Meyer <kyle@kyleam.com>2016-11-01 22:09:15 -0400
commit9a474fd2c8c17c330d02ba2ee32b543c80d55e2e (patch)
tree18e0d09b24dd78317e5e32c09d3c00ce2b0a12f8 /snakemake-test.el
parent31c284548e00939038a600030119d03f7d63263d (diff)
parent82afce155a22c5b93a165945cc17e095485d6b7e (diff)
downloadsnakemake-mode-9a474fd2c8c17c330d02ba2ee32b543c80d55e2e.tar.gz
Merge branch 'pop-error'
Diffstat (limited to 'snakemake-test.el')
-rw-r--r--snakemake-test.el23
1 files changed, 23 insertions, 0 deletions
diff --git a/snakemake-test.el b/snakemake-test.el
index 80b6bcd..19a0b99 100644
--- a/snakemake-test.el
+++ b/snakemake-test.el
@@ -820,6 +820,29 @@ two words"
(should-not
(snakemake-with-temp-dir
(snakemake-check-target "cc_wildcards")))
+ ;; Errors with the Snakefile, like ambiguous rules and syntax
+ ;; errors, should be reported as errors rather than treated as
+ ;; invalid targets.
+ (should-error
+ (snakemake-with-temp-dir
+ (write-region "\ndef incomplete_def:"
+ nil
+ "Snakefile"
+ 'append)
+ (snakemake-check-target "aa"))
+ :type 'snakemake-error)
+ (should-error
+ (snakemake-with-temp-dir
+ (write-region "\
+
+rule aa:
+ output: \"aa.ambig.out\"
+ shell: \"echo aa.ambig.content > {output}\""
+ nil
+ "Snakefile"
+ 'append)
+ (snakemake-check-target "aa"))
+ :type 'snakemake-error)
;; Write-protected targets should be recognized as valid targets
;; despite Snakemake throwing an error.
(should