From 6b39982b66f8b37e9999859ddd4302e93c5afbd3 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Thu, 1 Sep 2016 21:22:27 -0400 Subject: 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. --- snakemake-test.el | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'snakemake-test.el') 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") -- cgit v1.2.3