(base_app, request)
| 505 | |
| 506 | |
| 507 | def test_runcmds_plus_hooks(base_app, request) -> None: |
| 508 | test_dir = os.path.dirname(request.module.__file__) |
| 509 | prefilepath = os.path.join(test_dir, "scripts", "precmds.txt") |
| 510 | postfilepath = os.path.join(test_dir, "scripts", "postcmds.txt") |
| 511 | |
| 512 | base_app.runcmds_plus_hooks(["run_script " + prefilepath, "help", "shortcuts", "run_script " + postfilepath]) |
| 513 | expected = f""" |
| 514 | run_script {prefilepath} |
| 515 | set allow_style Always |
| 516 | help |
| 517 | shortcuts |
| 518 | run_script {postfilepath} |
| 519 | set allow_style Terminal""" |
| 520 | |
| 521 | out, _err = run_cmd(base_app, "history -s") |
| 522 | assert out == normalize(expected) |
| 523 | |
| 524 | |
| 525 | def test_runcmds_plus_hooks_ctrl_c(base_app, capsys) -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…