pygments-shell-console 0.2__tar.gz → 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pygments_shell_console-0.2 → pygments_shell_console-0.2.1}/PKG-INFO +1 -1
- {pygments_shell_console-0.2 → pygments_shell_console-0.2.1}/git_lexer.py +1 -1
- {pygments_shell_console-0.2 → pygments_shell_console-0.2.1}/pyproject.toml +1 -1
- {pygments_shell_console-0.2 → pygments_shell_console-0.2.1}/test/test_git.py +35 -1
- {pygments_shell_console-0.2 → pygments_shell_console-0.2.1}/.github/workflows/publish-to-pypi.yml +0 -0
- {pygments_shell_console-0.2 → pygments_shell_console-0.2.1}/.gitignore +0 -0
- {pygments_shell_console-0.2 → pygments_shell_console-0.2.1}/README.md +0 -0
- {pygments_shell_console-0.2 → pygments_shell_console-0.2.1}/examples/git_lg.example +0 -0
- {pygments_shell_console-0.2 → pygments_shell_console-0.2.1}/examples/git_log.example +0 -0
- {pygments_shell_console-0.2 → pygments_shell_console-0.2.1}/examples/git_show.example +0 -0
- {pygments_shell_console-0.2 → pygments_shell_console-0.2.1}/examples/status.example +0 -0
- {pygments_shell_console-0.2 → pygments_shell_console-0.2.1}/examples/test.exmpl +0 -0
- {pygments_shell_console-0.2 → pygments_shell_console-0.2.1}/examples/test.sh +0 -0
- {pygments_shell_console-0.2 → pygments_shell_console-0.2.1}/shellconsole_lexer.py +0 -0
- {pygments_shell_console-0.2 → pygments_shell_console-0.2.1}/shellconsole_style.py +0 -0
- {pygments_shell_console-0.2 → pygments_shell_console-0.2.1}/test/__init__.py +0 -0
- {pygments_shell_console-0.2 → pygments_shell_console-0.2.1}/test/test_git_branch.py +0 -0
- {pygments_shell_console-0.2 → pygments_shell_console-0.2.1}/test/test_git_log.py +0 -0
- {pygments_shell_console-0.2 → pygments_shell_console-0.2.1}/test/test_git_pretty_log.py +0 -0
- {pygments_shell_console-0.2 → pygments_shell_console-0.2.1}/test/test_git_show.py +0 -0
- {pygments_shell_console-0.2 → pygments_shell_console-0.2.1}/test/test_git_status.py +0 -0
- {pygments_shell_console-0.2 → pygments_shell_console-0.2.1}/test/test_prompts.py +0 -0
|
@@ -3,7 +3,7 @@ from pygments.token import Token
|
|
|
3
3
|
from shellconsole_lexer import ShellConsoleLexer
|
|
4
4
|
from git_lexer import GitStatusLexer
|
|
5
5
|
|
|
6
|
-
def
|
|
6
|
+
def test_git_command_with_hint():
|
|
7
7
|
lexer = ShellConsoleLexer()
|
|
8
8
|
text = (
|
|
9
9
|
"user@host:~/directory (main) $ git branch -d desc\n"
|
|
@@ -37,3 +37,37 @@ def test_git_command_whit_hint():
|
|
|
37
37
|
(Token.Git.Hint, "hint: If you are sure you want to delete it, run 'git branch -D desc'.\n"),
|
|
38
38
|
(Token.Git.Hint, "hint: Disable this message with \"git config advice.forceDeleteBranch false\".\n"),
|
|
39
39
|
]
|
|
40
|
+
|
|
41
|
+
def test_git_command_with_empty_hint():
|
|
42
|
+
lexer = ShellConsoleLexer()
|
|
43
|
+
text = (
|
|
44
|
+
"user@host:~/directory $ git init\n"
|
|
45
|
+
"hint: Using 'master' as the name for the initial branch. This default branch name\n"
|
|
46
|
+
"hint: is subject to change. To configure the initial branch name to use in all\n"
|
|
47
|
+
"hint: of your new repositories, which will suppress this warning, call:\n"
|
|
48
|
+
"hint:\n"
|
|
49
|
+
"hint: git config --global init.defaultBranch <name>\n"
|
|
50
|
+
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
tokens = list(lexer.get_tokens(text))
|
|
54
|
+
|
|
55
|
+
assert tokens == [
|
|
56
|
+
# Prompt
|
|
57
|
+
(Token.Generic.Prompt.UserHost, "user@host"),
|
|
58
|
+
(Token.Generic.Prompt, ":"),
|
|
59
|
+
(Token.Generic.Prompt.Directory, "~/directory"),
|
|
60
|
+
(Token.Text.Whitespace, " "),
|
|
61
|
+
(Token.Generic.Prompt, "$"),
|
|
62
|
+
(Token.Text.Whitespace, " "),
|
|
63
|
+
(Token.Text, "git"),
|
|
64
|
+
(Token.Text.Whitespace, " "),
|
|
65
|
+
(Token.Text, "init"),
|
|
66
|
+
(Token.Text.Whitespace, "\n"),
|
|
67
|
+
# Output
|
|
68
|
+
(Token.Git.Hint, "hint: Using 'master' as the name for the initial branch. This default branch name\n"),
|
|
69
|
+
(Token.Git.Hint, "hint: is subject to change. To configure the initial branch name to use in all\n"),
|
|
70
|
+
(Token.Git.Hint, "hint: of your new repositories, which will suppress this warning, call:\n"),
|
|
71
|
+
(Token.Git.Hint, "hint:\n"),
|
|
72
|
+
(Token.Git.Hint, "hint: git config --global init.defaultBranch <name>\n"),
|
|
73
|
+
]
|
{pygments_shell_console-0.2 → pygments_shell_console-0.2.1}/.github/workflows/publish-to-pypi.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|