Add test script to test entry capabilities
This commit is contained in:
parent
c14a3a6e02
commit
c222213291
1 changed files with 27 additions and 0 deletions
27
libimagruby/test/test_entries.rb
Normal file
27
libimagruby/test/test_entries.rb
Normal file
|
@ -0,0 +1,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"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in a new issue