Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add error specs for some invalid parent cases #1030

Merged
merged 1 commit into from
Dec 28, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions spec/errors/invalid-parent/function-in-each/error
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Error: Functions may not be defined within control directives or other mixins.
on line 2 of /sass/spec/errors/invalid-parent/function-in-each/input.scss
Use --trace for backtrace.
Empty file.
3 changes: 3 additions & 0 deletions spec/errors/invalid-parent/function-in-each/input.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@each $item in (a, b) {
@function foo() {}
}
1 change: 1 addition & 0 deletions spec/errors/invalid-parent/function-in-each/status
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
65
3 changes: 3 additions & 0 deletions spec/errors/invalid-parent/function-in-for/error
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Error: Functions may not be defined within control directives or other mixins.
on line 2 of /sass/spec/errors/invalid-parent/function-in-for/input.scss
Use --trace for backtrace.
Empty file.
3 changes: 3 additions & 0 deletions spec/errors/invalid-parent/function-in-for/input.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@for $i from 1 through 1 {
@function foo() {}
}
1 change: 1 addition & 0 deletions spec/errors/invalid-parent/function-in-for/status
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
65
3 changes: 3 additions & 0 deletions spec/errors/invalid-parent/function-in-function/error
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Error: Functions can only contain variable declarations and control directives.
on line 2 of /sass/spec/errors/invalid-parent/function-in-function/input.scss
Use --trace for backtrace.
Empty file.
3 changes: 3 additions & 0 deletions spec/errors/invalid-parent/function-in-function/input.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@function foo () {
@function bar() {}
}
1 change: 1 addition & 0 deletions spec/errors/invalid-parent/function-in-function/status
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
65
3 changes: 3 additions & 0 deletions spec/errors/invalid-parent/function-in-if/error
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Error: Functions may not be defined within control directives or other mixins.
on line 2 of /sass/spec/errors/invalid-parent/function-in-if/input.scss
Use --trace for backtrace.
Empty file.
3 changes: 3 additions & 0 deletions spec/errors/invalid-parent/function-in-if/input.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@if (true) {
@function foo() {}
}
1 change: 1 addition & 0 deletions spec/errors/invalid-parent/function-in-if/status
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
65
3 changes: 3 additions & 0 deletions spec/errors/invalid-parent/function-in-mixin/error
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Error: Functions may not be defined within control directives or other mixins.
on line 2 of /sass/spec/errors/invalid-parent/function-in-mixin/input.scss
Use --trace for backtrace.
Empty file.
6 changes: 6 additions & 0 deletions spec/errors/invalid-parent/function-in-mixin/input.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@mixin mix() {
@function foo() {}
}
foo {
bar: include mix();
}
1 change: 1 addition & 0 deletions spec/errors/invalid-parent/function-in-mixin/status
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
65
3 changes: 3 additions & 0 deletions spec/errors/invalid-parent/function-in-while/error
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Error: Functions may not be defined within control directives or other mixins.
on line 2 of /sass/spec/errors/invalid-parent/function-in-while/input.scss
Use --trace for backtrace.
Empty file.
3 changes: 3 additions & 0 deletions spec/errors/invalid-parent/function-in-while/input.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@while (false) {
@function foo() {}
}
1 change: 1 addition & 0 deletions spec/errors/invalid-parent/function-in-while/status
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
65
3 changes: 3 additions & 0 deletions spec/errors/invalid-parent/mixin-in-each/error
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Error: Mixins may not be defined within control directives or other mixins.
on line 2 of /sass/spec/errors/invalid-parent/mixin-in-each/input.scss
Use --trace for backtrace.
Empty file.
3 changes: 3 additions & 0 deletions spec/errors/invalid-parent/mixin-in-each/input.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@each $item in (a, b) {
@mixin foo() {}
}
1 change: 1 addition & 0 deletions spec/errors/invalid-parent/mixin-in-each/status
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
65
3 changes: 3 additions & 0 deletions spec/errors/invalid-parent/mixin-in-for/error
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Error: Mixins may not be defined within control directives or other mixins.
on line 2 of /sass/spec/errors/invalid-parent/mixin-in-for/input.scss
Use --trace for backtrace.
Empty file.
3 changes: 3 additions & 0 deletions spec/errors/invalid-parent/mixin-in-for/input.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@for $i from 1 through 1 {
@mixin foo() {}
}
1 change: 1 addition & 0 deletions spec/errors/invalid-parent/mixin-in-for/status
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
65
3 changes: 3 additions & 0 deletions spec/errors/invalid-parent/mixin-in-function/error
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Error: Functions can only contain variable declarations and control directives.
on line 2 of /sass/spec/errors/invalid-parent/mixin-in-function/input.scss
Use --trace for backtrace.
Empty file.
3 changes: 3 additions & 0 deletions spec/errors/invalid-parent/mixin-in-function/input.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@function foo () {
@mixin bar() {}
}
1 change: 1 addition & 0 deletions spec/errors/invalid-parent/mixin-in-function/status
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
65
3 changes: 3 additions & 0 deletions spec/errors/invalid-parent/mixin-in-if/error
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Error: Mixins may not be defined within control directives or other mixins.
on line 2 of /sass/spec/errors/invalid-parent/mixin-in-if/input.scss
Use --trace for backtrace.
Empty file.
3 changes: 3 additions & 0 deletions spec/errors/invalid-parent/mixin-in-if/input.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@if (true) {
@mixin foo() {}
}
1 change: 1 addition & 0 deletions spec/errors/invalid-parent/mixin-in-if/status
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
65
3 changes: 3 additions & 0 deletions spec/errors/invalid-parent/mixin-in-mixin/error
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Error: Mixins may not be defined within control directives or other mixins.
on line 2 of /sass/spec/errors/invalid-parent/mixin-in-mixin/input.scss
Use --trace for backtrace.
Empty file.
6 changes: 6 additions & 0 deletions spec/errors/invalid-parent/mixin-in-mixin/input.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@mixin mix() {
@mixin foo() {}
}
foo {
bar: include mix();
}
1 change: 1 addition & 0 deletions spec/errors/invalid-parent/mixin-in-mixin/status
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
65
3 changes: 3 additions & 0 deletions spec/errors/invalid-parent/mixin-in-while/error
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Error: Mixins may not be defined within control directives or other mixins.
on line 2 of /sass/spec/errors/invalid-parent/mixin-in-while/input.scss
Use --trace for backtrace.
Empty file.
3 changes: 3 additions & 0 deletions spec/errors/invalid-parent/mixin-in-while/input.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@while (false) {
@mixin foo() {}
}
1 change: 1 addition & 0 deletions spec/errors/invalid-parent/mixin-in-while/status
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
65
3 changes: 3 additions & 0 deletions spec/errors/invalid-parent/options.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
:todo:
- dart-sass
3 changes: 3 additions & 0 deletions spec/errors/invalid-parent/return-in-mixin/error
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Error: @return may only be used within a function.
on line 2 of /sass/spec/errors/invalid-parent/return-in-mixin/input.scss
Use --trace for backtrace.
Empty file.
7 changes: 7 additions & 0 deletions spec/errors/invalid-parent/return-in-mixin/input.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@mixin mix() {
@return 42;
}

foo {
@include mix();
}
1 change: 1 addition & 0 deletions spec/errors/invalid-parent/return-in-mixin/status
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
65
3 changes: 3 additions & 0 deletions spec/errors/invalid-parent/return-in-root/error
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Error: @return may only be used within a function.
on line 1 of /sass/spec/errors/invalid-parent/return-in-root/input.scss
Use --trace for backtrace.
Empty file.
1 change: 1 addition & 0 deletions spec/errors/invalid-parent/return-in-root/input.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@return 42;
1 change: 1 addition & 0 deletions spec/errors/invalid-parent/return-in-root/status
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
65
3 changes: 3 additions & 0 deletions spec/errors/invalid-parent/return-in-ruleset/error
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Error: @return may only be used within a function.
on line 2 of /sass/spec/errors/invalid-parent/return-in-ruleset/input.scss
Use --trace for backtrace.
Empty file.
3 changes: 3 additions & 0 deletions spec/errors/invalid-parent/return-in-ruleset/input.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ruleset {
@return 42;
}
1 change: 1 addition & 0 deletions spec/errors/invalid-parent/return-in-ruleset/status
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
65