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:
parent
aa171de2e8
commit
048b345e1c
2 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue