Skip to content

Commit

Permalink
Update specs for global member conflicts (#1435)
Browse files Browse the repository at this point in the history
  • Loading branch information
nex3 committed Jul 18, 2019
1 parent 3a9889c commit 2919a8e
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 10 deletions.
4 changes: 3 additions & 1 deletion spec/core_functions/meta/function_exists.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,9 @@ a {b: function-exists(member)}
@function member() {@return from other2}

<===> error/conflict/error
Error: Multiple global modules have a function named "member".
Error: Multiple global modules have a function named "member":
* other1.scss
* other2.scss
,
4 | a {b: function-exists(member)}
| ^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
4 changes: 3 additions & 1 deletion spec/core_functions/meta/get_function/error.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,9 @@ a {b: get-function(member)}
@function member() {@return from other2}

<===> conflict/error
Error: Multiple global modules have a function named "member".
Error: Multiple global modules have a function named "member":
* other1.scss
* other2.scss
,
4 | a {b: get-function(member)}
| ^^^^^^^^^^^^^^^^^^^^
Expand Down
4 changes: 3 additions & 1 deletion spec/core_functions/meta/global_variable_exists.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,9 @@ $member: from other1;
$member: from other2;

<===> error/conflict/error
Error: Multiple global modules have a variable named "$member".
Error: Multiple global modules have a variable named "$member":
* other1.scss
* other2.scss
,
4 | a {b: global-variable-exists(member)}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
4 changes: 3 additions & 1 deletion spec/core_functions/meta/load_css/error.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,9 @@ $a: left;
$a: right;

<===> with/conflict/error
Error: Multiple global modules have a variable named "$a".
Error: Multiple global modules have a variable named "$a":
* _left.scss
* _right.scss
,
4 | $a: c !default;
| ^^^^^^^^^^^^^^
Expand Down
4 changes: 3 additions & 1 deletion spec/core_functions/meta/mixin_exists.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,9 @@ a {b: mixin-exists(member)}
@mixin member() {}

<===> error/conflict/error
Error: Multiple global modules have a mixin named "member".
Error: Multiple global modules have a mixin named "member":
* other1.scss
* other2.scss
,
4 | a {b: mixin-exists(member)}
| ^^^^^^^^^^^^^^^^^^^^
Expand Down
4 changes: 3 additions & 1 deletion spec/core_functions/meta/variable_exists.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,9 @@ $member: from other1;
$member: from other2;

<===> conflict/error
Error: Multiple global modules have a variable named "$member".
Error: Multiple global modules have a variable named "$member":
* other1.scss
* other2.scss
,
4 | a {b: variable-exists(member)}
| ^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
12 changes: 9 additions & 3 deletions spec/directives/use/error/member.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,9 @@ $member: from other1;
$member: from other2;

<===> member_conflict/variable/error
Error: Multiple global modules have a variable named "$member".
Error: Multiple global modules have a variable named "$member":
* other1.scss
* other2.scss
,
4 | a {b: $member}
| ^^^^^^^
Expand All @@ -200,7 +202,9 @@ a {b: member()}
@function member() {@return from other2}

<===> member_conflict/function/error
Error: Multiple global modules have a function named "member".
Error: Multiple global modules have a function named "member":
* other1.scss
* other2.scss
,
4 | a {b: member()}
| ^^^^^^^^
Expand All @@ -222,7 +226,9 @@ a {@include member}
@mixin member {a: from other2}

<===> member_conflict/mixin/error
Error: Multiple global modules have a mixin named "member".
Error: Multiple global modules have a mixin named "member":
* other1.scss
* other2.scss
,
4 | a {@include member}
| ^^^^^^^^^^^^^^^
Expand Down
4 changes: 3 additions & 1 deletion spec/directives/use/error/with.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ $a: left;
$a: right;

<===> conflict/error
Error: Multiple global modules have a variable named "$a".
Error: Multiple global modules have a variable named "$a":
* _left.scss
* _right.scss
,
4 | $a: c !default;
| ^^^^^^^^^^^^^^
Expand Down

0 comments on commit 2919a8e

Please sign in to comment.