-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtest_memory.sh
More file actions
executable file
·35 lines (28 loc) · 1.05 KB
/
Copy pathtest_memory.sh
File metadata and controls
executable file
·35 lines (28 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
# Test script to verify memory functionality
echo "Testing memory database..."
# Check if database file exists after running
DB_PATH="$HOME/.config/zed/memories.db"
if [ -f "$DB_PATH" ]; then
echo "✓ Database file exists at: $DB_PATH"
# Check if table exists
TABLE_CHECK=$(sqlite3 "$DB_PATH" "SELECT name FROM sqlite_master WHERE type='table' AND name='memories';" 2>&1)
if [ -n "$TABLE_CHECK" ]; then
echo "✓ memories table exists"
# Count memories
COUNT=$(sqlite3 "$DB_PATH" "SELECT COUNT(*) FROM memories;" 2>&1)
echo "✓ Memory count: $COUNT"
# Show all memories
echo ""
echo "Stored memories:"
sqlite3 "$DB_PATH" "SELECT content FROM memories;" 2>&1
else
echo "✗ memories table does NOT exist"
echo "Database schema:"
sqlite3 "$DB_PATH" ".schema"
fi
else
echo "✗ Database file does NOT exist at: $DB_PATH"
echo "Expected location: $DB_PATH"
ls -la "$HOME/.config/zed/" | grep -i "db\|memory"
fi