diff --git a/src/value/sass_function.rs b/src/value/sass_function.rs index f7cd14a..82d265f 100644 --- a/src/value/sass_function.rs +++ b/src/value/sass_function.rs @@ -59,7 +59,6 @@ impl SassFunction { ) -> SassResult { match self { Self::Builtin(f, ..) => f.0(args, scope, super_selector), - // todo: superselector Self::UserDefined(f, ..) => f.eval(args, scope, super_selector), } } diff --git a/tests/get-function.rs b/tests/get-function.rs index f39f98f..bfd047d 100644 --- a/tests/get-function.rs +++ b/tests/get-function.rs @@ -79,12 +79,12 @@ test!( "a {b: call(get-function(lighten), $color: red, $amount: 5);}", "a {\n b: #ff1a1a;\n}\n" ); -// test!( -// call_user_defined_super_selector, -// "@function user-defined() {\n @return &;\n}\n -// a {b: call(get-function(user-defined));}", -// "a {\n b: a;\n}\n" -// ); +test!( + call_user_defined_super_selector, + "@function user-defined() {\n @return &;\n}\n + a {b: call(get-function(user-defined));}", + "a {\n b: a;\n}\n" +); error!( undefined_function, "a {color: get-function(foo);}", "Error: Function not found: foo"