[yast-commit] r68053 - in /trunk/ruby-bindings/tests/ycp: InRuby.rb ruby_from_ycp.ycp
Author: jreidinger Date: Mon Apr 30 15:55:12 2012 New Revision: 68053 URL: http://svn.opensuse.org/viewcvs/yast?rev=68053&view=rev Log: add test for map conversion ( preparation for refactoring) Modified: trunk/ruby-bindings/tests/ycp/InRuby.rb trunk/ruby-bindings/tests/ycp/ruby_from_ycp.ycp Modified: trunk/ruby-bindings/tests/ycp/InRuby.rb URL: http://svn.opensuse.org/viewcvs/yast/trunk/ruby-bindings/tests/ycp/InRuby.rb?rev=68053&r1=68052&r2=68053&view=diff ============================================================================== --- trunk/ruby-bindings/tests/ycp/InRuby.rb (original) +++ trunk/ruby-bindings/tests/ycp/InRuby.rb Mon Apr 30 15:55:12 2012 @@ -6,4 +6,8 @@ def self.raising_code raise "Wow exception!" end + + def self.get_hash + return { "a" => "b", "b" => "c" } + end end Modified: trunk/ruby-bindings/tests/ycp/ruby_from_ycp.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/ruby-bindings/tests/ycp/ruby_from_ycp.ycp?rev=68053&r1=68052&r2=68053&view=diff ============================================================================== --- trunk/ruby-bindings/tests/ycp/ruby_from_ycp.ycp (original) +++ trunk/ruby-bindings/tests/ycp/ruby_from_ycp.ycp Mon Apr 30 15:55:12 2012 @@ -16,7 +16,14 @@ y2error("exception completely ignored result: %1",result); return false; } + map h = tomap(InRuby::get_hash()); + if ( tostring(h["a"]:"") != "b") + { + y2error("map is not properly returned: %1",result); + return false; + } import "CamelCase"; result = tostring(CamelCase::inc(10)); y2milestone("result: %1", result); + return true; } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
jreidinger@svn2.opensuse.org