File: test-cmd

package info (click to toggle)
sqlcipher 4.6.1-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 120,100 kB
  • sloc: ansic: 285,202; tcl: 19,833; javascript: 12,886; java: 8,151; sh: 4,409; yacc: 1,644; makefile: 1,578; cpp: 440; cs: 307; sql: 45
file content (14 lines) | stat: -rwxr-xr-x 364 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh

DB="$AUTOPKGTEST_TMP/data.sqlcipher"

sqlcipher $DB "CREATE TABLE numbers (count integer);"
sqlcipher $DB "INSERT INTO numbers (count) VALUES (1);"

if [ 1 = $(sqlcipher $DB "SELECT COUNT(*) FROM numbers;") ]; then
    echo "success: create, insert and select gave expected result"
    exit 0
else
    echo "failure: Something went wrong"
    exit 1
fi