Skip to content

Commit 079173c

Browse files
committed
snapshot tests
1 parent af11a75 commit 079173c

File tree

3 files changed

+328
-0
lines changed

3 files changed

+328
-0
lines changed
Lines changed: 304 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,304 @@
1+
.bail on
2+
3+
select sqlite_version();
4+
┌──────────────────┐
5+
│ sqlite_version() │
6+
├──────────────────┤
7+
│ '3.47.0' │
8+
└──────────────────┘
9+
10+
select vec_version();
11+
┌───────────────┐
12+
│ vec_version() │
13+
├───────────────┤
14+
│ 'v0.1.6' │
15+
└───────────────┘
16+
17+
select lembed_version();
18+
┌──────────────────┐
19+
│ lembed_version() │
20+
├──────────────────┤
21+
│ 'v0.0.1-alpha.8' │
22+
└──────────────────┘
23+
24+
select lines_version();
25+
┌─────────────────┐
26+
│ lines_version() │
27+
├─────────────────┤
28+
│ 'TODO' │
29+
└─────────────────┘
30+
31+
select name from pragma_function_list order by name;
32+
┌─────────────────────────────┐
33+
│ name │
34+
├─────────────────────────────┤
35+
│ '->' │
36+
│ '->>' │
37+
│ '_lembed_api' │
38+
│ 'abs' │
39+
│ 'avg' │
40+
│ 'base64' │
41+
│ 'base85' │
42+
│ 'changes' │
43+
│ 'char' │
44+
│ 'coalesce' │
45+
│ 'concat' │
46+
│ 'concat_ws' │
47+
│ 'count' │
48+
│ 'count' │
49+
│ 'cume_dist' │
50+
│ 'current_date' │
51+
│ 'current_time' │
52+
│ 'current_timestamp' │
53+
│ 'date' │
54+
│ 'datetime' │
55+
│ 'decimal' │
56+
│ 'decimal_add' │
57+
│ 'decimal_cmp' │
58+
│ 'decimal_exp' │
59+
│ 'decimal_mul' │
60+
│ 'decimal_pow2' │
61+
│ 'decimal_sub' │
62+
│ 'decimal_sum' │
63+
│ 'dense_rank' │
64+
│ 'dtostr' │
65+
│ 'dtostr' │
66+
│ 'edit' │
67+
│ 'edit' │
68+
│ 'embedfile_version' │
69+
│ 'first_value' │
70+
│ 'format' │
71+
│ 'glob' │
72+
│ 'group_concat' │
73+
│ 'group_concat' │
74+
│ 'hex' │
75+
│ 'ieee754' │
76+
│ 'ieee754' │
77+
│ 'ieee754_exponent' │
78+
│ 'ieee754_from_blob' │
79+
│ 'ieee754_inc' │
80+
│ 'ieee754_mantissa' │
81+
│ 'ieee754_to_blob' │
82+
│ 'ifnull' │
83+
│ 'iif' │
84+
│ 'instr' │
85+
│ 'json' │
86+
│ 'json_array' │
87+
│ 'json_array_length' │
88+
│ 'json_array_length' │
89+
│ 'json_error_position' │
90+
│ 'json_extract' │
91+
│ 'json_group_array' │
92+
│ 'json_group_object' │
93+
│ 'json_insert' │
94+
│ 'json_object' │
95+
│ 'json_patch' │
96+
│ 'json_pretty' │
97+
│ 'json_pretty' │
98+
│ 'json_quote' │
99+
│ 'json_remove' │
100+
│ 'json_replace' │
101+
│ 'json_set' │
102+
│ 'json_type' │
103+
│ 'json_type' │
104+
│ 'json_valid' │
105+
│ 'json_valid' │
106+
│ 'jsonb' │
107+
│ 'jsonb_array' │
108+
│ 'jsonb_extract' │
109+
│ 'jsonb_group_array' │
110+
│ 'jsonb_group_object' │
111+
│ 'jsonb_insert' │
112+
│ 'jsonb_object' │
113+
│ 'jsonb_patch' │
114+
│ 'jsonb_remove' │
115+
│ 'jsonb_replace' │
116+
│ 'jsonb_set' │
117+
│ 'julianday' │
118+
│ 'lag' │
119+
│ 'lag' │
120+
│ 'lag' │
121+
│ 'last_insert_rowid' │
122+
│ 'last_value' │
123+
│ 'lead' │
124+
│ 'lead' │
125+
│ 'lead' │
126+
│ 'lembed' │
127+
│ 'lembed' │
128+
│ 'lembed_context_options' │
129+
│ 'lembed_debug' │
130+
│ 'lembed_model_from_file' │
131+
│ 'lembed_model_options' │
132+
│ 'lembed_token_score' │
133+
│ 'lembed_token_to_piece' │
134+
│ 'lembed_tokenize_json' │
135+
│ 'lembed_tokenize_json' │
136+
│ 'lembed_version' │
137+
│ 'length' │
138+
│ 'like' │
139+
│ 'like' │
140+
│ 'likelihood' │
141+
│ 'likely' │
142+
│ 'lines_debug' │
143+
│ 'lines_version' │
144+
│ 'load_extension' │
145+
│ 'load_extension' │
146+
│ 'lower' │
147+
│ 'lsmode' │
148+
│ 'ltrim' │
149+
│ 'ltrim' │
150+
│ 'match' │
151+
│ 'max' │
152+
│ 'max' │
153+
│ 'median' │
154+
│ 'min' │
155+
│ 'min' │
156+
│ 'nth_value' │
157+
│ 'ntile' │
158+
│ 'nullif' │
159+
│ 'octet_length' │
160+
│ 'percent_rank' │
161+
│ 'percentile' │
162+
│ 'percentile_cont' │
163+
│ 'percentile_disc' │
164+
│ 'printf' │
165+
│ 'quote' │
166+
│ 'random' │
167+
│ 'randomblob' │
168+
│ 'rank' │
169+
│ 'readfile' │
170+
│ 'regexp' │
171+
│ 'regexpi' │
172+
│ 'replace' │
173+
│ 'round' │
174+
│ 'round' │
175+
│ 'row_number' │
176+
│ 'rtrim' │
177+
│ 'rtrim' │
178+
│ 'sha1' │
179+
│ 'sha1_query' │
180+
│ 'sha1b' │
181+
│ 'sha3' │
182+
│ 'sha3' │
183+
│ 'sha3_agg' │
184+
│ 'sha3_agg' │
185+
│ 'sha3_query' │
186+
│ 'sha3_query' │
187+
│ 'shell_add_schema' │
188+
│ 'shell_module_schema' │
189+
│ 'shell_putsnl' │
190+
│ 'sign' │
191+
│ 'sqlite_compileoption_get' │
192+
│ 'sqlite_compileoption_used' │
193+
│ 'sqlite_log' │
194+
│ 'sqlite_source_id' │
195+
│ 'sqlite_version' │
196+
│ 'stmtrand' │
197+
│ 'stmtrand' │
198+
│ 'strftime' │
199+
│ 'string_agg' │
200+
│ 'strtod' │
201+
│ 'substr' │
202+
│ 'substr' │
203+
│ 'substring' │
204+
│ 'substring' │
205+
│ 'subtype' │
206+
│ 'sum' │
207+
│ 'time' │
208+
│ 'timediff' │
209+
│ 'total' │
210+
│ 'total_changes' │
211+
│ 'trim' │
212+
│ 'trim' │
213+
│ 'typeof' │
214+
│ 'unhex' │
215+
│ 'unhex' │
216+
│ 'unicode' │
217+
│ 'unixepoch' │
218+
│ 'unlikely' │
219+
│ 'upper' │
220+
│ 'usleep' │
221+
│ 'vec_add' │
222+
│ 'vec_bit' │
223+
│ 'vec_debug' │
224+
│ 'vec_distance_cosine' │
225+
│ 'vec_distance_hamming' │
226+
│ 'vec_distance_l1' │
227+
│ 'vec_distance_l2' │
228+
│ 'vec_f32' │
229+
│ 'vec_int8' │
230+
│ 'vec_length' │
231+
│ 'vec_normalize' │
232+
│ 'vec_quantize_binary' │
233+
│ 'vec_quantize_int8' │
234+
│ 'vec_slice' │
235+
│ 'vec_sub' │
236+
│ 'vec_to_json' │
237+
│ 'vec_type' │
238+
│ 'vec_version' │
239+
│ 'writefile' │
240+
│ 'zeroblob' │
241+
└─────────────────────────────┘
242+
243+
select name from pragma_module_list order by name;
244+
┌────────────────────────┐
245+
│ name │
246+
├────────────────────────┤
247+
│ 'completion' │
248+
│ 'csv' │
249+
│ 'fsdir' │
250+
│ 'generate_series' │
251+
│ 'json_each' │
252+
│ 'json_tree' │
253+
│ 'lembed_batch' │
254+
│ 'lembed_models' │
255+
│ 'lines' │
256+
│ 'lines_read' │
257+
│ 'pragma_function_list' │
258+
│ 'pragma_module_list' │
259+
│ 'vec0' │
260+
│ 'vec_each' │
261+
└────────────────────────┘
262+
263+
select compile_options from pragma_compile_options order by 1;
264+
┌───────────────────────────────────┐
265+
│ compile_options │
266+
├───────────────────────────────────┤
267+
│ 'ATOMIC_INTRINSICS=1' │
268+
│ 'COMPILER=clang-19.1.0' │
269+
│ 'DEFAULT_AUTOVACUUM' │
270+
│ 'DEFAULT_CACHE_SIZE=-2000' │
271+
│ 'DEFAULT_FILE_FORMAT=4' │
272+
│ 'DEFAULT_JOURNAL_SIZE_LIMIT=-1' │
273+
│ 'DEFAULT_MMAP_SIZE=0' │
274+
│ 'DEFAULT_PAGE_SIZE=4096' │
275+
│ 'DEFAULT_PCACHE_INITSZ=20' │
276+
│ 'DEFAULT_RECURSIVE_TRIGGERS' │
277+
│ 'DEFAULT_SECTOR_SIZE=4096' │
278+
│ 'DEFAULT_SYNCHRONOUS=2' │
279+
│ 'DEFAULT_WAL_AUTOCHECKPOINT=1000' │
280+
│ 'DEFAULT_WAL_SYNCHRONOUS=2' │
281+
│ 'DEFAULT_WORKER_THREADS=0' │
282+
│ 'DIRECT_OVERFLOW_READ' │
283+
│ 'MALLOC_SOFT_LIMIT=1024' │
284+
│ 'MAX_ATTACHED=10' │
285+
│ 'MAX_COLUMN=2000' │
286+
│ 'MAX_COMPOUND_SELECT=500' │
287+
│ 'MAX_DEFAULT_PAGE_SIZE=8192' │
288+
│ 'MAX_EXPR_DEPTH=1000' │
289+
│ 'MAX_FUNCTION_ARG=127' │
290+
│ 'MAX_LENGTH=1000000000' │
291+
│ 'MAX_LIKE_PATTERN_LENGTH=50000' │
292+
│ 'MAX_MMAP_SIZE=0' │
293+
│ 'MAX_PAGE_COUNT=0xfffffffe' │
294+
│ 'MAX_PAGE_SIZE=65536' │
295+
│ 'MAX_SQL_LENGTH=1000000000' │
296+
│ 'MAX_TRIGGER_DEPTH=1000' │
297+
│ 'MAX_VARIABLE_NUMBER=32766' │
298+
│ 'MAX_VDBE_OP=250000000' │
299+
│ 'MAX_WORKER_THREADS=8' │
300+
│ 'MUTEX_PTHREADS' │
301+
│ 'SYSTEM_MALLOC' │
302+
│ 'TEMP_STORE=1' │
303+
│ 'THREADSAFE=1' │
304+
└───────────────────────────────────┘

llama.cpp/embedfile/tests/env.sql

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
.mode qbox
2+
.header on
3+
.echo on
4+
.bail on
5+
6+
select sqlite_version();
7+
8+
select vec_version();
9+
10+
select lembed_version();
11+
12+
select lines_version();
13+
14+
select name from pragma_function_list order by name;
15+
16+
select name from pragma_module_list order by name;
17+
18+
select compile_options from pragma_compile_options order by 1;
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
3+
TESTS_DIR=$(dirname "$(realpath "$0")")
4+
EMBEDFILE=$(realpath "$TESTS_DIR/../../../o/llama.cpp/embedfile/embedfile")
5+
6+
"$EMBEDFILE" sh < $TESTS_DIR/env.sql > $TESTS_DIR/__snapshots__/env.out

0 commit comments

Comments
 (0)