summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-06-19 06:58:18 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-06-19 06:58:30 +0000
commite6b4d00e3a586be753c3d457c5153380392bda32 (patch)
treefbc8f90eeef85df9cb68bc200fe801f1eba55c4d /tests
parentReleasing debian version 1.8.0-1. (diff)
downloadlitecli-e6b4d00e3a586be753c3d457c5153380392bda32.tar.xz
litecli-e6b4d00e3a586be753c3d457c5153380392bda32.zip
Merging upstream version 1.9.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/liteclirc8
-rw-r--r--tests/test_dbspecial.py11
2 files changed, 19 insertions, 0 deletions
diff --git a/tests/liteclirc b/tests/liteclirc
index 979b409..da9b061 100644
--- a/tests/liteclirc
+++ b/tests/liteclirc
@@ -51,6 +51,10 @@ key_bindings = emacs
# Enabling this option will show the suggestions in a wider menu. Thus more items are suggested.
wider_completion_menu = False
+# Autocompletion is on by default. This can be truned off by setting this
+# option to False. Pressing tab will still trigger completion.
+autocompletion = True
+
# litecli prompt
# \D - The full current date
# \d - Database name
@@ -61,9 +65,13 @@ wider_completion_menu = False
# \R - The current time, in 24-hour military time (0-23)
# \r - The current time, standard 12-hour time (1-12)
# \s - Seconds of the current time
+# \x1b[...m - insert ANSI escape sequence
prompt = "\t :\d> "
prompt_continuation = "-> "
+# Show/hide the informational toolbar with function keymap at the footer.
+show_bottom_toolbar = True
+
# Skip intro info on startup and outro info on exit
less_chatty = False
diff --git a/tests/test_dbspecial.py b/tests/test_dbspecial.py
index c7065a9..5128b5b 100644
--- a/tests/test_dbspecial.py
+++ b/tests/test_dbspecial.py
@@ -63,3 +63,14 @@ def test_format_uptime():
seconds = 522600
assert "6 days 1 hour 10 min 0 sec" == format_uptime(seconds)
+
+
+def test_indexes():
+ suggestions = suggest_type(".indexes", ".indexes ")
+ assert sorted_dicts(suggestions) == sorted_dicts(
+ [
+ {"type": "table", "schema": []},
+ {"type": "view", "schema": []},
+ {"type": "schema"},
+ ]
+ )