From 1fbe2592689bae107a73c1bd0cee506665c60d74 Mon Sep 17 00:00:00 2001 From: Charly Koza Date: Wed, 9 Oct 2019 11:59:18 +0200 Subject: [PATCH] Add test reproducing #49 #54 and #55 --- spec/bug-49/formattingOptions.json | 13 ++++++++++++ spec/bug-49/input.styl | 29 +++++++++++++++++++++++++++ spec/bug-49/output.styl | 32 ++++++++++++++++++++++++++++++ 3 files changed, 74 insertions(+) create mode 100644 spec/bug-49/formattingOptions.json create mode 100644 spec/bug-49/input.styl create mode 100644 spec/bug-49/output.styl diff --git a/spec/bug-49/formattingOptions.json b/spec/bug-49/formattingOptions.json new file mode 100644 index 0000000..c6c5f96 --- /dev/null +++ b/spec/bug-49/formattingOptions.json @@ -0,0 +1,13 @@ +{ + "insertColons": false, + "insertSemicolons": false, + "insertBraces": false, + "insertSpaceBeforeComment": true, + "insertSpaceAfterComment": true, + "insertParenthesisAroundIfCondition": true, + "insertLeadingZeroBeforeFraction": false, + "selectorSeparator": "\n", + "quoteChar": "\"", + "tabStopChar": " ", + "alwaysUseZeroWithoutUnit": true +} diff --git a/spec/bug-49/input.styl b/spec/bug-49/input.styl new file mode 100644 index 0000000..bcb0d70 --- /dev/null +++ b/spec/bug-49/input.styl @@ -0,0 +1,29 @@ +/*! + * Some licence + */ +@require "./file.styl" +/** +multi-line comment +*/ +.class1, .class2 + padding 1px // comment + margin 0px 5px 0px 5px + color alpha(red, 0.5) +@media screen and (min-width 100px)// media comment + if (!condition) // if comment + @extend .class3 + else // else comment + background blue + +.class // hello there +div + width calc(100% / 3) + +.someClass + + // todo implement this later + +.anotherClass + border 0 + +// end of file comment diff --git a/spec/bug-49/output.styl b/spec/bug-49/output.styl new file mode 100644 index 0000000..3f6fbc9 --- /dev/null +++ b/spec/bug-49/output.styl @@ -0,0 +1,32 @@ +/*! + * Some licence + */ +@require "./file.styl" + +/** +multi-line comment +*/ +.class1 +.class2 + padding 1px // comment + margin 0 5px 0 5px + color alpha(red, .5) + +@media screen and (min-width 100px) // media comment + if (!condition) // if comment + @extend .class3 + else // else comment + background blue + +.class // hello there +div + width calc(100% / 3) + +.someClass + + // todo implement this later + +.anotherClass + border 0 + +// end of file comment