Commit Graph

60 Commits

Author SHA1 Message Date
Piotr Rogoża
89d1661d23 Replaced reload section with proper function.
Added completion for reload.
Fixed order in completion
Added unit tests for completion
The variable BASH_IT_AUTOMATIC_RELOAD_AFTER_CONFIG_CHANGE has to be unset.
2018-04-18 21:51:20 +02:00
Nils Winkler
e2f00b1eb6 Checking for link target 2017-10-14 18:02:04 +02:00
Nils Winkler
80e510d65b Added assert_link_exist function and use that 2017-10-14 18:02:04 +02:00
Nils Winkler
2691a5b138 Moved to bats-assert for assert functions 2017-10-14 18:00:43 +02:00
Nils Winkler
8319545b0a Switched to Bats-core as a submodule
Can't use the official v0.4.0 release, since our tests rely on a change
that was made after the release of v0.4.0.

This code currently uses an unversioned commit of the bats-core repo, we
will switch to a supported version once it has been released, e.g.
v0.4.1.
2017-10-14 18:00:43 +02:00
Nils Winkler
145ec5dfaa Copied command_exists function to the helpers lib so that there is no hidden dependency on the base plugin
The original command_exists function will stay in the base plugin, but will no longer be used by other plugins or themes.
2017-09-17 21:05:59 +02:00
Nils Winkler
f57bd1e131 Fixed issues with migrating components with the same name
dirs.plugin.bash was recognized while looking for dirs.completion.bash in the global enabled directory.
2017-09-17 21:05:59 +02:00
Nils Winkler
aa9a63a10e Added message after migrating about possible fixes.
See #985 for background.
2017-09-17 21:05:59 +02:00
Nils Winkler
653437e2e1 Some more tests for disable all 2017-09-17 21:05:58 +02:00
Nils Winkler
729f21c106 Reading bash-it help lists aliases from global enabled directory 2017-09-17 21:05:58 +02:00
Nils Winkler
c26476f56e Fixed bash-it help aliases for todo.txt-cli 2017-09-17 21:05:58 +02:00
Nils Winkler
e0554cb512 Test cases and fix for bash-it help aliases foo 2017-09-17 21:05:58 +02:00
Nils Winkler
4cda9c0a43 Started work on bash-it help aliases 2017-09-17 21:05:58 +02:00
Nils Winkler
5ff873e058 Fixed "bash-it help aliases" cases, more to come... 2017-09-17 21:05:58 +02:00
Nils Winkler
3e9c5655b1 Added xargs fix to some more wc -l invocations
Calling `xargs` removes any leading whitespace, which is introduced by
the macOS version of `wc`. See
https://stackoverflow.com/a/12973694/1228454 for more info.
2017-09-17 21:05:58 +02:00
Nils Winkler
d798bb8f06 Change test prefixes to match file name 2017-09-17 21:05:58 +02:00
Nils Winkler
2a16a5cd68 Change install setup to use rsync instead of cp 2017-09-17 21:05:57 +02:00
Nils Winkler
9f3ef22538 Describe function supports new directory structure 2017-09-17 21:05:57 +02:00
Nils Winkler
9080f0e869 Add more tests for migration scenario 2017-09-17 21:05:57 +02:00
Nils Winkler
2b778ccbba Fix disable/migrate test case 2017-09-17 21:05:57 +02:00
Nils Winkler
fd686cc2ae Fix one more path 2017-09-17 21:05:57 +02:00
Nils Winkler
f72691fe85 Fix some more migration test cases 2017-09-17 21:05:57 +02:00
Nils Winkler
2ac08cae0f Fix one migration case 2017-09-17 21:05:57 +02:00
Nils Winkler
6fa235a825 Start work on migration to global directory 2017-09-17 21:05:57 +02:00
Nils Winkler
e705e6c60f Check for link target 2017-09-17 21:05:57 +02:00
Nils Winkler
5f3627b9b7 Change the enable/disable functions to use the global directory 2017-09-17 21:05:57 +02:00
Nils Winkler
b106d275a7 Move enable/disable functionality to global enabled directory 2017-09-17 21:05:57 +02:00
Nils Winkler
2581abdf54 Fix some issues that showed the todo.txt-cli aliases in the wrong way 2017-06-24 17:31:31 +02:00
Nils Winkler
94e68b96b5 Fix migration of todo.txt-cli component 2017-06-24 17:31:31 +02:00
Nils Winkler
fc4ce80329 Add tests for enabling multiple plugins at the same time 2017-06-24 17:31:31 +02:00
Nils Winkler
1068e7916b Add tests for enabling aliases and completions 2017-06-24 17:31:31 +02:00
Nils Winkler
87270c2962 Copy all of Bash-it during the helper tests 2017-06-24 17:31:31 +02:00
Nils Winkler
951fe918c0 Automatically running migration command when enabling/disabling components 2017-06-24 17:31:30 +02:00
Nils Winkler
1e624113a7 Refactored search test cases to use the assert functions 2017-06-24 17:31:30 +02:00
Nils Winkler
2607bb815a Avoid polluting the user's Bash-it installation
All of the install steps are done in a test directory
2017-06-24 17:31:30 +02:00
Nils Winkler
6ff4071646 Fixed test execution that only checked for plugins starting with 2 2017-06-24 17:31:30 +02:00
Nils Winkler
dc7173b7ef Using xargs to remove leading spaces
Found here: http://stackoverflow.com/a/12973694/1228454
2017-06-24 17:31:30 +02:00
Nils Winkler
bf632e19fc Refactored tests to use helper assert functions 2017-06-24 17:31:30 +02:00
Nils Winkler
e112eb43a0 Using local setup/teardown functions 2017-06-24 17:31:30 +02:00
Nils Winkler
402179d87d Added prefix to bash-it test cases 2017-06-24 17:31:30 +02:00
Nils Winkler
c2446c2692 Added new "bash-it migrate" command that migrates components from the old syntax to the new one that uses the load priority 2017-06-24 17:31:30 +02:00
Nils Winkler
b1481038d8 Improved check for components that are already enabled 2017-06-24 17:31:30 +02:00
Nils Winkler
4e16dfde56 Fixed basename usage for enable all 2017-06-24 17:31:30 +02:00
Nils Winkler
d34b820cec Added some code to figure out the directory 2017-06-24 17:31:30 +02:00
Nils Winkler
36a87a5f4e Added some debug output 2017-06-24 17:31:30 +02:00
Nils Winkler
11330596b1 Simplified describe tests 2017-06-24 17:31:30 +02:00
Nils Winkler
65c6e6a1a6 Disable all command and test case 2017-06-24 17:31:30 +02:00
Nils Winkler
098186754c Added test suite for enable/disable 2017-06-24 17:31:30 +02:00
Nils Winkler
58674d5a89 Updated unit tests 2016-05-23 08:45:46 +02:00
Nils Winkler
2618d2141f Fixed unit tests 2016-05-19 09:20:39 +02:00