head 1.2; access; symbols RPM_4_2_1:1.1.1.4 RPM_4_2:1.1.1.4 RPM_4_1_1:1.1.1.4 RPM_4_1:1.1.1.3 RPM_4_0_5:1.1.1.2 RPM_4_0_4:1.1.1.1 RPM:1.1.1; locks; strict; comment @# @; 1.2 date 2008.01.02.09.59.02; author rse; state dead; branches; next 1.1; commitid z4cpSiAhOCXk5PLs; 1.1 date 2002.01.07.22.31.02; author rse; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2002.01.07.22.31.02; author rse; state Exp; branches; next 1.1.1.2; 1.1.1.2 date 2003.01.18.13.49.11; author rse; state Exp; branches; next 1.1.1.3; 1.1.1.3 date 2001.10.15.03.47.28; author rse; state Exp; branches; next 1.1.1.4; 1.1.1.4 date 2003.01.18.14.05.14; author rse; state Exp; branches; next ; desc @@ 1.2 log @remove the ancient RPM 4.2.1 source tree copy @ text @# See the file LICENSE for redistribution information. # # Copyright (c) 2001 # Sleepycat Software. All rights reserved. # # Id: rsrc004.tcl,v 11.2 2001/08/03 16:39:29 bostic Exp # # TEST rsrc004 # TEST Recno backing file test for EOF-terminated records. proc rsrc004 { } { source ./include.tcl foreach isfixed { 0 1 } { cleanup $testdir NULL # Create the backing text file. set oid1 [open $testdir/rsrc.txt w] if { $isfixed == 1 } { puts -nonewline $oid1 "record 1xxx" puts -nonewline $oid1 "record 2xxx" } else { puts $oid1 "record 1xxx" puts $oid1 "record 2xxx" } puts -nonewline $oid1 "record 3" close $oid1 set args "-create -mode 0644 -recno -source $testdir/rsrc.txt" if { $isfixed == 1 } { append args " -len [string length "record 1xxx"]" set match "record 3 " puts "Rsrc004: EOF-terminated recs: fixed length" } else { puts "Rsrc004: EOF-terminated recs: variable length" set match "record 3" } puts "\tRsrc004.a: Read file, verify correctness." set db [eval berkdb_open $args "$testdir/rsrc004.db"] error_check_good dbopen [is_valid_db $db] TRUE # Read the last record set dbc [eval {$db cursor} ""] error_check_good db_cursor [is_valid_cursor $dbc $db] TRUE set rec [$dbc get -last] error_check_good get_last $rec [list [list 3 $match]] error_check_good dbc_close [$dbc close] 0 error_check_good db_close [$db close] 0 } } @ 1.1 log @Initial revision @ text @@ 1.1.1.1 log @Import: RPM 4.0.4 @ text @@ 1.1.1.2 log @Import: RPM 4.0.5 @ text @d3 1 a3 1 # Copyright (c) 2001-2002 d6 1 a6 1 # Id: rsrc004.tcl,v 11.3 2002/01/11 15:53:33 bostic Exp @ 1.1.1.3 log @Import: RPM 4.1 @ text @d3 1 a3 1 # Copyright (c) 2001 d6 1 a6 1 # Id: rsrc004.tcl,v 11.2 2001/08/03 16:39:29 bostic Exp @ 1.1.1.4 log @Import: RPM 4.1.1 @ text @d3 1 a3 1 # Copyright (c) 2001-2002 d6 1 a6 1 # Id: rsrc004.tcl,v 11.3 2002/01/11 15:53:33 bostic Exp @