Commit Graph

616 Commits

Author SHA1 Message Date
ZyX 4d35167b13 Avoid using overrides in $POWERLINE_COMMAND 2015-01-07 01:14:20 +03:00
ZyX 87ebe41f30 Make zsh tests use new environment variables 2015-01-07 01:09:53 +03:00
ZyX 917dfed842 Take overrides from environment variables
Ref #1201
2015-01-07 01:09:53 +03:00
ZyX 1451b4261f Rename `paths` IPython override to `config_paths`
Fixes #1126
2015-01-07 01:09:53 +03:00
ZyX de064558a1 Rename `POWERLINE_THEME_CONFIG` to `POWERLINE_THEME_OVERRIDES`
Ref #1126
2015-01-07 01:09:53 +03:00
ZyX 45ccbee171 Use singular --*-override form for command-line overrides
Ref #1126
2015-01-07 01:09:52 +03:00
ZyX 1c29ea3f8c Use g:powerline_theme_overrides dictionary in place of g:…overrides__
Ref #1126
2015-01-06 20:48:39 +03:00
ZyX 654d4690fc Remove all segments from powerline.segments.common
Ref #1092
2015-01-06 17:01:48 +03:00
ZyX 09afbc4655 Replace underscores with dashes in long options
Fixes #1125
2015-01-06 16:29:54 +03:00
ZyX 16bf16478c Rename `POWERLINE_CONFIG` to `POWERLINE_CONFIG_OVERRIDES`
Fixes #1124
Ref #1126
2015-01-06 16:19:47 +03:00
ZyX 79f6853f4b Rename `detect` to `auto` special values in network segments
Fixes #1205
2015-01-06 16:08:11 +03:00
ZyX c868f9c255 Rename `attr` to `attrs`
Fixes #1199
2015-01-06 16:05:01 +03:00
ZyX 8d05003849 Rename `highlight_group` key to `highlight_groups`
Ref #1199
2015-01-06 15:57:49 +03:00
ZyX 4e6b0a7ec8 Remove Control-P plugin support
If somebody needs to readd it he should make better code, specifically:

- Functions and variables necessary for supporting Control-P need to be defined 
  in a separate initialiazation function that is only called if Control-P was 
  found.
- Segments that show different information must be defined as separate segments 
  that may be put into configuration file.
- Segment functions must not know side they are on.
- Segment functions must not emit `priority`, it must go to configuration file.
- Segment functions must have proper documentation.
- Segment functions must not emit `width` and `align` keys.
- String `Loading...` or the equivalent must be overridable from configuration, 
  same for other interface strings (e.g. what is shown  when `regex` is true).
- Segment functions must have names that make it clear what they emit.

Closes #1244
2015-01-06 03:57:38 +03:00
ZyX 733b09f78c Revert "Add tagbar plugin tests": don’t know how to make it work
This reverts commit fb652d5126.
2015-01-06 02:53:58 +03:00
ZyX fb652d5126 Add tagbar plugin tests 2015-01-06 02:45:48 +03:00
ZyX 548e330fd8 Add NERDTree tests 2015-01-06 01:51:31 +03:00
ZyX 2bd25d7979 Test Command-T plugin 2015-01-06 01:51:31 +03:00
ZyX d8307b03ae Create tests for CtrlP 2015-01-06 01:39:23 +03:00
ZyX d51a50223e Use $ROOT in place of $PWD in run_vim_tests, set $PYTHONPATH
Checking whether this fixes Python-2.6 build failure
2015-01-05 21:28:54 +03:00
ZyX 6b89c8e394 Preserve old value of LD_LIBRARY_PATH 2015-01-03 00:07:07 +03:00
ZyX e86ec8bf99 Make sure not to add colon unless required 2015-01-03 00:04:11 +03:00
ZyX 375a169825 Install bc as it is required by test_shells/test.sh 2015-01-02 23:53:46 +03:00
ZyX c7fe5dbbb4 Use `set -e` for testing shells 2015-01-02 21:31:39 +03:00
ZyX 9374d135f2 Do not install pyuv watcher in Python-2.6
If pyuv watcher is installed then powerline.lib.vcs tests do not pass because
pyuv is missing notify events and INotify watcher is not available.

