all repos — min @ ce1df877b06a6d85b44463b1470e2e6d0e12efc0

A small but practical concatenative programming language.

tests/dstore.min

 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
'test load
'test import

"dstore" describe

  ("dstore.json" dsinit type "dict:datastore" ==) assert
  
  (
    "dstore.json" dsread :ds
    ds "tests"
    {}
      1 %test1
      2 %test2
    dspost dswrite
    "tests" (pop true) dsquery size 1 ==
  ) assert
  
  (
    "dstore.json" dsread :ds
    ds "tests/aaa"
    {}
      1 %test1
      3 %test3
    dsput dswrite
    "tests" (/test1 1 ==) dsquery size 2 ==
  ) assert
  
  (
    "dstore.json" dsread :ds
    ds "tests/aaa" dsdelete
    "tests" (/id "aaa" ==) dsquery size 0 ==
  ) assert
  
  "dstore.json" rm

  report
  clear-stack