diff options
author | Kyle Meyer <kyle@kyleam.com> | 2016-09-05 23:49:22 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2016-09-13 23:31:27 -0400 |
commit | 2bceb7f266f71cd85f9b328de02797eb457da17c (patch) | |
tree | 3ccd47f8ff8a35f16f297e5243e03fe696d899ee /snakemake-test.el | |
parent | a28ff63f4c3a6492dea38c028e47bb6431ab4c84 (diff) | |
download | snakemake-mode-2bceb7f266f71cd85f9b328de02797eb457da17c.tar.gz |
snakemake-check-target: Recognize protected items
With 33a7c90 (snakemake-check-target: Adjust for upstream output,
2016-09-01), write-protected targets were no longer considered valid
targets.
Diffstat (limited to 'snakemake-test.el')
-rw-r--r-- | snakemake-test.el | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/snakemake-test.el b/snakemake-test.el index 25713af..213d13c 100644 --- a/snakemake-test.el +++ b/snakemake-test.el @@ -812,7 +812,15 @@ two words" (snakemake-check-target "aa.out"))) (should-not (snakemake-with-temp-dir - (snakemake-check-target "aa.out.not-target")))) + (snakemake-check-target "aa.out.not-target"))) + ;; Write-protected targets should be recognized as valid targets + ;; despite Snakemake throwing an error. + (should + (snakemake-with-temp-dir + (with-temp-file "bb.out" (insert "")) + (set-file-modes "bb.out" (file-modes-symbolic-to-number "u=r")) + (with-temp-file "aa.out" (insert "")) + (snakemake-check-target "bb.out")))) (ert-deftest snakemake-test-org-link-file-targets () (should (equal '("/path/to/fname") |