Ref #1041
2015-01-02 16:06:01 +03:00
ZyX 6a339a3a3a Install built fish 2015-01-02 15:25:06 +03:00
ZyX f311f75d0a Install libssl1.0.0
Should be required for Python sha256 hash to work. Actually it should be
installed already.
2015-01-02 15:25:06 +03:00
ZyX f2fd92068e Add support for testing zsh with zpython bindings 2015-01-02 15:25:01 +03:00
ZyX 7181c1d9b6 Move some functions to powerline.lib.dict
Moved functions: `merge*` from `powerline.lib` and `mergeargs` from
`powerline.commands.main`.
2015-01-02 15:23:49 +03:00
ZyX 9ae76a9971 Use UCS2 Python versions for running tests 2015-01-02 15:23:44 +03:00
ZyX ef3acefdd1 Only run Vim tests if PYTHON_IMPLEMENTATION is CPython 2015-01-02 03:37:21 +03:00
ZyX f5e9ec387c Use old Vim for tests, perform sanity test with empty &encoding 2015-01-02 03:37:21 +03:00
ZyX 5d6caaeecd Use compiled Vim binaries for Vim tests
Part 1: use latest single-python Vim builds
2015-01-02 03:37:21 +03:00
ZyX 104cea9a5c Install binary dependencies from powerline/deps 2015-01-02 03:37:20 +03:00
ZyX 9e454235b3 Skip testing cpu_load_percent if psutil module is not available 2014-12-08 21:15:39 +03:00
ZyX 8ae3d2aeaf Fix typo in install.sh 2014-12-08 08:42:08 +03:00
Nikolai Aleksandrovich Pavlov d2a1106c04 Merge pull request #1206 from ZyX-I/fbterm-support
Add support for fbterm
2014-12-06 17:08:41 +03:00
ZyX 033422aff2 Add tests for various shell escapes variants 2014-12-06 16:53:00 +03:00
Nikolai Aleksandrovich Pavlov 3a175fecf4 Merge pull request #1221 from ZyX-I/fix-lib-unicode
Fix some issues in powerline.lib.unicode
2014-12-06 15:57:42 +03:00
Nikolai Aleksandrovich Pavlov 7a6fc1ed75 Merge pull request #1219 from ZyX-I/limit-abstract-sockets-usage
Use sockets in abstract namespace only if running on linux
2014-12-06 15:05:46 +03:00
ZyX 8707f35bc9 Fix safe_unicode and string unicode library functions 2014-12-06 14:47:53 +03:00
ZyX 87ca9bca5c Make unichr() work with characters above U+10000 in UCS-2 builds 2014-12-06 14:40:46 +03:00
ZyX f0f6efcdbb Also have uname in $PATH
Travis uses Ubuntu, Ubuntu is debian-based and debian uses dash as /bin/sh, so 
$OSTYPE is not available.
.
2014-12-06 00:52:17 +03:00
ZyX f8270a8e49 Skip some functions’ tests as they are buggy
They are buggy, but fixing them is out of the scope of this PR.
2014-12-05 23:15:52 +03:00
ZyX cdfe6f03b2 Add support for running tests with debug Python versions
They are failing due to `[NNNN refs]` entries in daemon log and when switching 
modes in zsh without daemon, but who cares.
2014-12-05 23:09:21 +03:00
ZyX df14aaaa9c Add tests for unicode module
Note: east_asian_width does not accept surrrogate pairs in UCS-4 Python builds.
2014-12-05 22:41:50 +03:00
ZyX a9aef12c34 Remove unused test files 2014-11-30 03:23:12 +03:00
ZyX 8560e9261d Move code for checking existence and getting funcs into vim bindings 2014-11-30 02:17:41 +03:00
ZyX 1707f083e9 Modify postproc to make pypy tests work
Note: modification to test.sh is there because if running test outside of 
a virtualenv postproc.py will behave incorrectly.
2014-11-30 00:30:35 +03:00
ZyX 3f0d538584 Use dash hack for PyPy+IPython
Fixes #1051
Closes #919 (I hope so)
2014-11-29 21:40:06 +03:00
ZyX d62336f7a2 Add a way to specify configuration paths to powerline-config
One still cannot override various configuration options from the command-line.
2014-11-29 19:32:27 +03:00
ZyX c949f4ce95 Output list of failed shell tests 2014-11-28 23:02:12 +03:00
ZyX c81ef95c27 Use newline for dash, not CR 2014-11-28 23:01:19 +03:00
ZyX 5c75bef18c Add integration tests for unicode directory names 2014-11-28 22:58:53 +03:00
ZyX b845cc25b4 Fix tests on python-2.6
csv module does not appear to work will with multiline strings in csv, 
especially incomplete.
2014-11-10 01:08:37 +03:00
ZyX c9cb856acd Add support for vim_func_exists to tests/vim.py 2014-11-10 00:35:40 +03:00
ZyX d392cf3322 Add support for csv files
Equivalent to airline csv Christian Brabandt plugin integration, but uses Python
own facilities.

Note: filetype detection is out of the scope of the powerline responsibilities.
      CSV is supported by powerline, but only as long as filetype detection is
      done by Vim correctly. By default CSV files are neither detected nor
      highlighted.

Some known differences between powerline code and @chrisbra plugin with
corresponding airline integration:

1. Detection work differently. I cannot say which is better because I have not
   tested it much, but it is definitely different.
2. My variant is able to detect whether there is (no) header. (Of course,
   relying on Python code.) Airline is using a setting. (Both do not allow
   manual per-filetype setting.) Of course, user can force either variant (no
   headers at all or headers always).
3. My variant makes it possible to configure header output format, including
   truncating it at 15 characters (the default).
