diff options
Diffstat (limited to 'test-snakemake-mode.el')
-rw-r--r-- | test-snakemake-mode.el | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/test-snakemake-mode.el b/test-snakemake-mode.el index a3afa7b..51a8a7e 100644 --- a/test-snakemake-mode.el +++ b/test-snakemake-mode.el @@ -120,6 +120,37 @@ rule abc: (snakemake-indent-line) (buffer-string)))) + ;; Below a naked rule field key + (should + (string= + " +rule abc: + output: + " + (snakemake-with-temp-text + " +rule abc: + output: +<point>" + (snakemake-indent-line) + (buffer-string)))) + + ;; Below a naked rule field key, repeated + (should + (string= + " +rule abc: + output: + " + (snakemake-with-temp-text + " +rule abc: + output: +<point>" + (snakemake-indent-line) + (snakemake-indent-line) + (buffer-string)))) + ;; Below a filled rule field key (should (string= @@ -247,6 +278,26 @@ subworkflow otherworkflow: snakefile: '../path/to/otherworkflow/Snakefile'" (should (snakemake-in-rule-or-subworkflow-block-p)))) +(ert-deftest test-snakemake-mode/below-naked-field-p () + "Test `snakemake-below-naked-field-p'." + (snakemake-with-temp-text + " +rule abc: + output: +<point>" + (should (snakemake-below-naked-field-p))) + (snakemake-with-temp-text + " +rule abc: + output: 'file' +<point>" + (should-not (snakemake-below-naked-field-p))) + (snakemake-with-temp-text + " +rule abc: + output: <point>" + (should-not (snakemake-below-naked-field-p)))) + (ert-deftest test-snakemake-mode/run-field-line-p () "Test `snakemake-run-field-line-p'." (snakemake-with-temp-text |