1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00

Sass reports illegal operations better.

git-svn-id: svn://hamptoncatlin.com/haml/trunk@358 7063305b-7217-0410-af8c-cdc13e5119b9
This commit is contained in:
nex3 2007-02-10 02:55:55 +00:00
parent aa171de2e8
commit 048b345e1c
2 changed files with 2 additions and 1 deletions

View file

@ -22,7 +22,7 @@ module Sass::Constant
begin
literal1.send(@operator, literal2)
rescue NoMethodError => e
raise e unless e.name == @operator
raise e unless e.name.to_s == @operator.to_s
raise Sass::SyntaxError.new("Undefined operation: \"#{literal1} #{@operator} #{literal2}\"")
end
end

View file

@ -33,6 +33,7 @@ class SassEngineTest < Test::Unit::TestCase
"a\n :b c" => "Illegal Indentation: Only two space characters are allowed as tabulation.",
"a\n :b c" => "Illegal Indentation: Only two space characters are allowed as tabulation.",
"a\n :b\n !c = 3" => "Constants may only be declared at the root of a document.",
# "!a = b c d" => 'Undefined operation: "b c d"'
}
def test_basic_render