[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Fix `org-babel-detangle' handling of false positives
From: |
Kyle Meyer |
Subject: |
Re: [PATCH] Fix `org-babel-detangle' handling of false positives |
Date: |
Sun, 24 May 2020 20:19:10 +0000 |
Kevin Foley writes:
> Kyle Meyer <address@hidden> writes:
>
>> Kevin, could you look into updating the test to avoid changing the repo
>> state?
>
> Sorry about that. Do you have any suggestions on how to avoid changing
> the state or any examples of similar tests?
>
> I tried the following to replace the file with it's original contents
> but it doesn't seem to be working as I intend. I also worry it's a
> convoluted approach and there may be a simpler way.
Thanks for taking a look. The dirty working tree state happens when
running all the ob-tangle tests but not when running just the test you
added [*]. That makes me think the core issue is that the change from
your test stays around to be save by another test. So I suspect you can
avoid the dirty state by just wrapping the test in unwind-protect,
making sure to kill the Org buffer before detangle-false-positive exits.
[*] Specifically, running
make BTEST_RE='ob-tangle' test-dirty
versus
make BTEST_RE='detangle' test-dirty