4. CSV plugin does not work with multiline CSV items (in some dialects one can
   use code like `abc;"I<CR>am<CR>multiline<CR>string"`). See `:h csv-column` on
   how to fix this if possible (will require also changing `<sid>WColumn`
   function because currently it only works with one line).
5. AFAIK Python does not such a thing as “fixed width CSV”. Thus I do not work
   with this, but CSV plugin does. Not sure whether it is different with
   space-separated CSV files though.
2014-11-09 23:54:49 +03:00
ZyX 28435f05d2 Add support for Command-T 2014-11-09 23:54:48 +03:00
ZyX fadd1eec17 Move all parser definitions to powerline.commands.*.get_argparser()
Reasoning: they will be easier to reach there. It will also be possible to use
specific ArgumentParser class that will just collect data for sphinx.
2014-10-25 22:03:33 +04:00
ZyX 0d3609fb96 Specify $TERM in place of assuming it is set to something working
Ref #1104
2014-10-12 00:41:06 +04:00
ZyX d1ac624c7f Fix broken tests 2014-10-12 00:36:53 +04:00
ZyX 8b1a502f0d Add ignore_statuses option to branch segments
Closes #1080
2014-09-26 00:34:32 +04:00
ZyX 3f2aabb77b Refactor Vim and common branch segments to share code 2014-09-26 00:20:58 +04:00
ZyX c68eb56f7c Raise exceptions that are not intercepted when testing
Thus problems like in #1087 will result in build failure.
2014-09-21 15:53:22 +04:00
ZyX 679b66466f Fix WM bindings tests 2014-09-21 15:53:22 +04:00
ZyX fcf5702b7f Use pwd.getpwuid or getpass.getuser to get current user name 2014-09-21 15:26:27 +04:00
ZyX bb5977c8eb Fix tests with <psutil-2.0 2014-09-21 15:11:01 +04:00
ZyX 26365a9620 Split powerline.segments.common into a number of modules
Note: some modules (i.e wthr and bat) have their names in order to avoid the 
situation when module name matches segment name:

    import powerline.segments.common.weather

will import weather segment because `powerline.segments.common` contains line 
`from powerline.segments.common.weather import weather`.

Fixes #1083
2014-09-21 02:00:37 +04:00
ZyX 77b0695caf Replace all ASCII ' with Unicode ’ in comments and docstrings 2014-09-20 17:48:15 +04:00
ZyX 8587d14598 Link git executable to tests/shell/path 2014-09-20 14:43:45 +04:00
ZyX 48e06cbf9e Refactor weather segment to use KwThreaded segment
Problem: weather segment used to set its state (i.e. user location) once and 
remember it forever.
2014-09-20 13:52:24 +04:00
ZyX 92b75aa951 Also catch INotifyError when testing tree watcher 2014-09-14 19:26:37 +04:00
ZyX 4e91f18908 Run watcher tests with bytes() arguments 2014-09-14 19:26:36 +04:00
ZyX be7056fd7d Allow bytes paths in VCS bindings 2014-09-14 19:26:36 +04:00
ZyX e7d0c8368e Add code that will return bytes() from vim functions in Python-3 2014-09-14 17:21:11 +04:00
ZyX a4e711dae7 Add tests for invalid unicode filenames
Ref #1071
2014-09-14 14:26:42 +04:00
ZyX d14aecbc0a Use proper encoding to convert values in various places
Fixes #1072
2014-09-14 14:26:42 +04:00
ZyX fa217185cf Encode vim statusline to &encoding before returning
Partially fixes #1072
2014-09-14 14:26:42 +04:00
Nikolai Aleksandrovich Pavlov 257732bd82 Merge pull request #1069 from ZyX-I/workaround-1068
Do not use _POWERLINE_SHORTENED_PATH or unset it shortly after using
2014-09-09 00:22:33 +04:00
ZyX 901d96e3e1 Add tests 2014-09-09 00:04:56 +04:00
ZyX d3b57f7c31 Include args.config_path in the key
Consider the following script:

    % powerline-daemon -s powerline-test
    % powerline --socket powerline-test -p/dev/null shell left
    Config file not found in search paths (/dev/null): config.json
    % powerline --socket powerline-test shell left
    Config file not found in search paths (/dev/null): config.json

