From ead81c943658ca1e4f64da871552b59d6bfd06df Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sat, 4 Feb 2017 12:31:16 +0100 Subject: [PATCH] Remove self scripted tests --- libimagruby/test/test_entries.rb | 27 --------------- libimagruby/test/test_ruby.rb | 58 -------------------------------- libimagruby/test/test_store.rb | 16 --------- 3 files changed, 101 deletions(-) delete mode 100644 libimagruby/test/test_entries.rb delete mode 100644 libimagruby/test/test_ruby.rb delete mode 100644 libimagruby/test/test_store.rb diff --git a/libimagruby/test/test_entries.rb b/libimagruby/test/test_entries.rb deleted file mode 100644 index f10dc643..00000000 --- a/libimagruby/test/test_entries.rb +++ /dev/null @@ -1,27 +0,0 @@ -#!/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" - } -} - diff --git a/libimagruby/test/test_ruby.rb b/libimagruby/test/test_ruby.rb deleted file mode 100644 index 9b088594..00000000 --- a/libimagruby/test/test_ruby.rb +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/env ruby - -require "../target/debug/liblibimagruby.so" - -color = true -verbose = true -debug = true - -RImag.init_logger debug, verbose, color - -RImag.trace "Trace-Hello from Ruby" -RImag.dbg "Debug-Hello from Ruby" -RImag.debug "Debug-Hello from Ruby" -RImag.info "Info-Hello from Ruby" -RImag.warn "Warn-Hello from Ruby" -RImag.error "Error-Hello from Ruby" - -def works name, b - if b - RImag.info "Works: #{name}" - else - RImag.error "Fails: #{name}" - end -end - -def has_instance_method klass, meth - works "#{klass}.instance_methods.include? #{meth}", - (klass.instance_methods.include? meth) -end - -puts "---" - -works "RStoreId.new_baseless", (not RStoreId.new_baseless("test").nil?) - -works "RStoreHandle.respond_to? :new", (RStoreHandle.respond_to? :new) - -has_instance_method RStoreHandle, :create -has_instance_method RStoreHandle, :get -has_instance_method RStoreHandle, :retrieve -has_instance_method RStoreHandle, :delete -has_instance_method RStoreHandle, :update -has_instance_method RStoreHandle, :move_by_id -has_instance_method RStoreHandle, :save_as -has_instance_method RStoreHandle, :save_to - -has_instance_method RFileLockEntryHandle, :content -has_instance_method RFileLockEntryHandle, :content= -has_instance_method RFileLockEntryHandle, :header -has_instance_method RFileLockEntryHandle, :header= - -has_instance_method REntryHeader, :read -has_instance_method REntryHeader, :[] -has_instance_method REntryHeader, :set -has_instance_method REntryHeader, :[]= -has_instance_method REntryHeader, :insert - -works "REntryContent.superclass == String", (REntryContent.superclass == String) - diff --git a/libimagruby/test/test_store.rb b/libimagruby/test/test_store.rb deleted file mode 100644 index aed00177..00000000 --- a/libimagruby/test/test_store.rb +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby - -require "../target/debug/liblibimagruby.so" - -color = true -verbose = true -debug = true - -RImag.init_logger debug, verbose, color - -store_handle = RStoreHandle::new(false, "/tmp/store") -id = RStoreId::new_baseless("test") -test_handle = store_handle.create(id) - -RImag.info "Created #{test_handle.location.to_str} from Ruby" -