Permalink
Browse files

Tests for unknown named args exceptions

  • Loading branch information...
1 parent 5297c8f commit 75490a8b7d0ae411bc19ba058d9bb95cb8a3163e @pointlessone committed Mar 21, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 test/sass/engine_test.rb
View
@@ -106,6 +106,8 @@ class SassEngineTest < Test::Unit::TestCase
"foo\n @function bar()\n @return 1" => ['Functions may only be defined at the root of a document.', 2],
"@function foo($a)\n @return 1\na\n b: foo()" => 'Function foo is missing parameter $a.',
"@function foo()\n @return 1\na\n b: foo(2)" => 'Wrong number of arguments (1 for 0) for `foo\'',
+ "@function foo()\n @return 1\na\n b: foo($a: 1)" => "Function foo doesn't have an argument: $a",
+ "@function foo()\n @return 1\na\n b: foo($a: 1, $b: 2)" => "Function foo doesn't have an arguments: $a, $b",
@chriseppstein

chriseppstein Mar 22, 2012

an arguments should be the following arguments

"@return 1" => '@return may only be used within a function.',
"@if true\n @return 1" => '@return may only be used within a function.',
"@mixin foo\n @return 1\n@include foo" => ['@return may only be used within a function.', 2],

0 comments on commit 75490a8

Please sign in to comment.