diff options
Diffstat (limited to 'gitlint-core/gitlint/tests/expected/cli/test_cli_hooks')
17 files changed, 69 insertions, 0 deletions
diff --git a/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_hook_config_1_stderr b/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_hook_config_1_stderr new file mode 100644 index 0000000..cfacd42 --- /dev/null +++ b/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_hook_config_1_stderr @@ -0,0 +1,2 @@ +1: T1 Title exceeds max length (27>5): "WIP: Test hook config tïtle" +1: T5 Title contains the word 'WIP' (case-insensitive): "WIP: Test hook config tïtle" diff --git a/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_hook_config_1_stdout b/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_hook_config_1_stdout new file mode 100644 index 0000000..bee014b --- /dev/null +++ b/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_hook_config_1_stdout @@ -0,0 +1,5 @@ +gitlint: checking commit message... +----------------------------------------------- +gitlint: Your commit message contains violations. +Continue with commit anyways (this keeps the current commit message)? [y(es)/n(no)/e(dit)] +Aborted! diff --git a/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_hook_edit_1_stderr b/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_hook_edit_1_stderr new file mode 100644 index 0000000..3eb8fca --- /dev/null +++ b/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_hook_edit_1_stderr @@ -0,0 +1,6 @@ +1: T5 Title contains the word 'WIP' (case-insensitive): "{commit_msg}" +3: B6 Body message is missing +1: T5 Title contains the word 'WIP' (case-insensitive): "{commit_msg}" +3: B6 Body message is missing +1: T5 Title contains the word 'WIP' (case-insensitive): "{commit_msg}" +3: B6 Body message is missing diff --git a/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_hook_edit_1_stdout b/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_hook_edit_1_stdout new file mode 100644 index 0000000..b57a35a --- /dev/null +++ b/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_hook_edit_1_stdout @@ -0,0 +1,14 @@ +gitlint: checking commit message... +----------------------------------------------- +gitlint: Your commit message contains violations. +Continue with commit anyways (this keeps the current commit message)? [y(es)/n(no)/e(dit)] gitlint: checking commit message... +----------------------------------------------- +gitlint: Your commit message contains violations. +Continue with commit anyways (this keeps the current commit message)? [y(es)/n(no)/e(dit)] gitlint: checking commit message... +----------------------------------------------- +gitlint: Your commit message contains violations. +Continue with commit anyways (this keeps the current commit message)? [y(es)/n(no)/e(dit)] Commit aborted. +Your commit message: +----------------------------------------------- +{commit_msg} +----------------------------------------------- diff --git a/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_hook_local_commit_1_stderr b/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_hook_local_commit_1_stderr new file mode 100644 index 0000000..11c3cd8 --- /dev/null +++ b/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_hook_local_commit_1_stderr @@ -0,0 +1,2 @@ +1: T5 Title contains the word 'WIP' (case-insensitive): "WIP: commït-title" +3: B5 Body message is too short (11<20): "commït-body" diff --git a/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_hook_local_commit_1_stdout b/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_hook_local_commit_1_stdout new file mode 100644 index 0000000..0b8e90e --- /dev/null +++ b/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_hook_local_commit_1_stdout @@ -0,0 +1,4 @@ +gitlint: checking commit message... +----------------------------------------------- +gitlint: Your commit message contains violations. +Continue with commit anyways (this keeps the current commit message)? [y(es)/n(no)/e(dit)] Editing only possible when --msg-filename is specified. diff --git a/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_hook_no_1_stderr b/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_hook_no_1_stderr new file mode 100644 index 0000000..6d0c9cf --- /dev/null +++ b/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_hook_no_1_stderr @@ -0,0 +1,2 @@ +1: T5 Title contains the word 'WIP' (case-insensitive): "WIP: höok no" +3: B6 Body message is missing diff --git a/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_hook_no_1_stdout b/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_hook_no_1_stdout new file mode 100644 index 0000000..98a83b1 --- /dev/null +++ b/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_hook_no_1_stdout @@ -0,0 +1,8 @@ +gitlint: checking commit message... +----------------------------------------------- +gitlint: Your commit message contains violations. +Continue with commit anyways (this keeps the current commit message)? [y(es)/n(no)/e(dit)] Commit aborted. +Your commit message: +----------------------------------------------- +WIP: höok no +----------------------------------------------- diff --git a/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_hook_no_tty_1_stderr b/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_hook_no_tty_1_stderr new file mode 100644 index 0000000..a8d8760 --- /dev/null +++ b/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_hook_no_tty_1_stderr @@ -0,0 +1,2 @@ +1: T5 Title contains the word 'WIP' (case-insensitive): "WIP: tïtle" +3: B6 Body message is missing diff --git a/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_hook_no_tty_1_stdout b/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_hook_no_tty_1_stdout new file mode 100644 index 0000000..bee014b --- /dev/null +++ b/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_hook_no_tty_1_stdout @@ -0,0 +1,5 @@ +gitlint: checking commit message... +----------------------------------------------- +gitlint: Your commit message contains violations. +Continue with commit anyways (this keeps the current commit message)? [y(es)/n(no)/e(dit)] +Aborted! diff --git a/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_hook_stdin_no_violations_1_stdout b/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_hook_stdin_no_violations_1_stdout new file mode 100644 index 0000000..da1ef0b --- /dev/null +++ b/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_hook_stdin_no_violations_1_stdout @@ -0,0 +1,2 @@ +gitlint: checking commit message... +gitlint: OK (no violations in commit message) diff --git a/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_hook_stdin_violations_1_stderr b/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_hook_stdin_violations_1_stderr new file mode 100644 index 0000000..1404f4a --- /dev/null +++ b/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_hook_stdin_violations_1_stderr @@ -0,0 +1,2 @@ +1: T5 Title contains the word 'WIP' (case-insensitive): "WIP: Test hook stdin tïtle" +3: B6 Body message is missing diff --git a/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_hook_stdin_violations_1_stdout b/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_hook_stdin_violations_1_stdout new file mode 100644 index 0000000..bee014b --- /dev/null +++ b/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_hook_stdin_violations_1_stdout @@ -0,0 +1,5 @@ +gitlint: checking commit message... +----------------------------------------------- +gitlint: Your commit message contains violations. +Continue with commit anyways (this keeps the current commit message)? [y(es)/n(no)/e(dit)] +Aborted! diff --git a/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_hook_yes_1_stderr b/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_hook_yes_1_stderr new file mode 100644 index 0000000..da6f874 --- /dev/null +++ b/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_hook_yes_1_stderr @@ -0,0 +1,2 @@ +1: T5 Title contains the word 'WIP' (case-insensitive): "WIP: höok yes" +3: B6 Body message is missing diff --git a/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_hook_yes_1_stdout b/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_hook_yes_1_stdout new file mode 100644 index 0000000..0414712 --- /dev/null +++ b/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_hook_yes_1_stdout @@ -0,0 +1,4 @@ +gitlint: checking commit message... +----------------------------------------------- +gitlint: Your commit message contains violations. +Continue with commit anyways (this keeps the current commit message)? [y(es)/n(no)/e(dit)]
\ No newline at end of file diff --git a/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_run_hook_negative_1 b/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_run_hook_negative_1 new file mode 100644 index 0000000..9082830 --- /dev/null +++ b/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_run_hook_negative_1 @@ -0,0 +1,2 @@ +gitlint: checking commit message... +{git_repo} is not a git repository. diff --git a/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_run_hook_negative_2 b/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_run_hook_negative_2 new file mode 100644 index 0000000..bafbf29 --- /dev/null +++ b/gitlint-core/gitlint/tests/expected/cli/test_cli_hooks/test_run_hook_negative_2 @@ -0,0 +1,2 @@ +gitlint: checking commit message... +Error: The 'staged' option (--staged) can only be used when using '--msg-filename' or when piping data to gitlint via stdin. |