(test)
| 187 | |
| 188 | @pytest.mark.parametrize("test", ["multiline", "singleline"], indirect=True) |
| 189 | def test_tab_complete(test) -> None: |
| 190 | # test tab complete search and go to end of line |
| 191 | test.send_finished_statement("RETURN databases;\r") |
| 192 | assert ( |
| 193 | test.shell_process.expect_exact( |
| 194 | [ |
| 195 | "Error: Binder exception: Variable databases is not in scope.", |
| 196 | pexpect.EOF, |
| 197 | ], |
| 198 | ) |
| 199 | == 0 |
| 200 | ) |
| 201 | test.send_control_statement(KEY_ACTION.CTRL_R.value) |
| 202 | test.send_statement("databases") |
| 203 | test.send_statement(KEY_ACTION.TAB.value) |
| 204 | test.send_statement(KEY_ACTION.BACKSPACE.value) # remove semicolon |
| 205 | test.send_statement("\x1b[D" * 9) |
| 206 | test.send_statement('"\x1b[F') |
| 207 | test.send_finished_statement(' rule" AS a;\r') |
| 208 | assert ( |
| 209 | test.shell_process.expect_exact(["\u2502 databases rule \u2502", pexpect.EOF]) |
| 210 | == 0 |
| 211 | ) |
| 212 | |
| 213 | |
| 214 | @pytest.mark.parametrize("test", ["multiline", "singleline"], indirect=True) |
nothing calls this directly
no test coverage detected