nvim-orgmode / orgmode

Orgmode clone written in Lua for Neovim 0.9+.

Home Page:https://nvim-orgmode.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tests fail for full reindents with indent mode on non-nightly (`0.10.0`) Neovim

PriceHiller opened this issue · comments

Describe the bug

On non-nightly versions of Neovim (<0.10.0) the tests for full reindent can intermittently fail.

These tests do not fail all the time, only occasionally -- this makes this a right headache to resolve. This problem was introduced by #629.

Steps to reproduce

Use a Neovim version in the 0.9.x range, ideally 0.9.0 as that exhibits the problem most consistently and then run (assuming a bash shell):

git clone https://github.com/nvim-orgmode/orgmode.git Orgmode \
 && cd Orgmode

TEST_RUN=1
while :; do
  printf "==== Current Test Run: %s ====\n" "${TEST_RUN}"
  if make test FILE=./tests/plenary/org/indent_spec.lua; then
    printf "\n\n++++ Finished Test Run: %s ++++\n\n" "${TEST_RUN}"
  else
    printf "\n\n==== Tests Failed on Run %s ====\n\n" "${TEST_RUN}"
    break
  fi
  ((TEST_RUN++))
done

Now wait for a failure (again use a Neovim version in range 0.9.x). It may take a while to happen.

Expected behavior

Tests consistently pass instead of only sometimes passing.

Emacs functionality

No response

Minimal init.lua

N/A. This is a testing issue.

Screenshots and recordings

orgmode-testing-bug

OS / Distro

Arch Linux -- Linux orion 6.6.8-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 21 Dec 2023 19:01:01 +0000 x86_64 GNU/Linux

Neovim version/commit

0.9.1, 0.9.2, 0.9.4

Additional context

See here for where this problem was discovered.

This does not seem to affect nightly (0.10.0) versions of Neovim -- I can't cause any test failures on nightly at the time of writing.

This seemingly only impacts the tests, not any actual usage. I cannot replicate by opening a orgmode file in Neovim 0.9.0 several times. Seems fine from the user perspective. Purely a testing issue.

@kristijanhusak Opening this so its tracked, I've spent the last hour or so battling this and haven't made any progress. I'm going to finish up the Virtual indent stuff and try to solve this again when I'm not losing my sanity.