X-Git-Url: https://git.jsancho.org/?p=bongodb.git;a=blobdiff_plain;f=tests%2Fsample.scm;fp=tests%2Fsample.scm;h=bd2cc6ef407a1de2acae76b126a25b661aff0edb;hp=5054ffeab15680c003ec607677ba94d4d96920c0;hb=a5972febd232c4afd64499826c7faab85a10ee03;hpb=07eed7138a1b4aecb9d8ae0926ba22dc82ebe94e diff --git a/tests/sample.scm b/tests/sample.scm index 5054ffe..bd2cc6e 100644 --- a/tests/sample.scm +++ b/tests/sample.scm @@ -32,12 +32,16 @@ (test-eqv 3 (count col)) ; Search -(test-eqv 3 (length (find col))) +(test-eqv 3 (length (find col #t))) (test-eqv 2 (length (find col ($eq 'a 1)))) -(test-eqv 1 (length (find col ($eq 'a 1) ($eq 'b 2)))) -(test-eqv 0 (length (find col ($eq 'a "test")))) +(test-eqv 1 (length (find col ($and ($eq 'a 1) ($eq 'b 2))))) +(test-eqv 0 (length (find col ($eq 'c "test")))) (test-eqv 2 (length (find col ($exists 'b)))) (test-eqv 2 (length (find col ($not ($exists 'c))))) +; Update +(set! col (update col ($exists 'c) ($set 'c "test"))) +(test-eqv 1 (length (find col ($eq 'c "test")))) + (test-end "bongodb")