diff options
author | Kyle Meyer <kyle@kyleam.com> | 2016-10-31 19:36:08 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2016-10-31 19:36:08 -0400 |
commit | 02bdf3b96b60aba7d9502411e4b6828674db59db (patch) | |
tree | 7fdc37c193e7e5c3ad9642ea94594c91e08d0409 | |
parent | 26b648dd55769909da4d3f598e231e52fd514eeb (diff) | |
download | snakemake-mode-02bdf3b96b60aba7d9502411e4b6828674db59db.tar.gz |
tests: Use write-region instead of with-temp-file
-rw-r--r-- | snakemake-test.el | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/snakemake-test.el b/snakemake-test.el index 213d13c..8442b82 100644 --- a/snakemake-test.el +++ b/snakemake-test.el @@ -60,8 +60,7 @@ Also, mute messages." (unwind-protect (let ((default-directory snakemake-test-dir)) (mkdir "subdir") - (with-temp-file "Snakefile" - (insert "\ + (write-region "\ rule aa: output: \"aa.out\" @@ -85,7 +84,9 @@ rule dd_subdir: rule: input: \"anon.in\" output: \"anon.out\" - shell: \"cat {input} > {output}\"")) + shell: \"cat {input} > {output}\"" + nil + "Snakefile") ,@body) (delete-directory snakemake-test-dir t))))) (def-edebug-spec snakemake-with-temp-dir (body)) @@ -817,9 +818,9 @@ two words" ;; despite Snakemake throwing an error. (should (snakemake-with-temp-dir - (with-temp-file "bb.out" (insert "")) + (write-region "" nil "bb.out") (set-file-modes "bb.out" (file-modes-symbolic-to-number "u=r")) - (with-temp-file "aa.out" (insert "")) + (write-region "" nil "aa.out") (snakemake-check-target "bb.out")))) (ert-deftest snakemake-test-org-link-file-targets () |