Note the problem: second call to powerline does not use offending path, but it 
still emits the error “Config file not found in search paths”.
2014-09-08 23:53:05 +04:00
ZyX fb022b7917 Check that exception from watcher has errno attribute equal to ENOENT 2014-09-07 23:23:23 +04:00
ZyX 05cb133dd4 Replace g:powerline_config_path Vim variable with …_paths list
This is for consistency with other powerline bindings that now all do have a way 
to specify a list of paths.
2014-09-05 22:13:51 +04:00
ZyX 68263beec4 Show current buffer, window and tabpage number by default
Fixes #1048
2014-09-05 20:00:21 +04:00
ZyX d569c0b3dd Skip identical highlighting
Fixes #1049
2014-09-05 20:00:20 +04:00
ZyX 1a5bbbea96 Replace segment-local modes with highlight_group_prefix option
Fixes #1046
2014-09-05 20:00:20 +04:00
ZyX 667cd4bce5 Assume highlight group is always an iterable
According to the documentation and linter `'highlight_group': 'string'` was not
correct even at the current stage, but it worked. This commit fixes this
situation.
2014-09-05 20:00:20 +04:00
ZyX 54e12b1515 Use new functionality to replace tabbuflister and single_tab segment 2014-09-05 20:00:19 +04:00
ZyX c5ca1b23c4 Use class setup/teardown methods to use vim module mock 2014-09-05 20:00:19 +04:00
ZyX 7bf025ca2b Add `exclude_/include_function` support
This is first step towards fixing #1046.
2014-09-05 20:00:19 +04:00
ZyX bc557bd656 Use replace_item to add module `bar` to sys.modules
Tests should not leave modified environment.
2014-09-04 21:38:49 +04:00
ZyX 8588885b04 In vim tests check for printed messages 2014-09-04 08:32:36 +04:00
ZyX b638a8e1c9 Add tests for is_watching method
Currently they fail for uv-based watcher.
2014-09-02 21:58:42 +04:00
ZyX 06211cbe63 Unify imports
Now imports follow the following structure:

1. __future__ line: exactly one line allowed:

        from __future__ import (unicode_literals, division, absolute_import, print_function)

   (powerline.shell is the only exception due to problems with argparse).
2. Standard python library imports in a form `import X`.
3. Standard python library imports in a form `from X import Y`.
4. and 5. 2. and 3. for third-party (non-python and non-powerline imports).
6. 3. for powerline non-test imports.
7. and 8. 2. and 3. for powerline testing module imports.

Each list entry is separated by exactly one newline from another import. If
there is module docstring it goes between `# vim:` comment and `__future__`
import. So the structure containing all items is the following:

    #!/usr/bin/env python
    # vim:fileencoding=utf-8:noet

    '''Powerline super module'''

    import sys

    from argparse import ArgumentParser

    import psutil

    from colormath.color_diff import delta_e_cie2000

    from powerline.lib.unicode import u

    import tests.vim as vim_module

    from tests import TestCase

.
2014-09-01 00:25:24 +04:00
ZyX 2505d0b827 Implement segment truncation
Closes #161 (requires implementation for specific segments though)
2014-08-30 18:22:52 +04:00
ZyX d6c603daf0 Add support for `segment.expand`
Closes #154
2014-08-30 18:22:46 +04:00
ZyX bfa335d96a Fix typo in test_configuration.py 2014-08-30 17:59:58 +04:00
ZyX 0da40f08a5 Fix syntastic error 2014-08-30 17:59:58 +04:00
ZyX 8d3376ce07 Ultimately disable pyuv watcher tests 2014-08-30 15:49:50 +04:00
ZyX 560600fca9 Use shutil.rmtree in tests 2014-08-30 15:47:31 +04:00
ZyX 0ee5293e1a Add tests for libuv-based watcher
Four possible results of running tests (first three are errors):

- “The change to inotify/file2 was not detected” on line 84: most common
- “Spurious change detected” at line 82 (uncommon, usually fixed by sleeping
  before running test in do_test_for_change)
- “The change to inotify was not detected” in tree watcher test (e.g. from line
  131) (very rare)
- All OK.
2014-08-30 15:45:30 +04:00
ZyX 10e8d9bb15 Do not use &> in #!/bin/sh scripts 2014-08-29 23:21:19 +04:00
ZyX 41476544ca Replace `name` and `module` keys with `function` key
Fixes #1031
2014-08-29 23:13:10 +04:00
ZyX 5bd543ae89 Do not run daemon when running with ONLY_TEST_TYPE=nodaemon 2014-08-29 23:13:10 +04:00
ZyX 9a0e100ca0 Specify -p argument in run function when running shell tests 2014-08-29 23:13:10 +04:00
ZyX 4c95928c96 Split shell tests into files
I am mostly interested in running all python and vim tests separately from other 
tests.
2014-08-29 22:22:39 +04:00
ZyX 849c34ea72 Replace all unicode defaults with defaults from ASCII theme
Closes #1034
2014-08-29 20:47:44 +04:00
ZyX 9fe0b66125 Merge branch 'top-theme-extend' into develop 2014-08-29 20:25:51 +04:00
ZyX 356cb43ea2 Add `powerline_segment_datas` attribute
Fixes #1035
2014-08-29 20:17:23 +04:00
ZyX 125f309724 Fix width used for tabline
Fixes #1033
2014-08-29 18:32:58 +04:00
ZyX 53ab31eeb8 Use setUpClass/tearDownClass to deal with VCS repositories 2014-08-29 00:28:41 +04:00
ZyX 70fabdc02b Use SkipTest for skipping tests 2014-08-29 00:22:28 +04:00
ZyX 323f0c4e22 Use __import__ checks for skipping bzr/mercurial
Closes #1015
2014-08-29 00:22:05 +04:00
ZyX 9658e45eee Use &encoding as powerline encoding in Vim
Among other benefits (i.e. correct fall back to ascii theme when Vim uses
non-unicode encoding) this should also fix travis tests: apparently travis is
not setting LANG or similar environment variables to some unicode locale, so
tests are failing.
2014-08-27 23:52:09 +04:00
ZyX e02647560a Move LANG setting to run function, remove useless BINDFILE variable 2014-08-27 23:52:09 +04:00
ZyX 289a08c539 Replace .replace(' ', NBSP) call with self.escape call
Dividers need to be escaped as well.

