# -*- tcl -*-
#
# This is a sample test set using the low-level (pure tcl) interface
# for inserting and querying tuples into MongoDB.
#
rename load tcl_load
proc load {args} {puts stderr "load $args";::tcl_load {*}$args}

# package require nsf
load /usr/local/ns/lib/nsf2.0b6/libnsf2.0b6.dylib nsf
#load /Users/neumann/src/nsf2.0b4/./libnsf2.0b6.dylib nsf


puts stderr 3
#package require nsf::mongo
load /usr/local/ns/lib/nsfmongo0.2/libnsfmongo0.2.dylib
#load /Users/neumann/src/nsf2.0b4/library/mongodb/libnsfmongo0.2.dylib

puts stderr 4

exit
======== crash
45-170:~/src/nsf2.0b4% /usr/local/ns/bin/tclsh8.5 library/mongodb/tests/t.test
load /usr/local/ns/lib/nsf2.0b6/libnsf2.0b6.dylib nsf
Nsf_Init
InitHashTable 0x104f71640
InitHashTable 0x104f71640 findProc 0x103a59631
3
load /usr/local/ns/lib/nsfmongo0.2/libnsfmongo0.2.dylib
call mutex
create hash entry 0x104ff3640 gridfs findProc 0x0
Segmentation fault: 11


======== no crash
45-170:~/src/nsf2.0b4% export TCLLIBPATH=`pwd`
45-170:~/src/nsf2.0b4% /usr/local/ns/bin/tclsh8.5 library/mongodb/tests/t.test
load /Users/neumann/src/nsf2.0b4/./libnsf2.0b6.dylib nsf
Nsf_Init
InitHashTable 0x110b71640
InitHashTable 0x110b71640 findProc 0x10f677631
3
load /Users/neumann/src/nsf2.0b4/library/mongodb/libnsfmongo0.2.dylib
call mutex
create hash entry 0x110b71640 gridfs findProc 0x10f677631
mutex unlock
call mutex
create hash entry 0x110b71640 gridfile findProc 0x10f677631
mutex unlock
call mutex
create hash entry 0x110b71640 mongo findProc 0x10f677631
mutex unlock
call mutex
create hash entry 0x110b71640 mongo_cursor findProc 0x10f677631
mutex unlock
4
PointerExit 0x110b71640


===============================
45-170:~/src/nsf2.0b4% ls -l  /usr/local/ns/lib/nsf2.0b6/libnsf2.0b6.dylib /Users/neumann/src/nsf2.0b4/./libnsf2.0b6.dylib
-rwxr-xr-x  1 neumann  staff  528772 15 Dez 16:00 /Users/neumann/src/nsf2.0b4/./libnsf2.0b6.dylib
-rwxr-xr-x  1 root     staff  528772 15 Dez 16:00 /usr/local/ns/lib/nsf2.0b6/libnsf2.0b6.dylib
45-170:~/src/nsf2.0b4% md5   /usr/local/ns/lib/nsf2.0b6/libnsf2.0b6.dylib /Users/neumann/src/nsf2.0b4/./libnsf2.0b6.dylib
MD5 (/usr/local/ns/lib/nsf2.0b6/libnsf2.0b6.dylib) = 29935b359b7753f52cf5974ea09a8c44
MD5 (/Users/neumann/src/nsf2.0b4/./libnsf2.0b6.dylib) = 29935b359b7753f52cf5974ea09a8c44



45-170:~/src/nsf2.0b4% ls -l /usr/local/ns/lib/nsfmongo0.2/libnsfmongo0.2.dylib /Users/neumann/src/nsf2.0b4/library/mongodb/libnsfmongo0.2.dylib 
-rwxr-xr-x  1 neumann  staff  80640 14 Dez 21:13 /Users/neumann/src/nsf2.0b4/library/mongodb/libnsfmongo0.2.dylib
-rwxr-xr-x  1 root     staff  80640 15 Dez 16:00 /usr/local/ns/lib/nsfmongo0.2/libnsfmongo0.2.dylib
45-170:~/src/nsf2.0b4% md5  /usr/local/ns/lib/nsfmongo0.2/libnsfmongo0.2.dylib /Users/neumann/src/nsf2.0b4/library/mongodb/libnsfmongo0.2.dylib 
MD5 (/usr/local/ns/lib/nsfmongo0.2/libnsfmongo0.2.dylib) = d8215601eb16ce19b5669f2b40a1f7ff
MD5 (/Users/neumann/src/nsf2.0b4/library/mongodb/libnsfmongo0.2.dylib) = d8215601eb16ce19b5669f2b40a1f7ff


######################################################################
#
# Local variables:
#    mode: tcl
#    tcl-indent-level: 2
#    indent-tabs-mode: nil
# End:

