summaryrefslogtreecommitdiffstats
path: root/libimagruby/test/test_entries.rb
blob: f10dc64314ece6d639f4d4b467bd83295f2bb829 (plain)
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
#!/usr/bin/env ruby

require "../target/debug/liblibimagruby.so"

color   = true
verbose = true
debug   = false

RImag.init_logger debug, verbose, color

store_handle = RStoreHandle::new(false, "/tmp/store")
id = RStoreId::new_baseless("test")
test_handle = store_handle.retrieve(id)
puts "Header: #{test_handle.header.to_s}"
puts "Content: '#{test_handle.content}'"

test_handle.content = "Foo"
test_handle.header = {
  "imag" => {
    "links" => [],
    "version" => "0.2.0"
  },
  "example" => {
    "test" => "foo"
  }
}