diff options
author | Kyle Meyer <kyle@kyleam.com> | 2016-03-04 00:56:29 -0500 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2016-03-04 00:56:29 -0500 |
commit | 584020c40a4e35baeac0f6a5a3f8267ff43cd376 (patch) | |
tree | 44d0aafbdb9b56f1e91ab84c84c54d30771fd069 /snakemake-test.el | |
parent | e9f6240f36e8123d8eabf7785f64f50e4e0ed50e (diff) | |
download | snakemake-mode-584020c40a4e35baeac0f6a5a3f8267ff43cd376.tar.gz |
popup: Consider file targets in region
Diffstat (limited to 'snakemake-test.el')
-rw-r--r-- | snakemake-test.el | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/snakemake-test.el b/snakemake-test.el index 8ebb3ff..6374b0d 100644 --- a/snakemake-test.el +++ b/snakemake-test.el @@ -693,6 +693,26 @@ rule abc: (forward-line -1) (snakemake-org-link-file-targets))))) +(ert-deftest snakemake-test-region-file-targets () + (let ((files '("/path/to/fname" "fname2" "CAP"))) + (should (equal (mapcar #'expand-file-name files) + (with-temp-buffer + (insert (mapconcat #'identity files "\n")) + (snakemake-region-file-targets + (point-min) (point-max))))) + (should (equal (mapcar #'expand-file-name files) + (with-temp-buffer + (insert (mapconcat #'identity files ",")) + (snakemake-region-file-targets + (point-min) (point-max))))) + (should (equal (mapcar #'expand-file-name files) + (with-temp-buffer + (insert (car files)) + (insert ?\n) + (insert (mapconcat #'identity (cdr files) " ")) + (snakemake-region-file-targets + (point-min) (point-max))))))) + (ert-deftest snakemake-test-file-targets-at-point () (should (equal '("aa.out") |