Commit Graph

80 Commits

Author SHA1 Message Date
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 8587d14598 Link git executable to tests/shell/path 2014-09-20 14:43:45 +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 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 10e8d9bb15 Do not use &> in #!/bin/sh scripts 2014-08-29 23:21:19 +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 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 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 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 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 89afac44bb Add support for PS2 and PS3 prompts outside of zsh 2014-08-12 08:04:35 +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 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 863264cd99 Disable virtualenv segment, also test config_overrides 2014-08-06 18:09:57 +04:00
ZyX c403eef434 Add ipython shell tests 2014-08-06 17:18:42 +04: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 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 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