Commit Graph

23 Commits (bf2034d13d23e51a16a874264a24013585d3ec4f)

Author SHA1 Message Date
John D Pell f0dfe1a67f test/theme: adopt newly revamped `setup()` 2022-03-03 22:43:17 -08:00
John D Pell 2a8d8ba540 lib/colors: rename `theme/colors` 2022-01-28 13:08:50 -08:00
John D Pell 21a2198a12 test/theme: make fewer assumptions
Literally copying a line from the source to be tested is perhaps not the best way to test that code. 😉

That said, we do want to verify that the function was actually loaded.

TODO: actually test the function.
2022-01-08 08:29:13 -08:00
John D Pell 6030767b4e test/theme: load colors 2022-01-08 08:29:13 -08:00
John D Pell da6b27166f tests: new file `test_helper_libs.bash`
For testing non-core files, just `load ../test_helper_libs` after `load ../test_helper` instead of trying to guess which libs must be loaded, in which order, for testing to succeed.

`_command_exists` spews log messages, so our test log is littered with `_log_debug not found`. This fixes that too.
2022-01-08 08:29:13 -08:00
John D Pell 9dcbeec7ad tests: test_helper already loads `composure.sh`
...and `cite()`s metadata
2022-01-08 08:29:13 -08:00
John D Pell 476fcb4325 lib/theme: new `_bash_it_appearance_scm_init()`
Wrap init code in a function and call the function immediately. Several plugins do this, and it allows us to more easily implement a hooks-based system in the future.

Alsö, avoid external binary `which`. Use built-in `type -P` instead. Uppercase `-P` forces a path search to avoid hashed matches and functions/aliases and whatnot.
2021-09-11 10:22:17 -07:00
buhl 49d7d2e8c4 Getting Bash-it to use the vendored composure
Fixed tests
Fixed install.sh and bash_it.sh
Added gitattributes to the vendor folder
Changed documentation
2021-02-02 16:34:04 +01:00
Noah Gorny 3069af37e0 tests: Include lib log 2020-07-02 21:11:40 +03:00
Noah Gorny e6ebcda608 log: Fix logging to comply with the tests 2020-07-02 21:11:40 +03:00
Nils Winkler 3cffa35092
Fixed some more comments 2020-06-16 16:59:29 +02:00
Nils Winkler c02638e946
Fixed comment 2020-06-16 16:58:29 +02:00
Nils Winkler 5aa525caae
Refactored setup/teardown 2020-06-16 09:25:07 +02:00
Nils Winkler f933a86ff0
Added tests for additional SVN scenarios 2020-06-16 09:24:24 +02:00
Nils Winkler 47f6682292
Added test case for base theme SVN functionality
Unit tests for #1612, #1613.
2020-06-15 17:09:44 +02:00
Nils Winkler 721412aa4c
Merge pull request #1395 from zhao-li/toggle-able_commit_count
Toggle able commit count
2019-09-02 08:45:19 +02:00
Zhao Li 83be21ebb3 update tests to set flag appropriately 2019-07-08 13:33:14 -10:00
Zhao Li 49d8c8750a fix broken tests 2019-07-08 13:28:32 -10:00
Dan Wendorf c5f2c408e7 SCM_CURRENT_USER supports accented characters
`tr 'A-Z' 'a-z'` will only convert non-accented characters. Switching to
`[:upper:]` and `[:lower:]` adds support for accents.
See https://github.com/koalaman/shellcheck/wiki/SC2018

Additionally, printf's character splitting does not support accented
characters, so output isn't as expected. Using bash's variable expansion
syntax instead will correctly get the full accented character.
2017-12-18 09:05:33 -08:00
Dan Wendorf 150e82b221 Refactor git functionality into githelpers.theme.bash
- Add unit tests around git functionality
2017-12-18 09:05:33 -08:00
Nils Winkler 2691a5b138 Moved to bats-assert for assert functions 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 b55c0251ed Add tests for base theme's battery functions 2017-06-24 17:31:31 +02:00