aboutsummaryrefslogtreecommitdiff
path: root/snakemake-test.el
diff options
context:
space:
mode:
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