Repository navigation
test: add functional tests, using the Nvim framework #3369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
alex-courtis
wants to merge
230
commits into
master
Choose a base branch
from
test-neovim-functionaltest
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
230 commits
Select commit
Hold shift + click to select a range
2c80390
test: neovim functional test integration and example test
alex-courtis 11e906f
test: add luals library for functionaltest framework
alex-courtis 4a7a641
test: add NvimTree* hl group handling to functionaltest
alex-courtis 7f91260
test: add luals library for functionaltest framework
alex-courtis 44f4b89
test: create unique NvimTree HL group definitions
alex-courtis 21ec0ec
test: create unique NvimTree HL group definitions
alex-courtis 64a515b
test: refactor functional test lifecycle, add another test
alex-courtis 58b57d7
test: simplify package loading
alex-courtis 9f22d21
test: add text-only functional test
alex-courtis a84ceb8
test: Screen 80 x 25 for more deterministic window sizes
alex-courtis c2f4baa
test: Screen 80 x 25 for more deterministic window sizes
alex-courtis 41134e6
test: somewhat idempotent nvt_hl_attr_ids called in before_each
alex-courtis 13bc738
test: add an interactive node open test
alex-courtis bc5c3c9
test: Screen 80 x 24 for more deterministic window sizes
alex-courtis 3c3eb3d
test: purge state clears cursor positions
alex-courtis cd4b14b
test: functionaltest.sh driver allows test selection
alex-courtis b1293e9
test: func tests use fixed contents data directories
alex-courtis 78d9537
test: add functional test live for creating test data
alex-courtis c7b7445
test: add live test capture functionality
alex-courtis aa5d30c
test: add live test capture functionality
alex-courtis 75f59e7
test: add live test capture functionality
alex-courtis 579baee
test: add live test capture functionality
alex-courtis f21f295
test: add live test capture functionality
alex-courtis 1b2a406
test: add root dir to tests
alex-courtis 0f76d14
test: document highlight group testing
alex-courtis ead01cf
test: add fs/create/dir
alex-courtis 113151d
test: clearer func temp directories
alex-courtis aa0222d
test: live_dump no longer global
alex-courtis 105b4b6
test: optionally collapse screen dumps
alex-courtis 4857b93
test: add test/ to lint and style
alex-courtis 352ed56
test: extract common scripts/check-nvim-src.sh
alex-courtis a38b6ba
test: add functionaltest ci job
alex-courtis e5bf2eb
test: ensure no empty directories in func test data
alex-courtis 65e08c5
test: run functest against nightly
alex-courtis 44ddb16
test: stable and nightly test compatibility
alex-courtis 7ee72ca
test: luals-check for functests
alex-courtis 55c2c3f
test: luals-check uses neovim source runtime
alex-courtis 12184ac
test: add luals for functest
alex-courtis a0c3850
test: stable and nightly test compatibility
alex-courtis 7c6d4cd
test: func tests are responsible for setting up and tearing down data
alex-courtis 602259b
test: link test and lua separately under nvim src
alex-courtis c003d1b
test: link test and lua separately under nvim src
alex-courtis 25bf96b
test: extract testutil.lua
alex-courtis cfb7dc2
test: extract fixtures.lua
alex-courtis abc19d4
test: extract fixtures.lua
alex-courtis d471aef
test: shell script is responsible for creating test directory
alex-courtis 8cb910f
test: shell script is responsible for creating test directory
alex-courtis 06e18e5
test: shell script is responsible for creating test directory
alex-courtis d268fb0
test: complete functionaltest.sh script
alex-courtis 1a5d7d2
test: complete functionaltest.sh script
alex-courtis 076021d
test: complete functionaltest.sh script
alex-courtis 57c4e0a
test: extract utils
alex-courtis 00c6cdc
test: more dir tests
alex-courtis cdedf7c
test: extract fixtures, remove utils
alex-courtis 78b87b1
test: more dir create tests, add file create tests
alex-courtis c31a08d
test: add event tests, implement for dirs
alex-courtis bd6018c
test: file event tests
alex-courtis dc3f272
test: illegal location create tests
alex-courtis 82da158
test: lint/style
alex-courtis fe00083
test: lint/style
alex-courtis 2d9f736
test: always teardown on functest failures to prevent luals picking u…
alex-courtis fde6460
test: run all requested functests, exiting with number of failrues
alex-courtis 761053a
test: inject test failures to test CI
alex-courtis 1e4bf43
Revert "test: inject test failures to test CI"
alex-courtis 03f77fe
test: include nvim-tree source in test plumbing
alex-courtis d5f8bf6
test: use appearance source to simplify highlight groups
alex-courtis 4021c14
test: revert commented test
alex-courtis 4d69d76
test: add nvim-tree source to test lpath, remove links
alex-courtis 396538a
test: func test runs from a single link under nvim src
alex-courtis a3533f9
test: func test package is the nvim-tree source link itself
alex-courtis 8e3c679
test: func test package is the nvim-tree source link itself
alex-courtis 880d674
test: proper namespace for nvt tests
alex-courtis ccf2971
test: proper namespace for nvt tests
alex-courtis 35fd853
test: add events_clear
alex-courtis 01592d6
test: more fs.create.dir tests
alex-courtis f8d713a
test: functionaltest.sh -l operates on any file or dir, finding data …
alex-courtis 4d31949
test: more fs.create.dir tests
alex-courtis b71fb45
doc: fix incorrect register doc for actions.use_system_clipboard
alex-courtis 718411d
test: add func fs.copy.node
alex-courtis 6bfc8a2
test: add func fs.copy.node
alex-courtis a770230
doc: fix incorrect register doc for actions.use_system_clipboard
alex-courtis 54e96ca
test: add func fs.copy.node
alex-courtis a7d8f96
test: add func fs.copy.node
alex-courtis 02034b2
test: add func fs.copy.node
alex-courtis a96394a
test: add screen width/height params
alex-courtis 86a0bce
test: add dummy clipboard fixture
alex-courtis f2a856d
test: add dummy clipboard fixture
alex-courtis c2db785
test: remove poc test
alex-courtis a4d4fff
test: don't use ext_linegrid when expecting HL groups for performance…
alex-courtis 508d285
test: remove poc test
alex-courtis 771e037
test: functest highlight groups are setup by main, not test, to avoid…
alex-courtis 1dd4935
test: functest highlight groups are setup by main, not test, to avoid…
alex-courtis a9ba7b1
test: functest highlight groups are setup by main, not test, to avoid…
alex-courtis 003d2f3
test: functest highlight groups are setup by main, not test, to avoid…
alex-courtis 6dfd8b6
test: create_sessions now calls setup and adds attr_ids
alex-courtis 4240706
test: organise copy structure nicely
alex-courtis ad340fa
test: organise fs.create structure nicely
alex-courtis 0806b7a
test: add fs/cut
alex-courtis f0d1695
test: add fs cut override copy
alex-courtis 8d84061
test: add fs copy override cut
alex-courtis 9f060f6
test: add fs print_clipboard
alex-courtis 8254982
test: add fs print_clipboard
alex-courtis 7f5c040
test: normalise names, use functional area as describe
alex-courtis c55ba1a
test: add fs.paste, wip
alex-courtis 6119b00
test: fs.paste, wip
alex-courtis 218c462
test: fs.paste cut tests buffer moved
alex-courtis e56a7f6
test: fs.paste API tests
alex-courtis e18aad9
test: remove TODO from BUGs
alex-courtis 44d2c0a
test: cut_spec uses internal API pending resolution of #3362
alex-courtis 74e0d2a
test: paste multiple copied
alex-courtis cd44a1d
test: copied_spec uses synchronous tree calls
alex-courtis 9810413
Revert "test: copied_spec uses synchronous tree calls"
alex-courtis 7feb787
test: use poke_eventloop to snc fs/paste tests, needs a better solution
alex-courtis 35009d3
test: add utils with feed_sync, needs migration for all tests
alex-courtis f757896
test: use feed_sync for all functests
alex-courtis aab5a5c
test: fs.create prompt timing fixes
alex-courtis 4fb7169
test: namespace functionaltest methods so that 0.12 global compatibil…
alex-courtis e94541a
test: namespace functionaltest methods so that 0.12 global compatibil…
alex-courtis ec79396
test: add missing API test variants
alex-courtis 6b65e2d
Revert "test: namespace functionaltest methods so that 0.12 global co…
alex-courtis e2305b9
Revert "test: namespace functionaltest methods so that 0.12 global co…
alex-courtis d97b629
test: add multiple paste tests
alex-courtis ebfee39
test: add multiple paste tests
alex-courtis 5606461
test: add fs.clear_clipboard tests
alex-courtis 886b94e
test: formatting
alex-courtis 80ef3c5
test: add fs.move tests
alex-courtis 198c52e
test: formatting
alex-courtis e2c2946
test: add fs.trash tests, wip
alex-courtis 16bb1e2
test: add buf_exists asserts, fs.trash tests, wip
alex-courtis 2d5c4a1
test: fs.trash tests, wip
alex-courtis 4a6309b
test: fs.trash tests, wip
alex-courtis 96635f1
test: fs.trash tests, wip
alex-courtis 7fb946e
test: tidy any unnecessary ext_cmdline
alex-courtis 02833a4
test: fs.trash tests, wip
alex-courtis ee85b0a
Revert "test: fs.trash tests, wip"
alex-courtis c123e2e
test: fs.trash tests, wip
alex-courtis 20c30cd
test: notes on func test ext_cmdline and ext_messages
alex-courtis 1ab18cd
test: print/clear clipboard use ext_messages
alex-courtis 0be9654
test: add missing file create message assertions, add functest global…
alex-courtis ad4ec86
test: namespace functionaltest methods so that 0.12 global compatibil…
alex-courtis 72a2a6c
test: notes on test mechanisms
alex-courtis 4f6f65c
test: notes on test assertions
alex-courtis c99daea
test: notes on test timeouts
alex-courtis 531f8a8
test: notes on test timeouts
alex-courtis 29b627b
test: experiment, disable feed_sync poke to see CI test output
alex-courtis 87052d5
Revert "test: experiment, disable feed_sync poke to see CI test output"
alex-courtis d093caf
test: replace create_test_cwd.sh with lua
alex-courtis 38102d7
test: replace create_test_cwd.sh with lua
alex-courtis 3a6e73f
test: replace create_test_cwd.sh with lua
alex-courtis eaf6847
test: replace create_test_cwd.sh with lua
alex-courtis d98fb7d
test: replace create_test_cwd.sh with lua
alex-courtis d8f67b2
test: each functest passes its own data dir
alex-courtis 76b159f
test: copy data directory from source, enable live, allow dirs other …
alex-courtis 964261b
test: execute all test in one call to make functionaltest
alex-courtis 5c8527e
Revert "test: purge state clears cursor positions"
alex-courtis d9b3fea
test: simplify func test script and document
alex-courtis e261f49
test: add events_received_unordered assert
alex-courtis f034ae6
test: use relative paths for func test, use nvim version under test f…
alex-courtis 2f5e7bf
test: experiment running fs.paste test first for performance improvement
alex-courtis 03cd8e8
test: undo successful? experiment running fs.paste test first for per…
alex-courtis a24890f
test: screen:expect uses attr_ids = {} when testing cmdline for perfo…
alex-courtis 0a09348
test: screen:expect uses attr_ids = {} when testing messages for perf…
alex-courtis 4b9e26d
test: screen:expect uses attr_ids = {} when testing messages for perf…
alex-courtis fa9cb1f
test: temporarily remove attr_ids={} for performance testing
alex-courtis 00500e6
test: disable all screen_opts except when necessary, for great perfor…
alex-courtis eefca34
test: try using set_default_attr_ids vs add_extra_attr_ids performance
alex-courtis 24ac0d2
test: try caching attr_ids for performance
alex-courtis 51dde6e
Revert "test: try caching attr_ids for performance"
alex-courtis 8bdf747
Revert "test: try using set_default_attr_ids vs add_extra_attr_ids pe…
alex-courtis f774ac3
test: tidy todo
alex-courtis f1dafdb
test: basic fs.remove
alex-courtis 5b1db39
test: add fs.remove tests
alex-courtis 9cd820e
test: add fs.remove tests
alex-courtis b817906
test: add fs.remove tests
alex-courtis c8936a0
test: add fs.remove tests
alex-courtis 7bda853
test: add fs.remove tests
alex-courtis 1dffe1c
test: add fs.remove tests
alex-courtis 9974e80
test: add fs.remove tests
alex-courtis a8060fd
test: add fs.remove tests
alex-courtis 2b8ea09
test: add fs.remove tests
alex-courtis 4384b4b
test: add fs.remove tests
alex-courtis f407eb3
test: ensure testnvim is always called
alex-courtis 3efc90d
test: organise func test structure
alex-courtis 5f102b0
test: organise func test structure
alex-courtis 20eb462
test: fs.copy.absolute_path
alex-courtis f542fb4
test: fs.copy.basename
alex-courtis d66e67c
test: fs.copy.filename
alex-courtis aa14bcf
test: fs.copy.relative_path
alex-courtis 674d45b
test: fs.rename
alex-courtis 1b959b8
test: fs.rename enabled following bug fix
alex-courtis 03cda51
test: fs.rename
alex-courtis 91e9de4
test: node.open.horizontal
alex-courtis 4afac69
test: node.open.vertical
alex-courtis 1d5522e
test: fix create detection of existing files when creating directories
alex-courtis edb6b2d
test: output path on create failure
alex-courtis bccfc8a
test: fix create detection of existing files when creating directories
alex-courtis ad67afc
test: fs.create file fails on invalid path, pending upstream fix
alex-courtis 25b93cc
test: fs.create file fails on invalid path, pending upstream fix
alex-courtis 5c19ab5
test: fs.create FolderCreated events are correct, pending upstream fix
alex-courtis 36276e3
test: fs.create FolderCreated events are correct
alex-courtis ecbabc2
test: clipboard copy/cut messages consistent, requieres upstream merg…
alex-courtis 8db397b
fix(clipboard): consistent 'copied to' and 'cut to' messages
alex-courtis 03d5b35
test: tidy todos replacing with issue refs
alex-courtis 57946d7
test: fs.paste api test OK, pending upstream fix
alex-courtis 3b890ab
test: fs.paste api test OK
alex-courtis 91905e3
test: Decorator and tree.get_nodes tests
alex-courtis 2398806
test: always compress dump lines, simplify live init
alex-courtis 6468a77
test: always compress dump lines, simplify live init
alex-courtis d6073de
test: readme
alex-courtis 178f776
test: pending #3392
alex-courtis e850c2c
test: replace NVT_FUNCTEST_CONTEXT with builtin NVIM_TEST
alex-courtis 85157bf
add log ms, add log.stack, remove unused log.node
alex-courtis 81f2e86
add params to log.stack
alex-courtis f6f22ae
test: logs to /tmp/nvt_test.log
alex-courtis d3d7b16
test: logs to /tmp/nvt_test.log
alex-courtis 9c2d87b
test: log file has test id, use _G globals in fixtures
alex-courtis 1ed2b62
test: readme
alex-courtis ff25566
test: readme
alex-courtis 16f6e09
test: readme
alex-courtis 13cb8bd
test: move all functional testing to makefile and main ci
alex-courtis 3bf0f18
test: move all functional testing to makefile and main ci
alex-courtis 4e58c3c
test: move all functional testing to makefile and main ci
alex-courtis d75c065
Revert "test: move all functional testing to makefile and main ci"
alex-courtis a5bb195
Revert "test: move all functional testing to makefile and main ci"
alex-courtis ebd38b9
Revert "test: move all functional testing to makefile and main ci"
alex-courtis 1ac1f13
test: formatting
alex-courtis fce2e9c
test: move all functional testing to makefile and main ci
alex-courtis 6b1d8bc
test: move all functional testing checks to makefile and main ci
alex-courtis ee516bf
test: move all functional testing checks to makefile and main ci
alex-courtis 350376c
back out unnecessary changes
alex-courtis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1715,7 +1715,7 @@ Config: actions *nvim-tree-config-actions* | |
| • {use_system_clipboard}? (`boolean`, default: `true`) Use the system | ||
| clipboard for copy/paste. Copied text will be | ||
| stored in registers `+` (system), otherwise, | ||
| it will be stored in `1` and `"` | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. found during testing |
||
| it will be stored in `1` | ||
|
|
||
| *nvim_tree.config.actions.change_dir* | ||
| vim |current-directory| behaviour | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. extracted common code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| #!/usr/bin/env sh | ||
|
|
||
| # common script to check the availability of neovim source | ||
| # - NOP if $DIR_NVIM_SRC is defined | ||
| # - sets $DIR_NVIM_SRC to /tmp/src/neovim-stable if present | ||
| # - otherwise prompts with instructions | ||
| # script must be sourced to receive the exported $DIR_NVIM_SRC | ||
|
|
||
| DIR_NVIM_SRC_DEF="/tmp/src/neovim-stable" | ||
|
|
||
| if [ -z "${DIR_NVIM_SRC}" ] && [ -d "${DIR_NVIM_SRC_DEF}" ]; then | ||
| export DIR_NVIM_SRC="${DIR_NVIM_SRC_DEF}" | ||
| fi | ||
|
|
||
| if [ ! -d "${DIR_NVIM_SRC}" ]; then | ||
| cat << EOM | ||
|
|
||
| Nvim stable source is required to run ${0} | ||
|
|
||
| Unavailable: ${DIR_NVIM_SRC_DEF} or \$DIR_NVIM_SRC=${DIR_NVIM_SRC} | ||
|
|
||
| Please: | ||
| mkdir -p ${DIR_NVIM_SRC_DEF} | ||
| curl -L 'https://github.com/neovim/neovim/archive/refs/tags/stable.tar.gz' | tar zx --directory $(dirname "${DIR_NVIM_SRC_DEF}") | ||
| or use your own e.g. | ||
| export DIR_NVIM_SRC="\${HOME}/src/neovim" | ||
|
|
||
| EOM | ||
| exit 1 | ||
| fi |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a problem. If you don't have Nvim source available, luals cannot parse test code.