aboutsummaryrefslogtreecommitdiff
path: root/snakemake-test.el
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2016-09-01 21:22:27 -0400
committerKyle Meyer <kyle@kyleam.com>2016-09-01 21:24:10 -0400
commit6b39982b66f8b37e9999859ddd4302e93c5afbd3 (patch)
tree0fee523ff613e93808888d396e3466c5a88a308f /snakemake-test.el
parent8886280685b63983be8101d98cf9dc6b203d4eac (diff)
downloadsnakemake-mode-6b39982b66f8b37e9999859ddd4302e93c5afbd3.tar.gz
Change approach to handling errors
The approach from 7b210fc (Ignore standard error stream when digesting output, 2016-09-01) does not work well because, depending on the snakemake subcommand, the text of interest may be in the stderr stream. Instead, use lines with spaces as a way to detect non-target lines.
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 f70b284..25713af 100644
--- a/snakemake-test.el
+++ b/snakemake-test.el
@@ -763,6 +763,29 @@ rule abc:
(let ((default-directory "subdir"))
(snakemake-snakefile-directory)))))))
+(ert-deftest snakemake-test-split-lines ()
+ (should
+ (equal '("abc" "123")
+ (snakemake--split-lines "\
+abc
+123
+two words")))
+ (should
+ (equal '("abc" "123")
+ (snakemake--split-lines "\
+abc
+
+123
+
+two words")))
+ (should
+ (equal '("abc")
+ (snakemake--split-lines "\
+abc
+123
+two words"
+ 'remove-num))))
+
(ert-deftest snakemake-test-rule-targets ()
(should
(equal '("aa" "bb" "dd_subdir")