"Christopher M. Miles" <numbch...@gmail.com> writes: >> However, upon testing your patch, tests are still failing on my side. >> Can you please investigate? > > But If I use [M-x ert] to run the test > "test-org-fold/org-fold-display-inline-images" is passed. > Here is the steps: > 1. [M-x load-file RET /path/to/org-mode/testing/org-test.el RET] > 2. [C-M-x] to evaluate the target test > 3. [M-x ert RET test-org-fold/org-fold-display-inline-images RET] to run this > test > > I attached the uploaded screencast video link to prove it passed. > > https://share.cleanshot.com/tvUUoQ > > I tried many different other API functions to cycle or fold/unfold, but none > of them works under command "make test" or command > "make BTEST_RE="test-org-fold/org-fold-display-inline-images" test-dirty". > > I have nothing brain to think for this test now. Really can't figure out > why this image is not displayed as overlay. Can you help me to fix this test?
The problem is with batch mode. `create-image' will return nil in batch mode and hence no overlays are ever created even though `org-display-inline-images' does get called. I think that the best we can do in this situation is mocking `create-image' in batch mode to return non-nil using `cl-letf'. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>