Fixes #1027
2014-08-27 23:52:09 +04:00
ZyX d32b798c11 Add `use_non_breaking_spaces` theme option, use it in ascii theme 2014-08-27 23:52:09 +04:00
ZyX d88d87f6af Do not make daemon output zero byte
This byte is useless and can be seen in zsh output (strange that it did not 
cause bugs so far, at least none I know about). It may have been needed if any 
client was supposed to hold connection with daemon for a few runs, but all 
current clients work in “request → output response → exit” fashion without 
caring about terminating newline and definitely without preserving connection to 
daemon accross runs.
2014-08-26 21:13:56 +04:00
ZyX e4565dd3e8 Make attached_clients segment use provided tmux bindings 2014-08-24 21:07:19 +04:00
Matthew M. Keeler 88515ab472 Show Count of Attached Tmux Sessions
- This segment displays the number of attached tmux clients to the
  currently running session.
- The minimum argument is used to specify a threshold for when the
  segment should be visible.

Fixes #661
Closes #662

Conflicts:
	docs/source/index.rst
	powerline/config_files/colorschemes/shell/default.json
	powerline/config_files/colorschemes/shell/solarized.json
	powerline/config_files/colorschemes/tmux/default.json
	powerline/config_files/colorschemes/vim/default.json
	powerline/config_files/colorschemes/vim/solarized.json
	powerline/config_files/colorschemes/wm/default.json
	tests/test_segments.py
2014-08-24 20:56:59 +04:00
ZyX 45d2053053 Do not specify $PYTHON when running python client
It is not needed: in the environment where it is run only python is the one
linked in tests/shell/path.
2014-08-24 19:57:58 +04:00
ZyX d7a674deaa Add support for shell-specific path shortening
Fixes #502
2014-08-24 19:54:28 +04:00
ZyX 04c0030fe1 Refactor cwd segment into a class and add shorten_home argument 2014-08-24 19:50:54 +04:00
ZyX 58057c95b9 Add a directory that will make fish_update_completions not launch 2014-08-24 17:14:37 +04:00
ZyX 0af5e2d2ca Test mode support in fish
WARNING: Requires development version of fish. Since fish is not tested in
travis it is probably OK.
2014-08-24 17:14:37 +04:00
ZyX 54672aace0 Make COMMAND_PATTERN consistent with other arguments 2014-08-24 17:14:37 +04:00
ZyX 68ecd81edd Wait until fish_update_completions finishes 2014-08-24 16:58:35 +04:00
ZyX 5bc1f75b70 Add support for vim.eval('v:version') in test bindings 2014-08-24 13:41:54 +04:00
ZyX 173c4d6e76 Add internal_ip segment
Closes #857
2014-08-24 01:20:25 +04:00
ZyX 20e9575c17 Do not try to test ipython if it is not available 2014-08-23 16:24:16 +04:00
ZyX 1b56179676 Disable dash tests in travis 2014-08-23 16:02:04 +04:00
ZyX ebc98977ae Make test_shells/test.sh compatible with dash 2014-08-23 16:00:34 +04:00
ZyX 9b7052bf3e Do not execute all tests in travis 2014-08-23 15:51:35 +04:00
ZyX 0232d3215b Add --socket argument to all clients
Makes it not needed to kill daemon for testing, but disables implicit
`powerline-config shell command` testing.
2014-08-23 15:19:00 +04:00
ZyX 77a7a26782 Do not require scripts/powerline
It may be immediately moved to bin/ sometimes or not compiled at all for some
reason.
2014-08-23 15:19:00 +04:00
ZyX 042d542231 Also test whether running daemon is successfull without arguments 2014-08-23 15:19:00 +04:00
ZyX b9360a083a Make tests test powerline daemon with valid python and all clients 2014-08-23 15:19:00 +04:00
ZyX 6481f1b65e Always specify all keys in segment_info 2014-08-22 21:03:59 +04:00
ZyX da48e9d84e Add tests 2014-08-22 09:08:58 +04:00
ZyX 075eb8420e Add tests 2014-08-21 23:32:43 +04:00
ZyX 88a0b9075c Remove unused vim import 2014-08-21 23:32:43 +04:00
ZyX 48aac90681 Fix ipython tests 2014-08-20 21:12:10 +04:00
ZyX 06175dcd74 Refactor IPython bindings
- Replaced two powerline objects with one powerline object utilizing
  RendererProxy proxy class that holds two Renderer instances.
