Skip to content
This repository has been archived by the owner on Apr 24, 2020. It is now read-only.

Add tests #934

Merged
merged 56 commits into from
Aug 31, 2018
Merged

Add tests #934

merged 56 commits into from
Aug 31, 2018

Conversation

dritter
Copy link
Member

@dritter dritter commented Jul 27, 2018

This PR covers three topics:

Add tests

Obviously, this is the main purpose of this PR. The Tests are mainly extracted from #344.

Improve Test Structure

I improved the Tests stylistically and prepared them for the upcoming performance optimisations. This means two things:

  1. I made use of local variables as much as possible, instead of defining and unsetting variables all the time. This is more readable IMHO.
  2. Define the variables first, then load the Theme (in preparation for Discussion: Speed vs Flexibility #817 )

Test on many ZSH versions

The Tests are executed by Travis on ZSH 5.5.1, 5.5, 5.4.2, 5.4.1, 5.3.1, 5.3, 5.2, 5.1.1 both on Linux and MacOS.

Caveats

There are a few Changes in powerlevel9k.zsh-theme:

  • I changed some grep RegExes to runnable versions on Linux and MacOS (mainly changed grep -o "[0-9.]* to grep -o -E "[0-9.]+).
  • Custom Segments can now have a visual identifier
  • Fixed foreground color of vi_mode segment (changed from default to white)
  • Changed detect_virt segment to print nothing if nothing was detected.

This PR aims on master, but if there are too many changes in behaviour, we could change base to next..

dritter added 30 commits July 13, 2018 01:18
Additionally
- Add a fourth parameter to prompt_battery for better testability. This
  parameter is the root prefix, so we can use our own test batteries.
Change regular expressions to a more compatible format.
This was referenced Aug 5, 2018
@bhilburn bhilburn merged commit ba353ca into Powerlevel9k:master Aug 31, 2018
@bhilburn
Copy link
Member

Merged into master as part of #944, and will be part of the v0.6.6 release!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants