diff options
author | Kyle Meyer <kyle@kyleam.com> | 2016-05-11 01:37:25 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2016-05-11 01:39:04 -0400 |
commit | 97b008e65f0402388cfacd32aee3b4dd4fbaf2ff (patch) | |
tree | 6f39a0512ffa6f658e51a8c32a8fcf173df83e0a /snakemake-test.el | |
parent | c4c05088e98179ab1ff5e90155b297fd2be9a087 (diff) | |
download | snakemake-mode-97b008e65f0402388cfacd32aee3b4dd4fbaf2ff.tar.gz |
Add snakemake-block-bounds function
Diffstat (limited to 'snakemake-test.el')
-rw-r--r-- | snakemake-test.el | 70 |
1 files changed, 6 insertions, 64 deletions
diff --git a/snakemake-test.el b/snakemake-test.el index 034350c..d6f3d81 100644 --- a/snakemake-test.el +++ b/snakemake-test.el @@ -565,73 +565,15 @@ x = [1, (indent-region (point) (point-max)) (buffer-string))))) -;;;; Other +;;;; Info and navigation -(ert-deftest snakemake-test-in-rule-or-subworkflow-block-p () - ;; At top of block - (snakemake-with-temp-text - " -<point>rule abc: - output: 'file'" - (should (snakemake-in-rule-or-subworkflow-block-p))) - - ;; Body of block - (snakemake-with-temp-text - " -rule abc: - output: <point>'file'" - (should (snakemake-in-rule-or-subworkflow-block-p))) - - ;; First blank line after - (snakemake-with-temp-text - " -rule abc: - output: 'file' -<point>" - (should (snakemake-in-rule-or-subworkflow-block-p))) - - ;; Second blank line after - (snakemake-with-temp-text - " -rule abc: - output: 'file' - -<point>" - (should-not (snakemake-in-rule-or-subworkflow-block-p))) - - - ;; Blank line in docstring - (snakemake-with-temp-text - " -rule abc: - \"\"\"docstring header - - docstring line - \"\"\" - output: 'file'<point>" - (should (snakemake-in-rule-or-subworkflow-block-p))) - - ;; Before - (snakemake-with-temp-text - "<point> +(ert-deftest snakemake-test-block-bounds () + (should-not + (snakemake-with-temp-text + " rule abc: output: 'file'" - (should-not (snakemake-in-rule-or-subworkflow-block-p))) - - ;; At beginning of buffer - (snakemake-with-temp-text - "\ -rule abc: - output: 'file'<point>" - (should (snakemake-in-rule-or-subworkflow-block-p))) - - ;; Subworkflow - (snakemake-with-temp-text - " -subworkflow otherworkflow: -<point> workdir: '../path/to/otherworkflow' - snakefile: '../path/to/otherworkflow/Snakefile'" - (should (snakemake-in-rule-or-subworkflow-block-p)))) + (snakemake-block-bounds)))) ;;; snakemake.el |