~ubuntu-branches/ubuntu/wily/sqlite3/wily

« back to all changes in this revision

Viewing changes to test/quota2.test

  • Committer: Package Import Robot
  • Author(s): Laszlo Boszormenyi (GCS)
  • Date: 2012-06-13 21:43:48 UTC
  • mfrom: (0.34.1) (0.32.2) (9.1.36 sid)
  • Revision ID: package-import@ubuntu.com-20120613214348-2pg18uml05o7h2k5
Tags: 3.7.13-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
 
13
13
set testdir [file dirname $argv0]
14
14
source $testdir/tester.tcl
 
15
 
 
16
# If SQLITE_CURDIR is not defined, omit this file.
 
17
ifcapable !curdir {
 
18
  finish_test
 
19
  return
 
20
}
 
21
 
15
22
source $testdir/malloc_common.tcl
16
23
 
17
24
db close
164
171
do_test quota2-2.2 {
165
172
  set ::quota
166
173
} {}
167
 
do_test quota2-2.3 {
 
174
do_test quota2-2.3.1 {
168
175
  sqlite3_quota_rewind $::h1
 
176
  sqlite3_quota_file_available $::h1
 
177
} {7000}
 
178
do_test quota2-2.3.2 {
169
179
  set ::x [sqlite3_quota_fread $::h1 1001 7]
170
180
  string length $::x
171
181
} {6006}
 
182
do_test quota2-2.3.3 {
 
183
  sqlite3_quota_file_available $::h1
 
184
} {0}
172
185
do_test quota2-2.4 {
173
186
  string match $::x [string range $::bigtext 0 6005]
174
187
} {1}
180
193
  sqlite3_quota_fseek $::h1 -100 SEEK_END
181
194
  sqlite3_quota_ftell $::h1
182
195
} {6900}
 
196
do_test quota2-2.6.1 {
 
197
  sqlite3_quota_file_available $::h1
 
198
} {100}
183
199
do_test quota2-2.7 {
184
200
  sqlite3_quota_fseek $::h1 -100 SEEK_CUR
185
201
  sqlite3_quota_ftell $::h1
186
202
} {6800}
 
203
do_test quota2-2.7.1 {
 
204
  sqlite3_quota_file_available $::h1
 
205
} {200}
187
206
do_test quota2-2.8 {
188
207
  sqlite3_quota_fseek $::h1 50 SEEK_CUR
189
208
  sqlite3_quota_ftell $::h1
190
209
} {6850}
 
210
do_test quota2-2.8.1 {
 
211
  sqlite3_quota_file_available $::h1
 
212
} {150}
191
213
do_test quota2-2.9 {
192
214
  sqlite3_quota_fseek $::h1 50 SEEK_SET
193
215
  sqlite3_quota_ftell $::h1
194
216
} {50}
 
217
do_test quota2-2.9.1 {
 
218
  sqlite3_quota_file_available $::h1
 
219
} {6950}
195
220
do_test quota2-2.10 {
196
221
  sqlite3_quota_rewind $::h1
197
222
  sqlite3_quota_ftell $::h1
198
223
} {0}
 
224
do_test quota2-2.10.1 {
 
225
  sqlite3_quota_file_available $::h1
 
226
} {7000}
 
227
do_test quota2-2.10.2 {
 
228
  sqlite3_quota_ferror $::h1
 
229
} {0}
199
230
do_test quota2-2.11 {
200
231
  standard_path [sqlite3_quota_dump]
201
232
} {{*/quota2b/* 5000 0} {*/quota2a/* 4000 0}}