diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2021-02-28 11:04:52 +0100 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2021-02-28 11:04:52 +0100 |
| commit | b6eb06aeee0fda77395d7b3172c44b999b70cdee (patch) | |
| tree | 9e29f32a94df7340fcc335e1740062003be393cd /minishell_test/suites/flow.py | |
| parent | 348da189c00bdef866d2b597ea0250fc0f0e88dc (diff) | |
| download | minishell_test-b6eb06aeee0fda77395d7b3172c44b999b70cdee.tar.gz minishell_test-b6eb06aeee0fda77395d7b3172c44b999b70cdee.tar.bz2 minishell_test-b6eb06aeee0fda77395d7b3172c44b999b70cdee.zip | |
Refactoring config in a class to have a testable environment
Diffstat (limited to 'minishell_test/suites/flow.py')
| -rw-r--r-- | minishell_test/suites/flow.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/minishell_test/suites/flow.py b/minishell_test/suites/flow.py index aa6d395..ff3b51f 100644 --- a/minishell_test/suites/flow.py +++ b/minishell_test/suites/flow.py @@ -10,7 +10,7 @@ # # # ############################################################################ # -from minishell_test import config +from minishell_test.config import Config from minishell_test.suite.decorator import suite from minishell_test.hooks import ( error_line0, @@ -241,10 +241,10 @@ def suite_syntax_error(test): test("> a ; a", hook=error_line0) test("< a ; a", hook=error_line0) test(">> a ; a", hook=error_line0) - test(config.LOREM + " > >" + config.LOREM, hook=error_line0, hook_status=platform_status(2, 1)) - test(config.LOREM + " < <" + config.LOREM, hook=error_line0, hook_status=platform_status(2, 1)) - test(config.LOREM + " ; |" + config.LOREM, hook=error_line0, hook_status=platform_status(2, 1)) - test(config.LOREM + " | ;" + config.LOREM, hook=error_line0, hook_status=platform_status(2, 1)) + test(Config.lorem + " > >" + Config.lorem, hook=error_line0, hook_status=platform_status(2, 1)) + test(Config.lorem + " < <" + Config.lorem, hook=error_line0, hook_status=platform_status(2, 1)) + test(Config.lorem + " ; |" + Config.lorem, hook=error_line0, hook_status=platform_status(2, 1)) + test(Config.lorem + " | ;" + Config.lorem, hook=error_line0, hook_status=platform_status(2, 1)) @suite(bonus=True) @@ -289,8 +289,8 @@ def suite_syntax_error_bonus(test): test("() a", hook=error_line0, hook_status=platform_status(2, 1)) test("( a", hook=[error_line0, error_eof_to_expected_token], hook_status=platform_status(2, 1)) test(") a", hook=error_line0, hook_status=platform_status(2, 1)) - test(config.LOREM + " && &&" + config.LOREM, hook=error_line0, hook_status=platform_status(2, 1)) - test(config.LOREM + " || ||" + config.LOREM, hook=error_line0, hook_status=platform_status(2, 1)) - test(config.LOREM + " ( (" + config.LOREM, hook=error_line0, hook_status=platform_status(2, 1)) - test(config.LOREM + " ) )" + config.LOREM, hook=error_line0, hook_status=platform_status(2, 1)) + test(Config.lorem + " && &&" + Config.lorem, hook=error_line0, hook_status=platform_status(2, 1)) + test(Config.lorem + " || ||" + Config.lorem, hook=error_line0, hook_status=platform_status(2, 1)) + test(Config.lorem + " ( (" + Config.lorem, hook=error_line0, hook_status=platform_status(2, 1)) + test(Config.lorem + " ) )" + Config.lorem, hook=error_line0, hook_status=platform_status(2, 1)) test("(); () ;() ;() ;() ;() ;() ;() ;() ;() ;a", hook=error_line0, hook_status=platform_status(2, 1)) |