- Made .setup() functions do something more meaningful.
2014-08-19 22:24:10 +04:00
ZyX b93f8d9b7b Rename Ipython to IPython (two capital letters in place of one) 2014-08-19 22:13:50 +04:00
ZyX cb99c06027 Move watcher tests into a separate file 2014-08-16 15:06:57 +04:00
ZyX 2faa2a254f Move tree_watcher to powerline/lib/watcher and split it 2014-08-16 15:06:57 +04:00
ZyX 61074fcd6c Refactor file_watcher.py into four files 2014-08-16 14:47:51 +04:00
ZyX 31731a93da Add bufnr and modified_indicator segments to tabline 2014-08-16 14:37:13 +04:00
ZyX ae92d83eae Fix powerline style
Specifically I searched for all lines that are more then one tab off compared to 
the previous line with

    BufGrep /\(^\t\+\)\S.*\n\1\t\t\+/

and replaced them with something more appropriate. Most of time this resulted in 
a few more newlines, but there are cases when I used mixed tabs/spaces 
indentation+alignment.
2014-08-15 20:58:19 +04:00
ZyX 4a8b81e68b Rearrange renderers: move *_prompt modules one level up
Renames powerline.renderers.zsh_prompt to powerline.renderers.shell.zsh, same
for other *sh_prompt modules.
2014-08-15 19:27:10 +04:00
ZyX 1afab26cec Test that VimPowerline.add_local_theme works 2014-08-12 20:48:49 +04:00
ZyX 7882583dcb Update continuation segment tests 2014-08-12 08:16:26 +04:00
ZyX 89afac44bb Add support for PS2 and PS3 prompts outside of zsh 2014-08-12 08:04:35 +04:00
ZyX 547306e746 Add cursor_space and cursor_columns configuration options
Fixes #815
2014-08-10 21:03:33 +04:00
ZyX fcc397100e Wait for screen to initialize, based on screen exit status
Otherwise bash tests tend to fail randomly
2014-08-10 18:19:48 +04:00
ZyX fdd8f6df3c Wait for pid file to appear
Should fix some rare bash test failures
2014-08-10 17:10:35 +04:00
ZyX 7ade6d1fc0 Use busybox as shell name in place of bb
Conflicts:
	tests/test_shells/test.sh
2014-08-10 17:02:07 +04:00
ZyX 01185eb9c8 Use bgscript.sh in place of direct bash call 2014-08-10 16:58:55 +04:00
ZyX 9d1392fa0d Fix vim emulation module 2014-08-10 16:26:22 +04:00
ZyX f51134deef Run shell tests in an isolated environment 2014-08-10 16:13:33 +04:00
ZyX 3c03240530 Remove tests/shell iff there are no failures 2014-08-10 16:13:33 +04:00
ZyX 99c9f730e0 Do not omit running tests without ONLY_SHELL set 2014-08-10 16:13:33 +04:00
ZyX 310af9ae75 Prefer powerline bindings directory over fish_function_path 2014-08-10 16:13:33 +04:00
ZyX 17b32b1765 Make ipython accept paths, not a single path 2014-08-10 16:13:32 +04:00
ZyX c3e2358931 Also install ipython on Python-3.3+ 2014-08-06 18:12:59 +04:00
ZyX 863264cd99 Disable virtualenv segment, also test config_overrides 2014-08-06 18:09:57 +04:00
ZyX accb174b8b Do not install ipython when using python-2.6 2014-08-06 18:06:54 +04:00
ZyX 3e43995d2c Use pip to install ipython, not apt-get
I am very unsure that it will install ipython for all required python versions
2014-08-06 17:21:01 +04:00
ZyX c403eef434 Add ipython shell tests 2014-08-06 17:18:42 +04:00
ZyX ed70cc2eb2 Fix tests 2014-08-06 13:47:11 +04:00
ZyX 625aa243d6 Use ascii theme in local overrides 2014-08-06 02:25:24 +04:00
ZyX 48254ea657 Use more precise error messages in test_tabline.vim 2014-08-06 01:33:37 +04:00
ZyX bdde4ae99f Implement theme hierarchy
Fixes #783
2014-08-06 00:05:04 +04:00
ZyX 117661e186 Add tests for visual_range 2014-08-05 22:49:53 +04:00
ZyX 0f4e1bafda Refactor config_mock module to not use globals and fix tests 2014-08-05 13:56:02 +04:00
ZyX 01585edeab Fix errors reported by linter, allow running it during tests 2014-08-05 13:56:02 +04:00
ZyX 27db44ac7a Implement configuration merging
Fixes #418
2014-08-05 13:56:02 +04:00
ZyX 50703f1cef Fix unicode/bytes handling for python-3 2014-08-04 00:07:30 +04:00
ZyX 74a3c9a0ca Add file_scheme segment
Fixes #207
2014-08-03 23:58:34 +04:00
ZyX 3d1f9bfbbd Allow multiple arguments to `powerline[-lint] --config_path` 2014-08-03 22:22:59 +04:00
ZyX 120a9cc8fa Add winnr segment
Closes #705
2014-08-03 13:25:58 +04:00
ZyX f877516e54 Add bufnr segment
Ref #705
2014-08-03 13:25:58 +04:00
ZyX 43acf07ca0 Modify test_tabline to also test bufline 2014-08-03 12:53:53 +04:00
ZyX 6cf0c485fa Add single_tab segment 2014-08-03 12:53:53 +04:00
ZyX 85f252652e Add tabnr segment 2014-08-03 12:53:53 +04:00
ZyX 1907708e98 Add support for has_key(gettabwinvar()) in vim test module 2014-08-03 12:53:16 +04:00
ZyX b99ad3904e Remove some __nonzero__ methods in tests/vim.py
Just __len__ is good enough here
2014-08-03 12:53:15 +04:00
ZyX 07c533d1b2 Test tabline in test_tabline.vim file 2014-08-03 12:53:15 +04:00
ZyX ff91ff7f92 Update tests to work with new functionality
Still no tests for new functionality.
2014-08-03 12:53:15 +04:00
Collin Grady f615d85172 Added line_count segment for vim.
Returns total number of lines in current buffer.

