Skip to content

Commit

Permalink
Clean up specs
Browse files Browse the repository at this point in the history
This moves the specs to the directories suggested in
#1001, updates them to use get-function(), and documents
the exact issues that they're testing.

It also updates the output of one of them to be an error, which is
expected.
  • Loading branch information
nex3 committed Jul 18, 2018
1 parent 585a6e8 commit b63eb44
Show file tree
Hide file tree
Showing 11 changed files with 39 additions and 25 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Regression test for sass/libsass#2472
//
// Passing an argument list to `call()` was broken on LibSass. The call to
// `dark()` throw an error complaining about the second argument being the wrong
// type.

@function dark($color, $args...) {
@return call(get-function('darken'), $color, $args...);
}

.test {
wrong-type: dark(#102030, 5%);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Error: Only one positional argument is allowed. All other arguments must be passed by name.
@return call(get-function('adjust-color'), $color, $args...);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/sass/spec/core_function/meta/call/regression/arglist_triggers_argument_error/input.scss 9:11 adjust()
/sass/spec/core_function/meta/call/regression/arglist_triggers_argument_error/input.scss 13:12 root stylesheet
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Error: -5 is not a keyword argument for `adjust_color'
on line 9 of /sass/spec/core_function/meta/call/regression/arglist_triggers_argument_error/input.scss
Use --trace for backtrace.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Regression test for sass/libsass#2472
//
// Passing an argument list to `call()` was broken on LibSass. The call to
// `adjust()` should throw an error complaining about passing -5 by position
// instead of by name, but in LibSass it threw an error complaining about "not
// enough arguments".

@function adjust($color, $args...) {
@return call(get-function('adjust-color'), $color, $args...);
}

.test {
too-few: adjust(#102030, -5);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
:todo:
- libsass # sass/libsass#2696
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
65

This file was deleted.

11 changes: 0 additions & 11 deletions spec/libsass-todo-issues/issue_2472/number/input.scss

This file was deleted.

11 changes: 0 additions & 11 deletions spec/libsass-todo-issues/issue_2472/type/input.scss

This file was deleted.

0 comments on commit b63eb44

Please sign in to comment.