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 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
|
#! /bin/bash
run_test ./drive_sql "select '192.168.1.10' < '192.168.1.2'"
check_output "" <<EOF
Row 0:
Column '192.168.1.10' < '192.168.1.2': 1
EOF
run_test ./drive_sql "select '192.168.1.10' < '192.168.1.2' collate ipaddress"
check_output "" <<EOF
Row 0:
Column '192.168.1.10' < '192.168.1.2' collate ipaddress: 0
EOF
run_test ./drive_sql "select '::ffff:192.168.1.10' = '192.168.1.10' collate ipaddress"
check_output "" <<EOF
Row 0:
Column '::ffff:192.168.1.10' = '192.168.1.10' collate ipaddress: 1
EOF
run_test ./drive_sql "select 'fe80::a85f:80b4:5cbe:8691' = 'fe80:0000:0000:0000:a85f:80b4:5cbe:8691' collate ipaddress"
check_output "" <<EOF
Row 0:
Column 'fe80::a85f:80b4:5cbe:8691' = 'fe80:0000:0000:0000:a85f:80b4:5cbe:8691' collate ipaddress: 1
EOF
run_test ./drive_sql "select '' < '192.168.1.2' collate ipaddress"
check_output "" <<EOF
Row 0:
Column '' < '192.168.1.2' collate ipaddress: 1
EOF
run_test ./drive_sql "select '192.168.1.2' > '' collate ipaddress"
check_output "" <<EOF
Row 0:
Column '192.168.1.2' > '' collate ipaddress: 1
EOF
run_test ./drive_sql "select '192.168.1.2' < 'fe80::a85f:80b4:5cbe:8691' collate ipaddress"
check_output "" <<EOF
Row 0:
Column '192.168.1.2' < 'fe80::a85f:80b4:5cbe:8691' collate ipaddress: 1
EOF
run_test ./drive_sql "select 'h9.example.com' < 'h10.example.com' collate ipaddress"
check_output "" <<EOF
Row 0:
Column 'h9.example.com' < 'h10.example.com' collate ipaddress: 1
EOF
run_test ./drive_sql "select 'file10.txt' < 'file2.txt'"
check_output "" <<EOF
Row 0:
Column 'file10.txt' < 'file2.txt': 1
EOF
run_test ./drive_sql "select 'file10.txt' < 'file2.txt' collate naturalcase"
check_output "" <<EOF
Row 0:
Column 'file10.txt' < 'file2.txt' collate naturalcase: 0
EOF
run_test ./drive_sql "select 'w' < 'e' collate loglevel"
check_output "" <<EOF
Row 0:
Column 'w' < 'e' collate loglevel: 1
EOF
run_test ./drive_sql "select 'e' < 'w' collate loglevel"
check_output "" <<EOF
Row 0:
Column 'e' < 'w' collate loglevel: 0
EOF
run_test ./drive_sql "select 'info' collate loglevel between 'trace' and 'fatal'"
check_output "" <<EOF
Row 0:
Column 'info' collate loglevel between 'trace' and 'fatal': 1
EOF
|