require_relative "../lib/ninix/dll/aya5" module NinixTest class AYA5Test def initialize(top_dir, function, argv, dll_name: 'aya5.dll') ## FIXME ##logger = logging.getLogger() ##logger.setLevel(logging.DEBUG) # XXX aya = Aya5::Shiori.new(dll_name) aya.show_description aya.load(:dir => top_dir) result = aya.request("GET SHIORI/3.0\r\n" \ "ID: " + function.to_s + "\r\n" \ "Sender: AYA\r\n" \ "SecurityLevel: local\r\n\r\n".encode(aya.charset)) #result = aya.dic.get_function(function).call(argv) #print(str(result, aya.charset)) print(result.to_s.force_encoding(aya.charset).encode("UTF-8", :invalid => :replace, :undef => :replace), "\n") end end end $:.unshift(File.dirname(__FILE__)) USAGE= "Usage(1): test-shiori-aya.rb