diff options
author | Kyle Meyer <kyle@kyleam.com> | 2016-05-11 21:01:41 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2016-05-11 21:07:30 -0400 |
commit | 2d6136fe2b44ec4f21d7fa4a20be1a43f103e308 (patch) | |
tree | bb3e2ae28f3e54f76fd912d6ff762201c871ec91 /snakemake-test.el | |
parent | 2ddaa5a5bf4d74b51f64720ea1be94bf06394c41 (diff) | |
download | snakemake-mode-2d6136fe2b44ec4f21d7fa4a20be1a43f103e308.tar.gz |
Define function for add-log-current-defun-function
Diffstat (limited to 'snakemake-test.el')
-rw-r--r-- | snakemake-test.el | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/snakemake-test.el b/snakemake-test.el index d725345..fc063c6 100644 --- a/snakemake-test.el +++ b/snakemake-test.el @@ -681,6 +681,34 @@ rule xyz: (snakemake-end-of-block) (buffer-substring (point-min) (point)))))) +(ert-deftest snakemake-test-block-or-defun-name () + (should + (string= "abc" + (snakemake-with-temp-text + " +rule abc: +<point> output: 'file' +" + (snakemake-block-or-defun-name)))) + (should + (string= "xyz" + (snakemake-with-temp-text + " +rule abc: + output: 'file' + +<point>def xyz(): + pass +" + (snakemake-block-or-defun-name)))) + (should-not + (snakemake-with-temp-text + " +rule abc: + output: 'file' +" + (snakemake-block-or-defun-name)))) + ;;; snakemake.el |