Shrink shell help msg and replace hardcoded path for shell tests

This commit is contained in:
PThorpe92 2024-12-16 20:14:04 -05:00
parent 66c44a021f
commit 1833dcb618
No known key found for this signature in database
GPG key ID: 66DB3FBACBDD05CC
4 changed files with 13 additions and 10 deletions

View file

@ -61,7 +61,7 @@ test: limbo test-compat test-sqlite3 test-shell
.PHONY: test
test-shell: limbo
./testing/shelltests.py
SQLITE_EXEC=$(SQLITE_EXEC) ./testing/shelltests.py
.PHONY: test-shell
test-compat:

View file

@ -646,7 +646,6 @@ fn get_io(db: &str) -> anyhow::Result<Arc<dyn limbo_core::IO>> {
const HELP_MSG: &str = r#"
Limbo SQL Shell Help
==============
Welcome to the Limbo SQL Shell! You can execute any standard SQL command here.
In addition to standard SQL commands, the following special commands are available:
@ -689,12 +688,6 @@ Usage Examples:
8. Show the current values of settings:
.show
9. Set the value 'NULL' to be displayed for null values instead of empty string:
.nullvalue "NULL"
Note:
-----
- All SQL commands must end with a semicolon (;).
- Special commands do not require a semicolon.
"#;
- Special commands do not require a semicolon."#;

View file

@ -217,6 +217,8 @@ pub fn exprs_are_equivalent(expr1: &Expr, expr2: &Expr) -> bool {
_ => false,
}
}
(Expr::NotNull(expr1), Expr::NotNull(expr2)) => exprs_are_equivalent(expr1, expr2),
(Expr::IsNull(expr1), Expr::IsNull(expr2)) => exprs_are_equivalent(expr1, expr2),
(Expr::Literal(lit1), Expr::Literal(lit2)) => check_literal_equivalency(lit1, lit2),
(Expr::Id(id1), Expr::Id(id2)) => check_ident_equivalency(&id1.0, &id2.0),
(Expr::Unary(op1, expr1), Expr::Unary(op2, expr2)) => {
@ -233,6 +235,14 @@ pub fn exprs_are_equivalent(expr1: &Expr, expr2: &Expr) -> bool {
(Expr::Parenthesized(exprs1), exprs2) | (exprs2, Expr::Parenthesized(exprs1)) => {
exprs1.len() == 1 && exprs_are_equivalent(&exprs1[0], exprs2)
}
(Expr::Qualified(tn1, cn1), Expr::Qualified(tn2, cn2)) => {
check_ident_equivalency(&tn1.0, &tn2.0) && check_ident_equivalency(&cn1.0, &cn2.0)
}
(Expr::DoublyQualified(sn1, tn1, cn1), Expr::DoublyQualified(sn2, tn2, cn2)) => {
check_ident_equivalency(&sn1.0, &sn2.0)
&& check_ident_equivalency(&tn1.0, &tn2.0)
&& check_ident_equivalency(&cn1.0, &cn2.0)
}
(
Expr::InList {
lhs: lhs1,

View file

@ -3,7 +3,7 @@ import os
import subprocess
# Configuration
sqlite_exec = "./target/debug/limbo"
sqlite_exec = os.getenv("SQLITE_EXEC", "./target/debug/limbo")
cwd = os.getcwd()
# Initial setup commands