Addresses #556
2014-08-03 05:54:57 +00:00
ZyX 44cca97566 Check whether daemon log is as empty as it should 2014-08-02 22:03:22 +04:00
ZyX 28aee92c51 Fix zsh daemon tests: disable hostname and user before testing select
Reason: hostname and user do not have stable width and select prompt width with 
daemon depends on previous prompt width.
2014-08-02 21:56:37 +04:00
ZyX 9da3e04bc2 Do not hardcode scripts/powerline in input.* 2014-08-02 21:31:01 +04:00
ZyX fed43e8af5 Run shell tests with and without daemon 2014-08-02 21:31:01 +04:00
ZyX 9e8c115eea Add trailing whitespace segment
Note: by default this segment is disabled. Until #923 it may only be enabled by
copying the whole file and changing "enabled" to "true". After #923 it may be
enabled by having `~/.config/powerline/themes/vim/default.json` with the
following contents:

    {
        "segment_data": {
            "trailing_whitespace": {
                "display": true
            }
        }
    }

Fixes #388
2014-08-02 18:39:16 +04:00
ZyX 16c01e8d64 Add support for display option 2014-08-02 18:37:22 +04:00
ZyX 6a081685e5 Fix “syntax error near unexpected token `fi'” error 2014-07-28 03:36:15 +04:00
ZyX d1b62eba45 Disable dash tests
Temporary fix for #931
2014-07-28 03:30:51 +04:00
ZyX d0c4d4e266 Ignore IOError’s in ConfigLoader.update
Fixes #932
2014-07-26 01:46:54 +04:00
ZyX a279ea236c Also check error messages 2014-07-26 01:46:54 +04:00
ZyX 97e4ee6799 Document why `stuff` and waiting are used for dash 2014-07-20 02:04:44 +04:00
ZyX 855e33274e Fix travis build: on travis “Terminated…” message is truncated 2014-07-20 02:00:56 +04:00
ZyX 5425c06476 Add tests for new functionality 2014-07-20 01:53:25 +04:00
ZyX b2406d983d Disable libzpython support in zsh 2014-07-20 00:43:19 +04:00
ZyX 82e433906c Fix shell tests: VIRTUAL_ENV is not accessible by powerline by default 2014-07-20 00:35:37 +04:00
ZyX f5735148e8 Add group aliasing and colorscheme hierarchy tests 2014-07-12 14:22:23 +04:00
ZyX 3ebf9c1a81 Use highlighted_string function to define segments 2014-07-12 14:08:05 +04:00
ZyX 576971c5f1 Fix test class name in test_configuration 2014-07-12 13:48:04 +04:00
ZyX 9af7834463 Disable shell tests in PyPy
Do not let PyPy SEGVs result in failed build.
2014-07-12 13:46:28 +04:00
ZyX 621eb8412d Fix tests 2014-07-12 12:20:40 +04:00
ZyX 97266b7ffc Initial support for #770
What was done:
- Implemented loading using configuration hierarhy as proposed in the issue
- Implemented group aliasing

What was not:
- Some tests (config_reload) are failing
- Other (test_configuration) are spamming console with unexpected messages
- No support for powerline-lint
- No tests for new functionality
- Specifically I have not checked whether group aliasing actually works
- Colorschemes were not ported

Some other things: I have named this branch `config-ng` because I have other
ideas about configuration and it would be good to include them making only one
possibly backwards-incompatible merge commit instead of many. Specifically I am
going to rebase `merge-config` branch here.
2014-07-12 12:20:40 +04:00
ZyX 128921454f Correct _construct_result for Python-3 2014-07-10 23:24:58 +04:00
ZyX a92d72b5d7 Respect the fact that vim.eval in Vim returns str instances 2014-07-10 22:54:27 +04:00
ZyX 3ac75eeca6 Add window_title tests 2014-07-10 22:33:10 +04:00
ZyX f9af425054 Add missing winnr key to segments_dictionary 2014-07-10 22:33:10 +04:00
ZyX e436bdbbfa Remove failing _index, use (self.number - 1) instead 2014-07-10 22:33:10 +04:00
ZyX 3f8c8c9426 Prefix _Windows.{append,insert,pop} methods with underscore
There are no such methods in Vim.
2014-07-10 22:32:59 +04:00
ZyX 0ab80742c4 Add _with('wvars') 2014-07-10 22:21:29 +04:00
ZyX a3e29a6cd6 Get rid of lots of NotImplementedError’s in travis log 2014-07-10 22:12:08 +04:00
ZyX 0fc7856b1b Rename create_renderer_kwargs to cr_kwargs for consistency 2014-07-10 21:27:41 +04:00
ZyX 289094362e Rename find_config_file to _find_config_file 2014-07-10 21:27:41 +04:00
ZyX 871ce5727b Set use_mercurial and use_bzr to False in PyPy 2014-07-10 19:49:37 +04:00
ZyX 19195159ad Only install mercurial and bazaar if using CPython 2014-07-10 19:36:20 +04:00
ZyX e2a49417b6 Default line_percent_gradient to (light|dark)_green_gray gradients
dark_green_gray gradient was generated with

    tools/generate_gradients.py 70 247

. It is used for non-insert modes in the current window. light_green_gray
gradient was generated with

    ./tools/generate_gradients.py 148 250

. It is used for insert mode in the current window.
2014-07-10 18:56:40 +04:00
ZyX a0a5b44173 Use battery_full and battery_empty for displaying hearts
Red hearts for battery full are still more optimal in case white hearts are for
empty (though I do not understand why they have to be red). Cannot agree about
per cents though: red is better for empty then white is if there are no related
parts to compare.
2014-07-10 18:35:24 +04:00
ZyX 39316c429b Reverse the gradient in battery segment
Closes #910
2014-07-10 18:35:23 +04:00
ZyX 473f647fc8 Fix test_local_overrides.vim test broken by better-gradient branch 2014-07-06 22:42:28 +04:00
ZyX 623395a013 Remove outdated comment 2014-06-28 22:18:45 +04:00
ZyX d7d8108230 Fix error in python-3* that happens while checking branch name 2014-06-28 22:12:41 +04:00
ZyX 4d4da56838 Check whether it runs fine in travis 2014-06-28 21:46:12 +04:00
ZyX 317f4be43f Add tests for git symlinks 2014-06-28 21:45:24 +04:00
ZyX c570a98065 Add watcher option
Ref #818
2014-06-28 21:10:15 +04:00
ZyX 6f6c1fb90c Add tests 2014-06-25 20:05:24 +04:00
ZyX 515df615bf Add some basic tests 2014-06-24 23:36:50 +04:00
ZyX f02807ffa4 Rename test_configuration to test_provided_config_files 2014-06-24 21:38:07 +04:00
ZyX be2fe98a21 Add support for omitting VALUE
This will remove error reported in #853, but not its cause
2014-05-04 13:01:29 +04:00
ZyX e51d7a9dd3 Add fuzzy_time(unicode_text) argument 2014-03-13 20:54:07 +04:00
ZyX 3f1e621f1d Add ellipsis argument to cwd segment 2014-03-13 20:47:06 +04:00
ZyX c3b4654bfb Fix flake8 complaints 2014-03-13 20:41:54 +04:00
ZyX 55858e1a9d Fix tests for new psutil 2014-03-13 20:05:52 +04:00
ZyX acff89a8e9 Remove useless lock 2014-02-26 08:15:26 +04:00
ZyX ba41cecb72 Add powerline.lib.threaded tests 2014-02-23 15:18:20 +04:00
ZyX 68a6fd056c Use monotonic() in place of time.time() 2014-02-23 14:44:36 +04:00
ZyX 58d5d6b078 Remove failing test 2014-02-16 21:22:05 +04:00
ZyX a86c66f4e0 Update zsh tests
Note: to make prompt fancy enough powerline-daemon should be used. Otherwise 
continuation prompt length is different from what was expected:

With daemon:

    user > env > path > if true ; then
                 then > fi

Without:

    user > env > path > if true ; then
    then > fi

Fixes #771 as I do not want to touch tcsh any longer
2014-02-16 21:15:57 +04:00
ZyX 5c33de7a24 Also test zsh local themes 2014-02-16 20:52:22 +04:00
ZyX 8718bf76ce Add tests for continuation segment 2014-02-16 20:41:01 +04:00
ZyX 66d98e7def Improved battery segment:
- Ignore `steps` if gamify is False.
- Add `full_heart` and `empty_heart` keywords.
- Document `format` keyword.
- Replace `draw_soft_divider` with `draw_inner_divider`.
2014-02-09 13:44:06 +04:00
Joshua Perry c4fb09a418 Update tests to support parameter on _get_capacity() 2014-02-09 02:36:19 +04:00
ZyX 773d6a6600 Also use --allow-unverified 2014-02-09 01:25:18 +04:00