test/RubyLess/basic.yml in rubyless-0.2.0 vs test/RubyLess/basic.yml in rubyless-0.3.0

- old
+ new

@@ -16,10 +16,18 @@ dynamic_string_again: src: "now.strftime(\"#{name}\")" tem: "Time.now.strftime(\"#{var1.name}\")" +symbol: + src: ":foobar" + sxp: 's(:lit, :foobar)' + +hash_access: + src: "dictionary[:key]" + tem: "get_dict[:key]" + rewrite_variables: src: "!prev.ancestor?(main) && !node.ancestor?(main)" tem: "(not previous.ancestor?(@node) and not var1.ancestor?(@node))" method_can_return_nil: @@ -47,32 +55,32 @@ method_on_method: src: "project.name.to_s" tem: "var1.project.name.to_s" res: 'project' - + comp_ternary_op: src: "1 > 2 ? 'foo' : 'bar'" tem: "(1>2) ? \"foo\" : \"bar\"" res: "bar" - + method_ternary_op: src: "id > 2 ? 'foo' : 'bar'" tem: "(var1.zip>2) ? \"foo\" : \"bar\"" res: "foo" method_argument_can_be_nil: src: "vowel_count(spouse.name)" tem: "(var1.spouse ? vowel_count(var1.spouse.name) : nil)" - + multi_arg_method_argument_can_be_nil: src: "log_info(spouse, 'foobar')" tem: "(var1.spouse ? log_info(var1.spouse, \"foobar\") : nil)" - + multi_arg_method_arguments_can_be_nil: src: "log_info(husband, spouse.name)" tem: "((var1.husband && var1.spouse) ? log_info(var1.husband, var1.spouse.name) : nil)" - + multi_arg_method_arguments_can_be_nil_same_condition: src: "log_info(spouse, spouse.name)" tem: "(var1.spouse ? log_info(var1.spouse, var1.spouse.name) : nil)" literal_argument_for_method: \ No newline at end of file