pax_global_header00006660000000000000000000000064147476562210014530gustar00rootroot0000000000000052 comment=a84c34aa4246d324d8adbeff10d8964aedd7c78c rsass-0.29.0/000077500000000000000000000000001474765622100127535ustar00rootroot00000000000000rsass-0.29.0/.github/000077500000000000000000000000001474765622100143135ustar00rootroot00000000000000rsass-0.29.0/.github/workflows/000077500000000000000000000000001474765622100163505ustar00rootroot00000000000000rsass-0.29.0/.github/workflows/rust.yml000066400000000000000000000043241474765622100200730ustar00rootroot00000000000000# Based on https://github.com/actions-rs/meta/blob/master/recipes/msrv.md on: [push, pull_request] name: CI jobs: rustfmt: name: Rustfmt runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions-rust-lang/setup-rust-toolchain@v1 with: components: rustfmt - name: Rustfmt Check uses: actions-rust-lang/rustfmt@v1 # Run clippy on stable only clippy: name: Clippy runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions-rust-lang/setup-rust-toolchain@v1 with: components: clippy rustflags: "" - run: cargo clippy --all-features test-all: name: All Tests needs: [clippy, rustfmt] runs-on: ubuntu-latest strategy: matrix: rust: - stable - 1.74.1 - beta - nightly steps: - uses: actions/checkout@v4 - uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: ${{ matrix.rust }} - run: cargo build - run: cargo test -q test-windows: name: Test on Windows needs: [clippy, rustfmt] runs-on: windows-latest strategy: matrix: rust: - stable - 1.74.1 steps: - uses: actions/checkout@v4 - uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: ${{ matrix.rust }} - run: cargo test -q test-macos: name: Test on MacOS needs: [clippy, rustfmt] runs-on: macos-latest strategy: matrix: rust: - stable - 1.74.1 steps: - uses: actions/checkout@v4 - uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: ${{ matrix.rust }} - run: cargo test -q test-old: name: Old rust needs: [clippy, rustfmt] runs-on: ubuntu-latest strategy: matrix: rust: - 1.70.0 - 1.68.2 - 1.65.0 steps: - uses: actions/checkout@v4 - uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: ${{ matrix.rust }} - run: sed -i 's/"rsass-cli",/# \0/' Cargo.toml - run: cargo test --package rsass-macros -q rsass-0.29.0/.gitignore000066400000000000000000000000401474765622100147350ustar00rootroot00000000000000/target /Cargo.lock /sass-spec/ rsass-0.29.0/CHANGELOG.md000066400000000000000000001530751474765622100145770ustar00rootroot00000000000000# Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## Release 0.29.0 Released 2025-02-02. Progress: 5879 of 12589 tests passed. The large number of new failing tests are mainly for new color functions that rsass don't support yet. ### Breaking changes: * Replaced the css `Selector` implementation. The new "logical" selector types that was used in selector function in rsass 0.28 is now the only css selector implementation. Most of the api to those types are private. Some will probably be made public after some stabilization period. * The `Debug` trait for `Error` is now the standard derived impl, to get the pretty output, use the `Display` trait. * All numbers are now represented as f64 (#203). This removes integration with `num-rational`, `num-bigint`, `num-integer` and `num-traits`. * Improved `@for` loop evaluation and error handling (#206). * Msrv is now 1.65.0 for rsass (and 1.74 for rsass-cli). ### Other changes: * Lots of color handling. - Spec changes for traditional css colors (PR #198). - Made all color channels f64 instead of Rational (PR #199). * Fixed a bug where `clamp(..)` was sometimes evaluated to a value even though units wasn't comparable. * Improved parse error handling (Issue #141, PR #201, PR #205). Many parse errors now match the dart sass error message. Also allow "loud" comments in more places. * Pure css `round()` may take an expression argument. * Minor changes in agrument syntax errors. * Updated `nom` to 8.0.0 and added `nom-language` 0.1.0. * Updated sass-spec test suite to 2025-01-29. ## Release 0.28.10 Released 2024-05-19. Progress: 5803 of 7673 tests passed. * Improved support for the `selector.nest` function (PR #189). * Moved `selector.append` to new selector implementation (PR #190). * Implemented the `selector.simple-selectors` function (PR #191). * Implemented the `selector.extend` function, except some of the more complicated corner cases (PR #194). * Parse next-generation css selectors directly (rather than parsing as the old type and converting to the new). Fixes the `selector.parse` function and improves support for other selector functions (PR #192). * Some internal cleanup and improvements in the next-generation css selector implementation (which is currently internal and used only for selector functions, but should replace the old css selector implementation in release 0.29). * Improvements in css-compatible functions that is evaluated if possible, but kept as css if the arguments _may_ make sense in a browser (PR #193). * Improved no-args `math.random`, it now returns a f64 number. * Some other minor code cleanup. * MSRV is now 1.74 for rsass-cli (and still 1.61 for the lib and macros). * Updated sass-spec test suite to 2024-05-16. ## Release 0.28.8 Released 2024-01-01. Progress: 5565 of 7637 tests passed. * Added support for the `selector.unify` function (PR #187). * Added support for the `selector.replace` function (PR #188). * Improved parsing of binary / unary operations and other uses of `-`. * Fixed som special cases in the sass `%` operator. * Some internal cleanup (including setting workspace resolver to 2). * Msrv is 1.70 for rsass-cli, and 1.61 for the lib and macros (and 1.63 for running the tests of rsass, because some extra logging). * Updated sass-spec test suite to 2023-12-14. ## Release 0.28.6 Released 2023-11-12. Progress: 5332 of 7637 tests passed. * The 0.28.4 release accidentally included partial support for the `is_superselector` sass function, so clean that up a bit. See 0.28.4 for further changes. ## Release 0.28.4 (yanked) Released 2023-11-11. Progress: 5208 of 7637 tests passed. * Filter out placeholder selectors when writing the resulting css (they are still parsed of the internal data representation, so they can be used when implementing `@extend`) (PR #180). * Filter out some other illegal / never-matching selectors (PR #181). * Some improvements in plain css value parsing: - trailing comma and space separated lists in function arguments. - unqoted urls (contining slash and dot) in function arguments. - Negative numbers and numbers starting with a decimal dot. - unicode-ranges. * Allow at-rules in at-rules when parsing plain css. * Refactored function name/plain string handling in scss values to not parse the same unquoted string twice. * Remove separate backref member from `css::Selectors` for cleanup before implementing more selector functions. Instead, add it to an internal struct `SelectorCtx` (PR #179). * Implemented a bunch of css math functions. They differ from the functions in the math module in that they fallback to themself if the answer cant be calculated but isn't obviously wrong (e.g. `min(var(--gap), 2em)` is preserved while `min(1em, 2em)` is evaluated to `1em` and `min(1s, 1em)` yields an error). This also includes some improvements in handling numeric zeroes and infinities. (PR #184). * Implemented css relative color functions (PR #185). * Simplify units early in numeric division and multiplication. I think this is a bit uglier, but it is more consistent with dart sass. * Refactored some parsers for less backtracking, making it easier to point parse errors at the right place in the code and maybe making parsing slightly more efficient. * Improve selector / name parsing by beeing more restrictive (PR #183). * Updated sass-spec test suite to 2023-10-31. ## Release 0.28.2. Released 2023-08-03. This is a minor release of only rsass itself. Progress: 4725 of 7033 tests passed * Quoted strings can now be part of custom values (earlier, a custom value could be _either_ a quoted string or something else). Thanks @kartikynwa for reporting (issue #175, PR #176). * Improved handling of `calc(...)` expressions in plain css. * Improved handling of non-interpolated `calc(...)` expressions in scss, they are now properly evaluated (PR #177). * Some more (minor, mostly clippy-pedantic-suggested) internal cleanup. * Updated sass-spec test suite to 2023-08-01. ## Release 0.28.0 Released 2023-07-09. See also Progress: 4697 of 7032 tests passed. * `@media` rules are now handled specifically as `@media` rules, rather than as unknown `@`-rules (PR #172). * `@extend` is now explicitly unsupported (gives an error message, rather than behaving as an unknown `@` rule) (PR #173). * Improved handling of `@keyframes` and `@font-face`. * Changed output format of non-finite numbers to match sass spec. They are now wrapped in `calc`, like `calc(infinite)` or `calc(NaN * 1deg)`. * Fixed some difference between module and builtin color functions `grayscale` and `invert`. * The `deg` unit is no longer spelled out in `hsl` / `hsla` colors. * Improved handling of custom properties in raw css input. * MSRV of rsass (the lib crate) is now 1.60.0 (required by trancient dev dependency log). * Improved parsing of quoted strings (some syntax errors was accepted). * Removed the `Error::error(_)` shortcut for creating text-only errors (some text only errors remains, created directly as the `Error::S(String)` variant, that should probably be removed too in the future). * Fixed a typo in help text, thanks @greyhillman (PR #170). * Added an input check in selectors.append function. * Changed `Number` internals to make values smaller in memory. * Minor internal cleanup. * Updated syn in rsass-macros to 2.0.2. * Updated sass-spec test suite to 2023-06-30. ## Release 0.27.0 Released 2023-01-17. See also Progress: 4604 of 6925 tests passed. * Changed repo structure to a monorepo (PR #164). - The commandline interface now lives in the separate crate rsass-cli. - The test updater also have a separate crate, but not intended for publication. - Tests are restructured to fail faster for simple things, while macos and windows testing is added to the github action (appveyor is removed). * Added macros (PR #163, #165). - The workspace now includes a `rsass-macros` crate that can be used to compile sass to css strings at compile time in rust crates. * Changed numeric handing (mainly conversions to/from `f64`) to match improvements in how dart-sass handles numerics. This is mainly done by removing some special cases as dart-sass and rust now agrees on more of those. * Added new variables `$epsilon`, `$max-safe-integer`, `$min-safe-integer`, `$max-number`, and `$min-number` in `sass:math`, matching recent dart-sass additions. * Added new `split()` function in `sass:string` module. * Changed the span type used in parsing to a local type that borrows a `SourceFile` instead of `nom_locate` dependency (PR #158). * Changed the type `SourceFile` to be reference counted, so cloned `SourceFile` objects share the same actual data (PR #158). * Moved the `SourcePos` type into the `input` module and converted it from keeping a copy of the relevant line to keeping a range with a (reference counted) `SourceFile` (PR #158). * Changed css creation from just writing to a text buffer to building a tree representation of the css (and serialize it to text as a final step) (PR #159). * Changed `BinOp` value in both sass and css from a tuple variant with boxed values to a single boxed struct variant. * Improved value checking; Report an error if trying to output invalid css values in some cases. Also, arithmetic involving colors that used to be calculated is now correctly invalid (PR #161). * Changed `css::Item::AtRule` to wrap the new type `css::AtRule`. * More varaints of `Invalid`, slightly fewer stringy errors. * Changed handling of `hue` arguments to color functions, to allow different angle units, matching updates in sass-spec. * Minor correctness improvent in the `calc` function handling. * Clippy now takes MSRV from Cargo.toml. Slightly more recent lints allowed. * Updated clap to 4.0 for the command-line interface. * Updated sass-spec test suite to 2023-01-06. Thanks to @Wicpar for the initial macros implementation. ## Release 0.26.0 Released 2022-09-18. See also Progress: 4500 of 6843 tests passed (or 4673 if ignoring some deprecation messages). ### Breaking changes * A `BuiltinFn` now takes a `&ResolvedArgs` rather than a `&ScopeRef` as argument (PR #157). * `@extend` is still unsupported, but now some uses of it (e.g. in control structures) will result in an error instead of wrong output. * Some `sass::Item` alternatives now contain a `Callable`, combining `FormalArgs` with a body (a `Vec`). And `sass::Item::Content` now has a `CallArgs`. Also, `MixinDeclImpl` is replaced with `sass::Closure`. (PR #146). * `sass::CallArgs::new()` has an additional `trailing_comma` boolean argument (PR #147). * Remove deprecated methods `css::Value::integer_value()` and `Number::is_integer()`. * Changed the error type of `Scope::get_function()`. * Setting a variable, `Scope::define` now takes the `Value` by value rather than by reference. Also, `Scope::define_multi` is no longer exposed in the api. * Renamed one variant of `ScopeError` and added two others. * The sass `Value::Variable` and `Item::VariableDeclaration` variants now holds a `Name` rather than just a `String` for the variable name. Also, both now holds a `SourcePos`. * Changes in `Error` representation. Many errors are now constructed like `Invalid::SomeVariant.at(pos)` (PR #145). * `Error::error` now takes an `Into` argument (PR #151). * The module `input` contains types types with `Context`, `Loader`, `FsLoader`, and `FsContext`, replacing the old `FileContext` and `FsFileContext`. Also, the types `SourceKind`, `SourceName` and `Parsed` are moved from top-level into the `input` module (PR #150). * The `parse_scss_data` function is removed. Please create a `SourceFile` and use the `parse` method on that instead (PR #150). * The `Format::write_root` method are removed, `Context::transform` should be used instad (PR #152). ### Improvements * `input::Context` is the new main interface to rsass. Create a context suitable for how files should be loaded, configure it with an output format and optionally extend the global scope before calling `Context::transform` with an input file (PR #151, PR #152). * Also provide `CargoContext` / `CargoLoader` for convenient use in build scripts (PR #154). * The way to get argument values from the implementation of a builtin function is refactored to handle both any type that implements `TryFrom` and explicit validation/conversion methods nicer, and is now availiable for implementing builtin functions (extensions) outside of rsass itself (PR #157). * The `@content` can have arguments when declaring and calling a mixin (PR #146). * Variable declartions can be scoped (like `module.$var: value`). Some error reporting improvements (PR #148). * Allow interpolation in css min and max function arguments. * The url for `@use` and `@forward` must be quoted. * Improve detection of import loops (PR #150). * When loading files, Don't apply suffix / index-adding rules if the file name already has a suffix (PR #150). * Some `@` rules are now forbidden in some places as they should (PR #145). * The css `var(...)` function is now parsed as a proper function, and not as a special string (PR #147). * The null value can be quoted as an empty string (PR #147). * Make `Debug` formatting of `rsass::Error` look like the `Display` output, but without the "Error: " prefix. This makes the error display correctly if returned from a main function. This also removed the "Error: " prefix from a lot of message strings (PR #151). * In error message, don't show ellipses for consecutive lines (PR #147). * Somtimes a trailing comma in argument lists is preserved (PR #147). * Simplified `main` of the command-line by returning a `Result` (PR #151). * Update sass-spec test suite to 2022-09-15. * Handle tests referencing `input.scss` in spectest (include it among the mock files, if mentioned in itself or any existing mock file) (PR #150). * Use `lazy-regex` in spectest (PR #150). * Rsass now uses rust edition 2021, so MSRV is 1.56.0 (PR #153). * Some cleanups. * The main branch is now named `main` rather than `master`. Thanks to @fasterthanlime (again) for reporting the problem with interpolation in min and max. ## Release 0.25.2 Released 2022-05-27. Progress: 4350 of 6552 tests passed in dart-sass compatibility mode. * Use platform-dependent `path.join` for putting the local part after a base path, seems to make slash-separated strings ok as the joined part. (PR #144, issue #133) * Update sass-spec test suite to 2022-05-20. Thanks to @fasterthanlime for reporting and testing. ## Release 0.25.0 Released 2022-05-17 (On the Norwegian Constitution day 🇳🇴). Progress: 4331 of 6523 tests passed in dart-sass compatibility mode. ### Breaking changes * Update minimum supported rust version to 1.49.0 (from 1.45.2). * `SourceFile.parse()` now returns a `Result` rahter than a `Result>`, and `Format::write_root` now takes a `Parsed` (PR #140). * `FsFileContext::file` is replaced by `FsFileContext::for_path`, which initializes a file context and loads a file from it (PR 137). ### Improvements * Hopefully improved relative file finding on windows (PR #137). * Plain css `@import` rules is only allowed [on a few condtions](https://sass-lang.com/documentation/at-rules/import#plain-css-imports), in other cases an error is reported (Issue #139, PR #137). * Rsass can now parse (some) plain css as well as scss. Css files can be referenced in `@use` and `@import` directives, as well as in the `meta.load-css` mixin (PR #140). * Make the `calc(...)` function signal an error when args are known to be invalid css (PR #138). * Change `map.deep-merge` to match recent change in dart sass. * Minor fix in whitespace around at-rules. * Instrumented attempted file loading with `tracing` (PR #137). * Fix a typo in LICENSE (Issue #136). * Update sass-spec test suite to 2022-05-10. * Make rust version of sass-spec more directory-aware (which fixes one of 5825 tests). * Use a crates badge that actually works. Thanks to @jonassmedegaard for #136, and to @fasterthanlime for reporting the problem that #137 attempts to fix. ## Release 0.24.0 Released 2022-03-23. Progress: 4013 of 6478 tests passed in dart-sass compatibility mode. ### Breaking changes * The functions `parse_scss_file` and `parse_scss_path` is removed. Use `SourceFile` (maybe from a `FileContext`) instead (PR #132). * Some API changes (mayinly using `SourceFile` as return type) in `FileContext` and `FsF ileContext` (PR #132). * `Scope::get` now takes an `&Name` rather than an `&str` for the variable name. * `sass::Value::Variable` now has a source position. * `sass::Item` and `css::BodyItem` got new alternatives for custom properties (PR #134). * Some changes in the `Error` type to facilitate positions. ### Improvements * Basic support for `meta.load-css` mixin (PR #131). * Improved `calc` and `clamp` handling (PR #133). * Support custom properties (PR #134). * Refactor source file handling. Instead of creating new FileContexts wrapping the original for each file for searching for local paths in that file, use the SourceName of the containing file to find local paths (PR #132). * Detect `@import` loops. * Report undefined variable / module errors better. * Update color formatting. Sass-spec changed how it decides what format to show a color in (PR #135). * Enable clippy in CI and fix some things it complained about (PR #128). * Update sass-spec test suite to 2022-03-17. ## Release 0.23.4 Released 2022-02-06. Progress: 3872 of 6477 tests passed in dart-sass compatibility mode. * Different kinds of length units are now considered compatible for the `max` and `min` css unctions. ## Release 0.23.2 Released 2022-02-04. Progress: 3872 of 6477 tests passed in dart-sass compatibility mode. * Fix remaining cases of "special arguments" handling in rgb function. * The commandline now uses clap 3.0 rather than structopt. * Update update-tests dependency hrx-get to 0.2.0. * Update sass-spec test suite to 2022-02-01. ## Release 0.23.0 Released 2021-12-10. Progress: 3849 of 6444 tests passed in dart-sass compatibility mode (this may seem like a regression, but that is caused by changes in the test suite). ### Breaking changes * `Error` has a new alternative, `AtError`. * In `sass::Item`, the `Error`, `MixinCall` and `MixinDeclaration` variants is changed to include a `SourcePos`. Also, a `sass::Mixin` contains a `SourcePos` for where it is declared. * The fields of `SourcePos` is now private. * The `name` of a `sass::Item::AtRule` is now a SassString. * A `css::Value::Literal` now contains a `CssString` rather than a `String` and a `Quotes`. Evaluating a `SassString` also returns a `CssString` (PR #118). * The selector types are split from one `selector` module to the `css` and `sass` modules. Anything that used `selector` types should now use either `css` or `sass` types (PR #123). ### Improvements * A css call is just a special kind of string. * Include position of directive or function call when reporting `@error` errors. * Improve error reporting from inside mixins and functions. * Support interpolation in `@`-rule names. * Fixed #116: The `sass:map.merge` function was buggy. * Fixed #119: `saturate(200%)` is allowed (the argument is not limited to 0..100%). * `sass:selector` functions `append`, `nest`, and `parse` are closer to correct (PR #123). * `sass:meta` functions `calc-args` and `calc-name` implemented (PR #126). * Css strings and selectors can now be parsed directly (PR #123). * Fixed reformatting of to-much-indented comments. * Fixed panics in some color arithmetic (Issue #120, #121, #122, PR #125). * Replace rand with fastrand, hopefully compile faster (PR #105). * Unicode Private-use characters are escaped when printed. * Updated `nom` to 7.0 and `nom-locate` to 4.0. * Update sass-spec test suite to 2021-11-30. Thanks to @paolobarbolini, @connorskees and @charlesxsh for reporting issues. ## Release 0.22.2 Released 2021-07-03. Progress: 4002 of 6180 tests passed in dart-sass compatibility mode. * Changed the `red(..)`, `green(..)`, and `blue(..)` functions to always return integers. Issue #114, thanks @Keats. * Changed the `blackness(..)` and `whiteness(..)` functions to return blackness/whiteness of the integer rgb approximations of the color rather than the exact color. ## Release 0.22.0 - 2021-06-20 Progress: 3992 of 6180 tests passed in dart-sass compatibility mode. ### Breaking changes * The `sass::Item::MixinCall` enum alternative was modified. * Signature changes in `css::CallArgs` and `sass:CallArgs`, and new alternatives in `sass::ArgsError`. * `css::Value` has a new variant `ArgList`. * The `OrderMap::keys()` and `values()` functions now returns iterators, `OrderMap::remove(key)` now returns the removed value. ### Improvements * Better handling of mixin call bodies, the `@content` item, and the `content_exists` function. Fixes #112. * `@import` exposes things `@forward`ed in the imported module. * Many improvements in parameter passing to functions and mixins. PR #113. * Some more fixes regarding function calls and modules. * Support the `keywords` function in `sass:meta`. * Removed some debug printouts that was accidentally left in 0.21.0. * Update sass-spec test suite to 2021-06-14. Thanks to @Keats for reporting #112 and #108. ## Release 0.21.0 - 2021-06-01 Progress: 3727 of 6171 tests passed in dart-sass compatibility mode. ### Breaking changes * `value::Unit` and `value::ListSeparator` has new alternatives. * The `List` alternative in `sass::Value` and `css::Value` is modified. * The `Use` alternative in `sass::Item` is modified, and `Forward` added. ### Improvements * Most of `@forward` and some more of `@use` is now supported. PR #109 and #110. * Handle unknown units. PR #101. * List can be undecided between beeing comma-separated and beeing space-separated. PR #102. * Improved parameter handling and returned values of the supported selector functions. PR #103. * Implement `meta.module_variables` and `meta.module_functions`. * Implement `math.div` function. * Improved parameter checking for `hwb`, `alpha`, and `invert` functions in `sass:color` module. * Support slash-separated lists. PR #111. * The `if` function evaluates its arguments lazily. Issue #107. * The `--include-path` cli argument is now named `--load-path`. * At least some documentation on all public items. * Update sass-spec test suite to 2021-05-24. Also include "other" files (for `@use` and `@import`) in rust code for the suite. Tested with rustc 1.52.1, 1.50.0, 1.48.0, 1.45.2, 1.53.0-beta.3 (82b862164 2021-05-22), and 1.54.0-nightly (657bc0188 2021-05-31). ## Release 0.20.0 - 2021-03-25 Progress: 3456 of 5962 tests passed in dart-sass compatibility mode. ### Breaking changes * The name of a module is no longer a `sass::Name`, but instead a `String`. ### Improvements * A space-separated list can be a key in a map. * The builtin modules does not inherit the global functions. * Scope names is not `sass::Name` (`$a_b` and `$a-b` is the same variable, but `a_b` and `a-b` are different scopes). * Improve `sass:map` functions `get` and `merge` and add `deep-merge` and `deep-remove`. Tested with rustc 1.51.0 (2fd73fabe 2021-03-23), 1.48.0 (7eac88abb 2020-11-16), 1.46.0 (04488afe3 2020-08-24), 1.44.1 (c7087fe00 2020-06-17), 1.51.0-beta.8 (73f48e5f6 2021-03-18), 1.53.0-nightly (07e0e2ec2 2021-03-24). ### Release 0.19.2 - 2021-03-25 Version 0.20.0 was originally released as 0.19.2, but yanked as there was a breaking change. ## Release 0.19.0 - 2021-03-14 Progress: 3371 of 5945 tests passed in dart-sass compatibility mode. ### Breaking changes * The unit of a `Numeric` is now a `UnitSet` rather than a `Unit`. * `Error` has new variants and a new field in `BadArguments`. * A sass::Value::Call now has a source position. * A `Rational` is now a `Ratio` rather than a `Ratio`. ### Improvements * Added a Contributing section to readme. * Handle values with multiple units. PR #97. * Show call position for errors in function calls, and test for type errors in many standard functions. Many error messages are made identical to dart-sass, improving test-suit progress with more than 400 tests. PR #99. * Fix issue #98: overflow in rational number arithmetic. * Allow `@at-root` at document root. * Boolean operators is truly lazy, e.g. `false and f($x)` does not call `f`. * Refactored number parsing to use overflowing rationals. PR #100. * Test suite sass-spec updated to 2021-03-02. * Updated num-rational and num-bigint to 0.4.0. Thanks to @alvra for reporting #98. Tested with rustc 1.50.0 (cb75ad5db 2021-02-10), rustc 1.48.0 (7eac88abb 2020-11-16), rustc 1.46.0 (04488afe3 2020-08-24), rustc 1.44.1 (c7087fe00 2020-06-17), rustc 1.51.0-beta.6 (6a1835ad7 2021-03-12), and rustc 1.52.0-nightly (acca81892 2021-03-13). ## Release 0.18.0 - 2021-02-25 Progress: 2892 of 5945 tests passed in dart-sass compatibility mode. ### Breaking changes Lots of things have been moved around. See `Scope`, `Numeric`, and `Function` in particular. ### Improvements * Support `@use` of user-defined modules. PR #96. * Improve trigonometric precision by using f64 π rather than rational. * Handle more peculiarities with atan2, pow, infinities and negative zero. * Improve name lookups in scopes and modules, PR #87. * new `struct Scope` replaces trait and three structs. PR #95. * A color can be Hsla or Hwba as well as Rgba. PR #88, #89. * Handle units in `@for` loops inside sass functions. * Some types moved into `value` mod, imporoved docs. PR #90. * Add support for `$=`, `~=` and `^=` in css attribute selectors. Issue #91, PR #92. * A `Numeric` is a Number with a Unit. Also hide NumValue enum. PR #93. * The `SassFunction` type is now named `sass::Function`. * Test suite sass-spec updated to 2021-02-18. * Some cleanups. Thanks to @mfeckie for #91/#92. Tested with rustc 1.50.0 (cb75ad5db 2021-02-10), rustc 1.48.0 (7eac88abb 2020-11-16), rustc 1.46.0 (04488afe3 2020-08-24), rustc 1.44.1 (c7087fe00 2020-06-17), rustc 1.51.0-beta.3 (b631c914c 2021-02-24), and rustc 1.52.0-nightly (a8486b64b 2021-02-24). ## Release 0.17.0 - 2021-01-29 Progress: 2784 of 5936 tests passed in dart-sass compatibility mode. ### Breaking changes * Update nom to 6.0 raises the minimally supported compiler version to 1.44.0. Also, the dependency is technically exposed. * `sass::Item::Use` was modified by #84. * `compile_scss_file` is renamed to `compile_scss_path`, and `FileContext` is now a trait, the default implementation is renamed to `FsFileContext` by #85. ### Improvements * Allow customizing file loading by providing a custom impl of a `FileContext`, PR #85. * Support the `@use name as *` syntax, PR #84. * Make `Error::BadValue` a little closer to whats expected. * Handle units in `@for` loops. * Update `nom` to 6.0, PR #83. * Update `rand` to 0.8, PR #86. * Testing is now done with github actions rather than travis (Appveyor remains for window builds). * sass-spec test suite updated to 2021-01-20. Thanks to @paolobarbolini and @alvra for code contributions. Tested with rustc 1.49.0 (e1884a8e3 2020-12-29), 1.44.1 (c7087fe00 2020-06-17), 1.46.0 (04488afe3 2020-08-24), 1.48.0 (7eac88abb 2020-11-16), 1.50.0-beta.8 (1cd030396 2021-01-20), and 1.51.0-nightly (c0b64d97b 2021-01-28). ## Release 0.16.0 - 2020-11-10 Progress: 2718 of 5840 tests passed in dart-sass compatibility mode. ### Breaking changes * `SourceName` and `sass::Item::Import` was changed by #62. * `Use` was added to the `sass::Item` enum by #80. * Changes to `sass::Value` and `css::Vaue` by #81. ### Improvements * PR #80: Implement `@use` for standard sass modules. All standard modules are at least partially supported, only `sass:string` is fully supported. See issue #60 for for module support status. * PR 82: Implement hwb support in `sass:color`. Also, provide `From` for `css::Value` and deprecate color value constructors. * Provide `From` for `css::Value` (and deprecate `Value::bool(v)`). * PR #62: Improve `ParseError`, `SourcePos`, and `SourceName` by using located spans by [nom_locate](https://lib.rs/crates/nom_locate) in the parser. A `sass::Item::Import` now handles where each file is imported from, to improve error reporting. * PR #81: Improved number handling. Now `Value::Number` handles both machine-sized rationals, bignum rationals and floats internally and `Value::NumberBig` is removed. Also, `Value` no longer implements `Ord` but only `PartialOrd`, to handle f64 NaN an infinite values correctly. * Improve parsing of `@else` clauses. * Update spec to 2020-10-29. Tested with rustc 1.47.0 (18bf6b4f0 2020-10-07), 1.44.1 (c7087fe00 2020-06-17), 1.42.0 (b8cedc004 2020-03-09), 1.40.0 (73528e339 2019-12-16), 1.38.0 (625451e37 2019-09-23), 1.48.0-beta.8 (121901459 2020-11-08), and 1.49.0-nightly (25f6938da 2020-11-09), ## Release 0.15.0 - 2020-10-25 Progress: 2320 of 5577 tests passed in dart-sass compatibility mode. ### Breaking changes * The `Item::Comment` enum value now contains a `SassString` rather than a `String`. * The `Error::ParseError` enum value changed, and `ErrPos` is replaced with `SourcePos` and `SourceName`. * The error type of `parse_scss_data` changed to `ParseError`. * `Unit::dimension()` now returns a `Dimension` rather than a `&str`. ### Improvements * PR #79: Refactor some error handling. Relates to #46. * Improve map parsing (a map is parsed as a plain vec of key/value pairs, filtering duplicates happens only when it is evaluated). * Allow multiple `&` items in the same selector. * `&` evaluates to null when used as a value without enclosing selector. * Implement the `@debug` directive. * Fix `a % b` evaluation for negative values. * Allow / ignore comments in properties and values. * Allow `!default` and `!global` in any order on variable declarations. * Improve `inspect(...)` formatting of list values. * Refactor and improve arithmetic on different units. * `ListSeparator` is now `Copy`. * Allow interpolation in comments. * Some refactoring Tested with rustc 1.47.0 (18bf6b4f0 2020-10-07), 1.44.1 (c7087fe00 2020-06-17), 1.42.0 (b8cedc004 2020-03-09), 1.40.0 (73528e339 2019-12-16), 1.38.0 (625451e37 2019-09-23), 1.48.0-beta.5 (4c78178b1 2020-10-21), and 1.49.0-nightly (ffa2e7ae8 2020-10-24). ## Release 0.14.2 - 2020-10-13 Progress: 2294 of 5577 tests passed in dart-sass compatibility mode. * Some improvements in list handling, formatting and introspection. * Change default precision to 10, matching dart-sass. * Semicolon is optional after variable, if last in block or file. * Fix addition (and subtraction) of values with comparable units. * Fix css value equality for map keys and other "special" places. * Recognize known `@`-rules with escaped characters. * Don't copy extra `@charset` rules to output (one is included if needed). * Some internal refactor and cleanup. * Update spec to 2020-10-07. Tested with rustc 1.47.0 (18bf6b4f0 2020-10-07), 1.44.1 (c7087fe00 2020-06-17), 1.42.0 (b8cedc004 2020-03-09), 1.40.0 (73528e339 2019-12-16), 1.38.0 (625451e37 2019-09-23), 1.48.0-beta.2 (212e76c31 2020-10-08), and 1.49.0-nightly (8dae8cdcc 2020-10-12) ## Release 0.14.0 - 2020-10-03 Progress: 2234 of 5510 tests passed in dart-sass compatibility mode. * PR #76 and #78: Target dart-sass rather than libsass compatibility. This sets the target when testing and changes some different behavior, including how strings are parsed and handled. * PR #75 from @divergentdave: Parse and add `Value` variants for BigInt numbers * PR #77: Support `rgba(r g b / a)` and `hsla(h s l / a)` functions, i.e. the `channels` parameter with div-separated alpha channel. * Fix `@import` indention. * Improve function default argument parsing and don't panic in `parse_value_data`. * Handle dictionary-ellipsis style call-by-varargs for functions. * PR #73 from @divergentdave: Remove three unwraps from escaped_char * PR #71 from @connorskees: Further optimize number printing * Update travis url in README. * PR #70 from @svenstaro: Mention grass rather than sassers, as sassers appears to be dead while grass is in rather active development. * Add a CHANGELOG.md * Update spec to 2020-09-17. * Update num-rational to 0.3.0. Tested with rustc 1.46.0 (04488afe3 2020-08-24), 1.44.1 (c7087fe00 2020-06-17), 1.42.0 (b8cedc004 2020-03-09), 1.40.0 (73528e339 2019-12-16), 1.38.0 (625451e37 2019-09-23), 1.47.0-beta.7 (e28d2bd09 2020-10-01), and 1.48.0-nightly (8876ffc92 2020-10-02) ## Release 0.13.0 - 2020-04-19 Progress: 1634 of 3502 tests passed in libsass compatibility mode. * output::Format wraps an output::Style and a precision. The global precision setting is removed. * Value and other structs no longer implents Display, instead the provid a `format` method, that takes an output format and provides a Display implementation. * The `compile_value` rust function now takes a format argument. * Issue #42 (partial): The `min(..)` and `max(...)` functions are handled as plain css functions when valid, while still handling them as sass functions when nessecary. * PR #69, fixing #68: Avoid exponential complexity on parenthesis. * Allow comments in `@function` bodies. * PR #67 from @connorskees: Refactor and fix printing of numbers * When defining multiple variables, having more names than values is allowed. The extra names get null values. * Convert som panics / unwraps to properly handled errors. * There was massive restructuring in the test suite, so almost all tests moved around. I moved remaining tests to build a single test program for the suite rather than several for different directories in the suite (this also means more tests are included in the conversion). * Fix check_spec stats calculation. Thanks to @connorskees for code contributions and bug reports. Tested with rustc 1.42.0 (b8cedc004 2020-03-09), 1.40.0 (73528e339 2019-12-16), 1.38.0 (625451e37 2019-09-23), 1.36.0 (a53f9df32 2019-07-03), 1.43.0-beta.6 (062dea094 2020-04-18), and 1.44.0-nightly (52fa23add 2020-04-18). ## Release 0.12.2 - 2020-02-23 * Fix #63 and #64: Handle DOS-style newlines * Use structopt rather than raw clap for the CLI. * Sass function `str_slice` require integer indexes. * Some cleanup, some of it suggested by clippy. * Removed link to no-longer working graphical progress bar in docs. Thanks to @connorskees for bug reports. Tested with rustc 1.41.0 (5e1a79984 2020-01-27), 1.40.0 (73528e339 2019-12-16), 1.38.0 (625451e37 2019-09-23), 1.36.0 (a53f9df32 2019-07-03), 1.42.0-beta.3 (86f329b41 2020-02-07), and 1.43.0-nightly (436494b8f 2020-02-22). ## Release 0.12.0 - 2019-12-25 * Issue #54: Add a LICENSE file. * PR #57: Allow channel string in rgba() * Issue #58: Let ructe::Error implement std::error::Error. * Issue #59: Improve `@import` and media rules. * Implement `@error` and `@warn` directives. * Improve string unquoting, including multi-position numerical escapes. * Improve at-rule parsing. * Fix strange operator handling. * Implement modulo operator. * Fix line breaks in comments. * Handle bad argument to `random()` function. * Update test suite to e9e219bdf (2019-12-19). * Some refactorig and clean-up. Thanks to @emielbeinema, @maxbrunsfeld, and @Boiethios for contributed code and suggestios. Tested with rustc 1.40.0 (73528e339 2019-12-16), 1.38.0 (625451e37 2019-09-23), 1.36.0 (a53f9df32 2019-07-03), 1.34.2 (6c2484dc3 2019-05-13), 1.41.0-beta.1 (eb3f7c2d3 2019-12-17), and 1.42.0-nightly (a9c1c04e9 2019-12-24). ## Release 0.11.2 - 2019-12-25 * PR #56: The url function is special. Handle `url(foo)` as simply a string if possible. Sometimes, such as `url("foo" + $bar)`, it must be a function returning a string instead. Partially adresses #42. Fixes #41. * PR #55: Implement raw css functions. Handles the `calc`, `element`, `env`, `expression`, `var`, and `progid:...` special functions. Partially adresses #42. Fixes #53. * Issue #50: Make tests more readable. * Improve error handling in selector fns. Avoid a panic in some error conditions. * Update test suite (to fcd6bd6c0, 2019-09-24). * Update bytecount to 0.6.0. * Some internal refactoring. Thanks to @glebm and @nic-harley for reports and suggestions. ## Release 0.11.0 - 2019-07-16 Sass-spec reports 1507 of 2865 tests passed in libsass compatibility mode. * Update `nom` to version 5.0. * A string can start with a `#` without being a color. * Correct parameter name for `unit`, `unitless`, `quote`, and `unquote` functions. * The `random` function ignores units. * An empty unquoted string behaves like null. * Fix some issues with string offsets in `str_slice` and `str_insert`. * The `quote` function can use single quotes when needed. * Return an error rather than panicing on some invalid scss. * Some test updates and fixes in spectest. Tested with rustc 1.36.0 (a53f9df32 2019-07-03), 1.34.2 (6c2484dc3 2019-05-13), 1.32.0 (9fda7c223 2019-01-16), 1.37.0-beta.3 (2ba6de7e2 2019-07-12), and 1.38.0-nightly (4b65a86eb 2019-07-15). ## Release 0.10.2 - 2019-07-07 Sass-spec reports 1472 of 2802 tests passed in libsass compatibility mode. * Update progress number in readme and documentation, since I forgot in 0.10.0. ## Release 0.10.0 - 2019-07-07 * PR #51: Impove string parsing/escaping. * Issue #46, PR #47: Report file position of parse errors, and improve the parser to have errors reported in a more specific position. * Improve error handling in functions, calling a function _can_ yield an error. Partially solves #41: The unsupported call will now yield an error rather than hang `rsass`. * Commandline changes: - Support `-I` commandline argument for include path. - Use lowercase `-v` for version (expected by the test runner). * Some color function improvements: - Handle alpha percentatges in rgba. - The rgb function can be used as rgba with four args. - Use alpha propely when mixing colors. - Handle both alpha and opacity css function fallback. - Implement the grayscale function. - Support three arguments to `rgba` function. * Some list function improvements: - `inspect` shows parens for empty list, and spells out `"null"` for a null value. - Join gets better at selecting wether result should be comma or space separated. - The length function treats a null as an empty list. - Handle singleton in `index` and `nth` functions. * More function improvements: - Implement the `unique_id` function. - Check that indexes are sane in `str_slice` function. - Skip null args even if not last when evaluating a function to a function call. - Implement equality check for builtin functions. * Error, not panic, on unknown mixin. * Allow modifiers on attribute selectors. * Color names are caseless. * Improve handling of url imports. * Update `deunicode` to 1.0 and `rand` to 0.7.0. * Allow interpolation in namespacerule. * Allow ";" after body block. * Lots of test suite updates, including support for .hrx tests in spectest. Target libsass compatibility in testing. I don't really know if I should target libsass or dart-sass compatibility, but libsass seems to be closer to my current implementation, so target that at least for now. Thanks to @maxbrunsfeld and @glebm for code and suggestions. Tested with rustc 1.36.0 (a53f9df32 2019-07-03), 1.34.2 (6c2484dc3 2019-05-13), 1.32.0 (9fda7c223 2019-01-16), 1.37.0-beta.1 (178aa6611 2019-07-04), and 1.38.0-nightly (481068a70 2019-07-05). ## Release 0.9.8 - 2019-02-10 Sass-spec reports 1645 of 3440 tests for sass 3.6 passed. * Improve support for `transparent`. * PR #45 from @glebm: Automatically update passing / failing tests Hardkoded skiplists in spectest.rs is cleared apart for tests where rsass panics. * Issue 43: Normalize newlines in tests. * PR #44 from @glebm: Update to Rust 2018 Edition, Rust v1.31.0+ * Issue #39, PR #40 from @glebm: Parser CallArgs: Allow trailing spacelike sans "," * Issue #32: Make the selectors module pub. * Issue #34, PR #35 from @glebm: Accessing an undefined variable is an error. * Allow input starting with UTF-8 U+FEFF BOM. * Target sass spec version 3.6. Thanks to contributors @glebm, @maxbrunsfeld and @sunjay for code and suggestions. Tested with rustc 1.32.0 (9fda7c223 2019-01-16), 1.31.0 (abe02cefd 2018-12-04), 1.33.0-beta.6 (b203178b6 2019-02-05), and 1.34.0-nightly (3315728c0 2019-02-09). ## Release 0.9.6 - 2019-01-09 A default run of sass-spec found 1680 of 3635 tests passing. * Issues #26, #30, PR #29 from @tw1t611; Add `fr` unit. * Refactor and document the Number type used inside value types. * Allow trailing comma in sass function definitions. * The sass `length` function now correctly returns one for single (non-list) values. * Fix a bug in color function parameter handling. * Add libsass and parser to auto-testing setup. * Update rand to 0.6.1. Tested with 1.31.1 (b6c32da9b 2018-12-18), 1.30.1 (1433507eb 2018-11-07), 1.29.0 (aa3ca1994 2018-09-11), 1.28.0 (9634041f0 2018-07-30), 1.27.2 (58cc626de 2018-07-18), 1.26.2 (594fb253c 2018-06-01), 1.32.0-beta.12 (2bde39b8e 2019-01-05), and 1.33.0-nightly (d22fa2d87 2019-01-08) ## Release 0.9.4 - 2018-09-23 A default run of sass-spec found 1672 of 3483 tests passing. * Allow unicode variable names. * Implement the precision argument. * Implement hex colors with alpha. * More flexible call_args; allow whitespace before separating commas, and allow a comma trailing the last argument. * Test infrastructure: a program spectest now converts selected tests from sass-spec to integration tests, to facilitate keeping tests up-to-date. Tested with rust 1.29.0 (aa3ca1994 2018-09-11), 1.28.0 (9634041f0 2018-07-30), 1.27.2 (58cc626de 2018-07-18), 1.26.2 (594fb253c 2018-06-01), 1.25.0 (84203cac6 2018-03-25), 1.30.0-beta.7 (0ebb25088 2018-09-22), and 1.30.0-nightly (4591a245c 2018-09-22). ## Release 0.9.2 - 2018-09-02 * Fix #25; Avoid crashing on some non-utf8 input. Thanks again to @killercup and rust-fuzz/targets#119 for identifying more parser crashes on non-utf8 input. Tested with rustc 1.28.0 (9634041f0 2018-07-30), 1.27.2 (58cc626de 2018-07-18), 1.26.2 (594fb253c 2018-06-01), 1.25.0 (84203cac6 2018-03-25), 1.24.1 (d3ae9a9e0 2018-02-27), 1.29.0-beta.9 (b4ec8d46e 2018-09-01), and 1.30.0-nightly (28bcffead 2018-09-01). ## Release 0.9.0 - 2018-08-26 A default run of sass-spec found 1661 of 3482 tests passing. Changes since version 0.8.0 includes: * PR #24: Implement a Rgba type and use in css::Value and sass::Value. * PR #22: Partial support for `@at-root`. Supports `&` back-refs but not `with` and `without`. * Add "foo/index.scss" and "foo/_index.scss" when attempting to find "foo" for import. * The parser should fail rather than crash on some non-utf8 input. * PR #21: Introduce a Number type, mainly for sharing some abstraction between css and sass values. * Make the `rgba` function handle non-numeric inputs (e.g. calc(...)). * Implement the `feature-exists` function. * Make `!important` part of value rather than property, so it can be used in function / mixin arguments etc. * A css3 pseudo-element selector may have arguments. * Add support for unicode ranges. * The `@each` construct can bind multipe values. * PR #20: Division is now a BinOp rather than a special case. * Minor improvement in parsing and formatting at-rules. * Fix some clippy complaints. * Minor documentation updates. * Some updates to travis build script and test structure. * Add appveyor (windows) continous integration testing. * Depedency updates: num-rational 0.2.1, nom 4.0 (PR #23) and rand 0.5. Thanks to @killercup and rust-fuzz/targets#119 for identifying some parser crashes on non-utf8 input. Tested with rustc 1.28.0 (9634041f0 2018-07-30), 1.27.2 (58cc626de 2018-07-18), 1.26.2 (594fb253c 2018-06-01), 1.25.0 (84203cac6 2018-03-25), 1.24.1 (d3ae9a9e0 2018-02-27), 1.29.0-beta.6 (5c5be098e 2018-08-25), and 1.30.0-nightly (39e6ba821 2018-08-25). ## Release 0.8.0 - 2018-04-07 A default run of sass-spec found 1583 of 3364 tests passing. Changes since version 0.7.0 includes: * PR #17, #18, and #19 from @ErichDonGubler: Improvements to `check_spec`. * Allow trailing comma in dictionary definition. * Implement the `get-function` function, making a (named) function a css::Value, and modify the call function to take such a Value. The warning when the Value is a Literal is more motivated now. * Add weight arg for invert function. * If a function call fails, output it as-is. * Allow `@include` w/o ";" to be last input. * Use correct names for output styles. The supported styles are `expanded` and `compressed`. * Add maintenence status to manifest. * Impement the `&` value, expanding to the selector containing the value. * Implement the `selector-parse`, `selector-append`, and `selector-nest` functions. * Fix AsciiExt warning on rust 1.23 and up. * Fix #16, Do not build a no-op command line, by specifying commandline as required-features of the bin target. Thanks to @biluohc for the suggestion! * Miscellaneous code cleanup, dependency updates and reformatting. Tested with rustc 1.23.0 (766bd11c8 2018-01-01), 1.24.1 (d3ae9a9e0 2018-02-27), 1.25.0 (84203cac6 2018-03-25), 1.26.0-beta.2 (0e350672e 2018-04-05), and 1.27.0-nightly (eeea94c11 2018-04-06). ## Release 0.7.0 - 2017-12-28 A default run of sass-spec found 1466 of 3339 tests passing (or 1520 of 6094 when claiming to be libsass). Changes since version 0.6.0 includes: * Fix #15 by making building the commandline utility optional. * Fix some issues with string quoting and list whitespace. * Improve support for `@`-rules. * Use num-rational without default features, for faster compilation. Tested with rustc 1.19.0 (0ade33941 2017-07-17), 1.20.0 (f3d6973f4 2017-08-27), 1.21.0 (3b72af97e 2017-10-09), 1.22.1 (05e2e1c41 2017-11-22), 1.23.0-beta.2 (c9107ee93 2017-12-08), and 1.24.0-nightly (1abeb436d 2017-12-27). ## Release 0.6.0 - 2017-12-06 A default run of sass-spec found 1466 of 3339 tests passing (or 1520 of 6094 when claiming to be libsass). Changes since version 0.5.0 includes: * Handle quoting and escaping in strings closer to correct. * Updated lazy_static to version 1.0 * Some internal cleanup. Tested with rustc 1.19.0 (0ade33941 2017-07-17), 1.20.0 (f3d6973f4 2017-08-27), 1.21.0 (3b72af97e 2017-10-09), 1.22.1 (05e2e1c41 2017-11-22), 1.23.0-beta.1 (082b0ff02 2017-11-21), and 1.24.0-nightly (cfba0d446 2017-12-05). ## Release 0.5.0 - 2017-11-05 A default run of sass-spec found 1359 of 3331 tests passing (or 1416 of 6086 when claiming to be libsass). Changes since version 0.4.0 includes: * Improve handling of quoted / unquoted strings and interpolation. Still not correct, but exhibits correct behavior in more tests than earlier. * Support interpolation in selectors. * Support interpolation in property names. * PR #14: Implement map syntax and map functions. * Make error handling not break if nom is compiled with verbose-errors. * Miscellaneous internal cleanups, some suggested by clippy. Tested with rustc 1.18.0 (03fc9d622 2017-06-06), 1.19.0 (0ade33941 2017-07-17), 1.20.0 (f3d6973f4 2017-08-27), 1.21.0 (3b72af97e 2017-10-09), 1.22.0-beta.2 (a0a837c45 2017-10-20), and 1.23.0-nightly (d762b1d6c 2017-11-04). ## Release 0.4.0 - 2017-10-15 A default run of sass-spec found 1163 of 3331 tests passing (or 1227 of 6086 when claiming to be libsass). Changes since version 0.3.4 includes: * Implemented bracketed lists. * Support CSS3 pseudo elements * Added functions: `unitless`, `content-exists`, `zip`, `is-bracketed`, `join`. * Update the nom parser library to 3.2. * PR #13 Split of css values from sass values. * PR #10 Preparatory work for splitting Value * PR #7 Extract parser into separate module * PR #8 Extract som modules from lib.rs * Pin rustfmt to 0.8.4, to avoid surprising formatting changes. * PR #6 Don't require a git plugin for the check-spec. Thank You to [Jonas Nicklas](https://github.com/jnicklas) for many contributions. Tested with rustc 1.18.0 (03fc9d622 2017-06-06), 1.19.0 (0ade33941 2017-07-17), 1.20.0 (f3d6973f4 2017-08-27), rustc 1.21.0 (3b72af97e 2017-10-09), 1.22.0-beta.1 (e694dd37b 2017-10-12), and 1.22.0-nightly (7778906be 2017-10-14). ## Release 0.3.4 - 2017-06-05 A default run of sass-spec found 1146 of 3310 tests passing (or 1215 of 6065 when claiming to be libsass). Changes since version 0.3.2 includes: * Improve handling of at-rules. * Allow block comments in selectors. * Make FileContext::file(..) public. * Test and fix type-of for booleans. * Test and fix parsing of some strange lists. * Test and fix unary operations. * Test and fix some strange string values. * Some internal cleanup and code restructuring. Tested in rust 1.15.1 (021bd294c 2017-02-08), 1.16.0 (30cf806ef 2017-03-10), 1.17.0 (56124baa9 2017-04-24), 1.18.0-beta.4 (0308c9865 2017-05-27), and 1.19.0-nightly (0418fa9d3 2017-06-04). ## Release 0.3.2 - 2017-05-06 A default run of sass-spec found 1053 of 3299 tests passing (or 1111 of 6054 when claiming to be libsass). Changes since version 0.3.0 includes: * Clean up nom error creation, to be compatible with both default and verbose-errors nom. * Implement some more quote strangenes. * Minor internal cleanup Tested in rust 1.15.1, 1.16.0, 1.17.0 (stable), 1.18.0-beta.1 (4dce67253 2017-04-25), and 1.19.0-nightly (f4209651e 2017-05-05). ## Release 0.3.0 - 2017-05-06 A default run of sass-spec found 1039 of 3299 tests passing (or 1097 of 6054 when claiming to be libsass). Changes since version 0.2.0 includes: * PR #4: Support application-defined functions in rust. * Equal strings are equal even if the quoting differs (e.g. foo == "foo"). * Improved value parsing in many ways. * Implemened numeric rounding rules to match libsass default. * Improved handling of null values. * Fix some minor output formatting issues. * Handle arguments to pseudo-selectors (which are themselfs selectors) properly. * Support for rust 1.14 is dropped. Tested in rust 1.15.1, 1.16.0, 1.17.0 (stable), 1.18.0-beta.1 (4dce67253 2017-04-25), and 1.19.0-nightly (f4209651e 2017-05-05). ## Release 0.2.0 - 2017-04-28 A default run of sass-spec found 841 of 3294 tests passing (or 899 of 6049 when claiming to be libsass). Changes since version 0.1.10 includes: * Err results from public functions is now `Error`, not `String`. This is a breaking change in public api. * PR #2: value interpolation (as separate values and in strings). * Implement basic `@content` for mixins (some scoping issues remains). * Support namespace properties. * Improve parsing of unquoted strings. * Implement the `call()` function. * Implement the `ie-hex-str()` function. * Allow alternative parameter names to `rgba()` function. * Improve defered operators handling. * Improve scopeing and value evaluating (but not enough). * Allow function declarations in blocks. * Implement `for`, `while`, and `each` in user-defined functions. * Fix scoping error for while loops. * Support css unary + and -. * Misc internal or smaller improvements (some suggested by clippy). Tested in rust 1.14.0, 1.15.1, 1.16.0, 1.17.0 (stable), 1.18.0-beta.1 (4dce67253 2017-04-25) and 1.18.0-nightly (94e884b63 2017-04-27). ## Release 0.1.10 - 2017-04-14 * Improve string concatenation with plus operator. * Support `*` in selectors * Support `\` in selectors * Support varargs functions. * Allow trailing commas in lists. * Implement list functions `append`, `length`, and `index`. * Implement numeric functions `min` and `max`. * Improve `@for` and `@each` loop handling. * Internal cleanup and refactorisation. Tested in rust 1.14.0, 1.15.1, 1.16.0 (stable), 1.17.0-beta.3 (beta), and 1.18.0-nightly (28a742997 2017-04-13). ## Release 0.1.8 - 2017-04-08 A default run of sass-spec found 576 of 3294 tests passing (or 619 of 6049 when claiming to be libsass). Changes since version 0.1.6 includes: * Support user-defined functions. * Support functions `global_variable_exists`, `function_exists`, `mixin_exists`. * Support `@each`, `@for` and `@while` loops. * Make dash and underscore equivalent in names. * Fix all tests from `spec/scope`. * Improve documentation. * Miscellaneous refactorisations and cleanups. Tested in rust 1.14.0, 1.15.1, 1.16.0 (stable), 1.17.0-beta.3 (beta), and 1.18.0-nightly (53f4bc311 2017-04-07). ## Release 0.1.6 - 2017-03-05 A default run of sass-spec found 502 of 3289 tests passing (or 532 of 6044 when claiming to be libsass). Changes since version 0.1.4 includes: * Many more functions implemented. * Better support för `at` directieves. * Support the `!default` tag on variable declaration. * Support all known css units. * Support `!important` tag on properties. * Allow the `*` character inside comments. Tested in rust 1.14.0, 1.15.1, 1.16.0-beta.3 (stable), and 1.17.0-nightly (b1e31766d 2017-03-03). ## Release 0.1.4 - 2017-02-08 A default run of sass-spec found 420 of 3286 tests running (or 449 of 6041 when claiming to be libsass). * Very basic support for media queries. * Implement more color functions (the internal representation of a color now uses Rational for the channels, to avoid rounding errors when using the result of one color function as input to another). * More complete parsing of simple numbers. * Support ambiguous imports, as examplified by basic test 33. * Use the `?` operator rather than the `try!` macro. * Proper handling of escaped quotes in quoted strings (basic test 53). * Miscellaneous internal cleanups and refactorings Tested in rust 1.14, 1.15, and stable and nightly as of 2017-02-08. ## Release 0.1.2 - 2017-01-29 Second release. Passes 380 tests of 6026 from sass-spec. Changes since 0.1.0 include: * Basic pseudo-classes. * Functions return a Result (so they can fail without panic). Note that all other error handling is still simply panics. * Implemented functions `str-slice`, `str-insert`, `str-length`. * Documentation ## Release 0.1.0 - 2017-01-22 First release to crates.io. Passes 346 tests of the sass-spec suite. ## Initial commit - 2016-12-20 The first three tests (of several thousand) works. :-) rsass-0.29.0/Cargo.toml000066400000000000000000000001511474765622100147000ustar00rootroot00000000000000[workspace] members = [ "rsass", "rsass-cli", "rsass-macros", "spectest", ] resolver = "2" rsass-0.29.0/LICENSE000066400000000000000000000032241474765622100137610ustar00rootroot00000000000000rsass is dual licensed under the MIT License or Apache License 2.0. Copyright (c) 2019 Rasmus Kaj MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Apache License 2.0 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. rsass-0.29.0/README.md000066400000000000000000000045571474765622100142450ustar00rootroot00000000000000# rsass Sass reimplemented in rust with nom. The "r" in the name might stand for the Rust programming language, for "re-implemented", or possibly for my name Rasmus. [![Crate](https://img.shields.io/crates/v/rsass.svg)](https://crates.io/crates/rsass) [![docs](https://docs.rs/rsass/badge.svg)](https://docs.rs/rsass) [![Github build](https://github.com/kaj/rsass/workflows/CI/badge.svg)](https://github.com/kaj/rsass/actions) ## Commandline and library To make compiling faster when rsass is used as a library crate (which is probably the dominant use-case), I have made the commandline interface a separate crate. When building the monorepo, both the library and the cli are built by default. To install the cli, use: cargo install rsass-cli To use the rust library, add `rsass` to your dependencies. cargo add rsass ## Sass language and implementation status The sass language [is defined in its reference doc](http://sass-lang.com/documentation/). This implementation is incomplete but getting there, if slowly. Progress: 5879 of 12589 tests passed. If you need _complete_ sass support, you'll need [dart sass](https://sass-lang.com/dart-sass). Another alternative is [grass](https://crates.io/crates/grass) which is another incomplete pure rust implementation. That said, this implementation has reached a version where I find it usable for my personal projects, and the number of working tests are improving. ## Contributing Welcome! The first step in any contribution is probably to either try to use the crate or to read some of the documentation. When you do, you might find something broken, not yet implemented, or just plain incomprehensible. If so, please [see if there is an issue](https://github.com/kaj/rsass/issues) matching the problem or file a new one. If you contribute code through a pull request, github will automatically check that the code compiles and passes its tests with all required versions of rust, and that the code is properly formatted according to rustfmt. Hopefully, I will then review the code, and either ask you for changes or merge it. This is a hobby project, so please excuse if the review is delayed. I, the rsass maintainer, will do my best to follow both the [Sass Community Guidelines](https://sass-lang.com/community-guidelines) and the [Rust Code of Conduct](https://www.rust-lang.org/policies/code-of-conduct), and I ask you to do the same. rsass-0.29.0/check_spec000077500000000000000000000034601474765622100147730ustar00rootroot00000000000000#! /bin/sh set -euo pipefail # # How I run the sass-spec checker for rsass. # # Default run: # ./check-spec # Regenerate the rust tests in tests/spec: # ./check-spec update-tests # Just show which "basic" tests are still failing: # ./check-spec basic # Generate stats to update lib.rs docs and readme: # ./check-spec stats # cd `dirname "$0"` update="no" case "${1:-}" in "-u"|"--update") update="yes" shift ;; esac if [ -d sass-spec ]; then if [ "$update" == "yes" ]; then (cd sass-spec && git fetch >&2 && git rebase origin/main --autostash >&2) fi else git clone https://github.com/sass/sass-spec.git >&2 fi IMPL=dart-sass check() { cargo build --release --bin rsass --features=unimplemented_args >&2 || exit 1 echo "About to test ${1:-everything}" (cd sass-spec; \ npm install; \ npm run sass-spec -- --command '../target/release/rsass' --cmd-args='' --impl $IMPL -- $*) } list_fails() { grep ^SassSpec:: | sed -e 's#.*test__##' -e 's# .*##' | sort } case "${1:-}" in "") check ;; "-h"|"--help"|"help") echo "$0 stats ;: Give stats for passes / fails suitable for docs." echo "$0 ;: just run all the tests" echo "$0 --help ;: print this help" echo "Other args will be used as test subset specifications." echo "Examples: basic core_functions selector-functions" echo " scss parser values" ;; "stats") (check || true) | \ rg --text --no-line-number --no-unicode \ '^(\d+) runs, (\d+) passing, (\d+) failures, (\d+) todo, (\d+) ignored, (\d+) errors' \ --replace 'echo "$0"; echo "Progress: $[$2] of $[$1-$4-$5] tests passed"' - \ | bash ;; "update-tests") cargo run --release --bin=spectest && cargo fmt ;; *) check spec/$1 ;; esac rsass-0.29.0/rls.toml000066400000000000000000000000211474765622100144410ustar00rootroot00000000000000build_lib = true rsass-0.29.0/rsass-cli/000077500000000000000000000000001474765622100146535ustar00rootroot00000000000000rsass-0.29.0/rsass-cli/Cargo.toml000066400000000000000000000011431474765622100166020ustar00rootroot00000000000000[package] name = "rsass-cli" version = "0.29.0" authors = ["Rasmus Kaj "] description = "Commandline interface for rsass, compiles scss to css." categories = ["command-line-utilities", "web-programming"] keywords = ["scss", "sass", "css", "web"] repository = "https://github.com/kaj/rsass" readme = "README.md" license = "MIT OR Apache-2.0" edition = "2021" rust-version = "1.74.0" [[bin]] name = "rsass" path = "src/main.rs" [features] unimplemented_args = [] [dependencies] rsass = { path = "../rsass", version = "0.29.0" } clap = { version = "4.1.1", features = ["derive", "wrap_help"] } rsass-0.29.0/rsass-cli/README.md000066400000000000000000000035321474765622100161350ustar00rootroot00000000000000# rsass Sass reimplemented in rust with nom. The "r" in the name might stand for the Rust programming language, for "re-implemented", or possibly for my name Rasmus. This is the `rsass-cli` binary crate. To use it, install it and run the binary. cargo install rsass-cli rsass --help [![Crate](https://img.shields.io/crates/v/rsass-cli.svg)](https://crates.io/crates/rsass-cli) [![Github build](https://github.com/kaj/rsass/workflows/CI/badge.svg)](https://github.com/kaj/rsass/actions) ## Sass language and implementation status The sass language [is defined in its reference doc](http://sass-lang.com/documentation/). This implementation is incomplete but getting there, if slowly. . If you want a standalone sass executable, you're probably better of with [dart sass](https://sass-lang.com/dart-sass). If a rust crate is easier to install or something, feel free to use this crate. ## Contributing Welcome! The first step in any contribution is probably to either try to use the crate or to read some of the documentation. When you do, you might find something broken, not yet implemented, or just plain incomprehensible. If so, please [see if there is an issue](https://github.com/kaj/rsass/issues) matching the problem or file a new one. If you contribute code through a pull request, github will automatically check that the code compiles and passes its tests with all required versions of rust, and that the code is properly formatted according to rustfmt. Hopefully, I will then review the code, and either ask you for changes or merge it. This is a hobby project, so please excuse if the review is delayed. I, the rsass maintainer, will do my best to follow both the [Sass Community Guidelines](https://sass-lang.com/community-guidelines) and the [Rust Code of Conduct](https://www.rust-lang.org/policies/code-of-conduct), and I ask you to do the same. rsass-0.29.0/rsass-cli/src/000077500000000000000000000000001474765622100154425ustar00rootroot00000000000000rsass-0.29.0/rsass-cli/src/main.rs000066400000000000000000000056341474765622100167440ustar00rootroot00000000000000use clap::Parser; use rsass::output::{Format, Style}; use rsass::{input, Error}; use std::io::{stdout, Write}; use std::path::PathBuf; use std::process::ExitCode; fn main() -> ExitCode { match Args::parse().run() { Ok(()) => ExitCode::SUCCESS, Err(err) => { eprintln!("Error: {err}"); ExitCode::FAILURE } } } #[derive(Parser)] #[command( about, author, version, disable_version_flag = true, after_help = "For information about rsass and its current state of \ development, please refer to https://github.com/kaj/rsass/ .\ \n\n\ The sass / scss language itself is documented at \ https://sass-lang.com/ ." )] struct Args { /// Print version informaion #[arg(long, short, action = clap::ArgAction::Version)] _version: Option, /// How many digits of precision to use when outputting decimal numbers #[arg(long, default_value = "5")] precision: usize, /// How to format output #[arg(long, short = 't', value_enum, default_value_t = StyleArg::Expanded)] style: StyleArg, /// Some kind of forced ascii output /// (Not implemented, but set by the sass-spec test runner) #[cfg(feature = "unimplemented_args")] #[arg(long)] #[allow(unused)] no_unicode: bool, /// No color in error messages /// (not that there is any support for color in error messages /// anyway yet, but the test runner uses this flag) #[cfg(feature = "unimplemented_args")] #[arg(long)] #[allow(unused)] no_color: bool, /// Verbose diagnostics /// (Always on, but set by the sass-spec test runner) #[cfg(feature = "unimplemented_args")] #[arg(long)] #[allow(unused)] verbose: bool, /// Where to search for included resources. #[arg(long, short = 'I')] load_path: Option, /// Sass file(s) to translate #[arg(required = true)] input: Vec, } impl Args { fn run(self) -> Result<(), Error> { let format = Format { style: self.style.into(), precision: self.precision, }; for name in &self.input { let (mut context, source) = input::FsContext::for_path(name)?; if let Some(include_path) = &self.load_path { context.push_path(include_path.as_ref()); } let result = context.with_format(format).transform(source)?; stdout().write_all(&result)?; } Ok(()) } } #[derive(Clone, clap::ValueEnum)] enum StyleArg { /// The expanded format, nice readable css. Expanded, /// The compressed format, saves download size. Compressed, } impl From for Style { fn from(arg: StyleArg) -> Self { match arg { StyleArg::Expanded => Style::Expanded, StyleArg::Compressed => Style::Compressed, } } } rsass-0.29.0/rsass-macros/000077500000000000000000000000001474765622100153705ustar00rootroot00000000000000rsass-0.29.0/rsass-macros/Cargo.toml000066400000000000000000000010561474765622100173220ustar00rootroot00000000000000[package] name = "rsass-macros" version = "0.29.0" authors = ["Rasmus Kaj "] categories = ["web-programming"] keywords = ["scss", "sass", "css", "web", "macro"] description = "Sass as a rust function-like macro." documentation = "https://docs.rs/rsass-macros" repository = "https://github.com/kaj/rsass" readme = "README.md" license = "MIT OR Apache-2.0" edition = "2021" rust-version = "1.65.0" [lib] proc-macro = true [dependencies] rsass = { path = "../rsass", version = "0.29.0" } proc-macro2 = "1.0.32" quote = "1.0.22" syn = "2.0.2" rsass-0.29.0/rsass-macros/README.md000066400000000000000000000020271474765622100166500ustar00rootroot00000000000000# rsass-macros Sass reimplemented in rust with nom. The "r" in the name might stand for the Rust programming language, for "re-implemented", or possibly for my name Rasmus. This is the `rsass-macros` crate, giving rust projects access to sass-compiled strings in compile-time. To use it, add `rsass-macros` to your dependencies in a rust project. cargo add rsass-macros [![Crate](https://img.shields.io/crates/v/rsass-macros.svg)](https://crates.io/crates/rsass-macros) [![docs](https://docs.rs/rsass-macros/badge.svg)](https://docs.rs/rsass-macros) [![Github build](https://github.com/kaj/rsass/workflows/CI/badge.svg)](https://github.com/kaj/rsass/actions) ## Sass language and implementation status The sass language [is defined in its reference doc](http://sass-lang.com/documentation/). See [the rsass crate](https://docs.rs/rsass) or the the [rsass monorepo](https://github.com/kaj/rsass/) for the implementation status. ## Contributing Welcome! Please see the [rsass monorepo](https://github.com/kaj/rsass/) about contributing. rsass-0.29.0/rsass-macros/src/000077500000000000000000000000001474765622100161575ustar00rootroot00000000000000rsass-0.29.0/rsass-macros/src/lib.rs000066400000000000000000000045271474765622100173030ustar00rootroot00000000000000//! Convert scss to css at compile-type. //! Implemented with [rsass]. use proc_macro::TokenStream; use proc_macro2::Span; use quote::ToTokens; use rsass::output::{Format, Style}; use std::env::var_os; use std::path::PathBuf; use syn::{parse_macro_input, Error, LitStr}; /// Convert a scss string to css at compile time. /// /// The only argument is literal string of scss code. /// /// # Examples /// /// ```` /// use rsass_macros::scss; /// const CSS: &str = scss!("p { em { font-style: italic; } font: serif; }"); /// assert_eq!(CSS, "p{font:serif}p em{font-style:italic}\n"); /// ```` #[proc_macro] pub fn scss(tokens: TokenStream) -> TokenStream { let input = parse_macro_input!(tokens as LitStr); let format = Format { style: Style::Compressed, precision: 10, }; match rsass::compile_scss(input.value().as_bytes(), format) { Ok(output) => { let output = core::str::from_utf8(&output).unwrap(); LitStr::new(output, Span::call_site()) .to_token_stream() .into() } Err(err) => Error::new(Span::call_site(), format!("{err:?}")) .into_compile_error() .into(), } } /// Load and convert a scss string to css at compile time. /// /// The only argument is a path given as a literal string. /// The path is evaluated from the crate manifest directory of the /// code calling the macro (the directory containing your `Cargo.toml` /// file). /// /// # Examples /// /// ```` /// use rsass_macros::include_scss; /// const CSS: &str = include_scss!("tests/example.scss"); /// assert_eq!(CSS, "body{font-family:serif}\n"); /// ```` #[proc_macro] pub fn include_scss(tokens: TokenStream) -> TokenStream { let path = parse_macro_input!(tokens as LitStr); let format = Format { style: Style::Compressed, precision: 10, }; let path = PathBuf::from(var_os("CARGO_MANIFEST_DIR").unwrap_or_default()) .join(path.value()); match rsass::compile_scss_path(&path, format) { Ok(output) => { let output = core::str::from_utf8(&output).unwrap(); LitStr::new(output, Span::call_site()) .to_token_stream() .into() } Err(err) => Error::new(Span::call_site(), format!("{err}")) .into_compile_error() .into(), } } rsass-0.29.0/rsass-macros/tests/000077500000000000000000000000001474765622100165325ustar00rootroot00000000000000rsass-0.29.0/rsass-macros/tests/example.scss000066400000000000000000000000641474765622100210620ustar00rootroot00000000000000// Samle scss file body { font-family: serif; } rsass-0.29.0/rsass-macros/tests/test_macro.rs000066400000000000000000000004641474765622100212440ustar00rootroot00000000000000#[test] fn test_macro() { const CSS: &'static str = rsass_macros::scss!( r#" .class { background: red; &:hover { background: blue; } } "# ); assert_eq!(".class{background:red}.class:hover{background:blue}\n", CSS) } rsass-0.29.0/rsass/000077500000000000000000000000001474765622100141065ustar00rootroot00000000000000rsass-0.29.0/rsass/Cargo.toml000066400000000000000000000012001474765622100160270ustar00rootroot00000000000000[package] name = "rsass" version = "0.29.0" authors = ["Rasmus Kaj "] categories = ["web-programming"] keywords = ["scss", "sass", "css", "web"] description = "Sass implementation in pure rust (not complete yet)" documentation = "https://docs.rs/rsass" repository = "https://github.com/kaj/rsass" readme = "README.md" license = "MIT OR Apache-2.0" edition = "2021" rust-version = "1.65.0" [dependencies] arc-swap = "1.5.0" fastrand = "2.0" lazy_static = "1.0" nom = "8.0" nom-language = "0.1.0" tracing = "0.1.34" [badges] maintenance = { status = "actively-developed" } [dev-dependencies] tracing-subscriber = "0.3.11" rsass-0.29.0/rsass/README.md000066400000000000000000000041321474765622100153650ustar00rootroot00000000000000# rsass Sass reimplemented in rust with nom. The "r" in the name might stand for the Rust programming language, for "re-implemented", or possibly for my name Rasmus. This is the `rsass` library crate. To use it, add `rsass` to your dependencies in a rust project. cargo add rsass [![Crate](https://img.shields.io/crates/v/rsass.svg)](https://crates.io/crates/rsass) [![docs](https://docs.rs/rsass/badge.svg)](https://docs.rs/rsass) [![Github build](https://github.com/kaj/rsass/workflows/CI/badge.svg)](https://github.com/kaj/rsass/actions) ## Sass language and implementation status The sass language [is defined in its reference doc](http://sass-lang.com/documentation/). This implementation is incomplete but getting there, if slowly. Progress: 5879 of 12589 tests passed. If you need _complete_ sass support, you'll need to call [dart sass](https://sass-lang.com/dart-sass). Another alternative is [grass](https://crates.io/crates/grass) which is another incomplete pure rust implementation. That said, this implementation has reached a version where I find it usable for my personal projects, and the number of working tests are improving. ## Contributing Welcome! The first step in any contribution is probably to either try to use the crate or to read some of the documentation. When you do, you might find something broken, not yet implemented, or just plain incomprehensible. If so, please [see if there is an issue](https://github.com/kaj/rsass/issues) matching the problem or file a new one. If you contribute code through a pull request, github will automatically check that the code compiles and passes its tests with all required versions of rust, and that the code is properly formatted according to rustfmt. Hopefully, I will then review the code, and either ask you for changes or merge it. This is a hobby project, so please excuse if the review is delayed. I, the rsass maintainer, will do my best to follow both the [Sass Community Guidelines](https://sass-lang.com/community-guidelines) and the [Rust Code of Conduct](https://www.rust-lang.org/policies/code-of-conduct), and I ask you to do the same. rsass-0.29.0/rsass/src/000077500000000000000000000000001474765622100146755ustar00rootroot00000000000000rsass-0.29.0/rsass/src/css/000077500000000000000000000000001474765622100154655ustar00rootroot00000000000000rsass-0.29.0/rsass/src/css/atrule.rs000066400000000000000000000077351474765622100173430ustar00rootroot00000000000000use super::{ BodyItem, Comment, CustomProperty, Import, Item, MediaRule, Property, Rule, Value, }; use crate::output::CssBuf; use std::io::{self, Write}; /// An `@something` rule in css. /// /// Note that some well-known at rules (`@media`, `@keyframes`, ...) /// probably should have their own types. #[derive(Clone, Debug)] pub struct AtRule { name: String, args: Value, // Some<[]> outputs "{}", None outputs ";". body: Option>, } impl AtRule { pub(crate) fn new( name: String, args: Value, body: Option>, ) -> Self { Self { name, args, body } } pub(crate) fn no_body(&self) -> bool { self.body.is_none() } pub(crate) fn write(&self, buf: &mut CssBuf) -> io::Result<()> { buf.do_indent_no_nl(); write!(buf, "@{}", self.name)?; if !self.args.is_null() { write!(buf, " {}", self.args.format(buf.format()))?; } if let Some(body) = &self.body { if let [AtRuleBodyItem::Comment(c)] = &body[..] { buf.add_one(" { ", "{"); c.write(buf); buf.pop_nl(); buf.add_one(" }\n", "}"); } else { buf.start_block(); for item in body { item.write(buf)?; } buf.end_block(); } } else { buf.add_one(";\n", ";"); } Ok(()) } } /// Something that may exist in the body of an [`AtRule`]. #[derive(Clone, Debug)] pub enum AtRuleBodyItem { /// An `@import` statement. Import(Import), /// A comment Comment(Comment), /// A rule Rule(Rule), /// A raw property. Property(Property), /// A custom property declaration with a name and a value. CustomProperty(CustomProperty), /// An `@media` rule. MediaRule(MediaRule), /// An `@` rule. AtRule(AtRule), } impl AtRuleBodyItem { pub(crate) fn write(&self, buf: &mut CssBuf) -> io::Result<()> { match self { Self::Import(import) => import.write(buf)?, Self::Comment(comment) => comment.write(buf), Self::Rule(rule) => rule.write(buf)?, Self::Property(property) => property.write(buf), Self::CustomProperty(cp) => cp.write(buf), Self::MediaRule(rule) => rule.write(buf)?, Self::AtRule(rule) => rule.write(buf)?, } Ok(()) } } impl From for AtRuleBodyItem { fn from(rule: Rule) -> Self { Self::Rule(rule) } } impl From for AtRuleBodyItem { fn from(rule: Comment) -> Self { Self::Comment(rule) } } impl From for AtRuleBodyItem { fn from(rule: Import) -> Self { Self::Import(rule) } } impl From for AtRuleBodyItem { fn from(rule: Property) -> Self { Self::Property(rule) } } impl From for AtRuleBodyItem { fn from(rule: AtRule) -> Self { Self::AtRule(rule) } } impl From for AtRuleBodyItem { fn from(rule: MediaRule) -> Self { Self::MediaRule(rule) } } impl From for AtRuleBodyItem { fn from(value: BodyItem) -> Self { match value { BodyItem::Import(i) => Self::Import(i), BodyItem::Property(p) => Self::Property(p), BodyItem::CustomProperty(p) => Self::CustomProperty(p), BodyItem::Comment(c) => Self::Comment(c), BodyItem::ARule(r) => Self::AtRule(r), } } } impl TryFrom for AtRuleBodyItem { type Error = &'static str; fn try_from(value: Item) -> Result { match value { Item::Comment(x) => Ok(x.into()), Item::Import(x) => Ok(x.into()), Item::Rule(x) => Ok(x.into()), Item::MediaRule(x) => Ok(x.into()), Item::AtRule(x) => Ok(x.into()), Item::Separator => Err("separator not supported here"), } } } rsass-0.29.0/rsass/src/css/binop.rs000066400000000000000000000135431474765622100171500ustar00rootroot00000000000000use super::{is_function_name, InvalidCss, Value}; use crate::output::{Format, Formatted}; use crate::value::{CssDimensionSet, Numeric, Operator}; use std::fmt::{self, Display, Write}; /// A binary operation. #[derive(Clone, Debug, Eq, PartialOrd)] pub struct BinOp { a: Value, s1: bool, op: Operator, s2: bool, b: Value, } impl BinOp { pub(crate) fn new( a: Value, s1: bool, op: Operator, s2: bool, b: Value, ) -> Self { Self { a, s1, op, s2, b } } pub(crate) fn op(&self) -> Operator { self.op } pub(crate) fn a(&self) -> &Value { &self.a } pub(crate) fn b(&self) -> &Value { &self.b } /// Get this value, but marked as calculated. /// /// Make sure arithmetic operators are evaluated. pub fn into_calculated(mut self) -> Value { self.a = self.a.into_calculated(); self.b = self.b.into_calculated(); match self.op.eval(self.a.clone(), self.b.clone()) { Ok(Some(v)) => v, _ => self.into(), } } /// Validates that this operation is valid in css, even outside of /// a `calc(...)` value. pub(crate) fn valid_css(mut self) -> Result { match self.op { Operator::Div => { self.a = self.a.valid_css()?; self.b = self.b.valid_css()?; Ok(self) } Operator::Plus | Operator::Minus => { if self.a.is_calculation() || self.b.is_calculation() { Err(InvalidCss::UndefOp(self.into())) } else { fn cmp_dim(x: &Numeric) -> Option { let u = &x.unit; if u.is_known() && !u.is_percent() { Some(u.css_dimension()) } else { None } } if let (Value::Numeric(a, _), Value::Numeric(b, _)) = (&self.a, &self.b) { if let (Some(a_u), Some(b_u)) = (cmp_dim(a), cmp_dim(b)) { if a_u != b_u { return Err(InvalidCss::Incompat( a.clone(), b.clone(), )); } } } Ok(self) } } _ => Err(InvalidCss::UndefOp(self.into())), } } /// Format this operation. pub fn format(&self, format: Format) -> Formatted { Formatted { value: self, format, } } pub(crate) fn add_as_join(&self) -> bool { self.op == Operator::Plus && (add_as_join(&self.a) || add_as_join(&self.b)) } } impl PartialEq for BinOp { fn eq(&self, other: &Self) -> bool { self.op == other.op && self.a == other.a && self.b == other.b } } impl From for Value { fn from(value: BinOp) -> Self { Self::BinOp(Box::new(value)) } } impl Display for Formatted<'_, BinOp> { fn fmt(&self, out: &mut fmt::Formatter) -> fmt::Result { if self.value.add_as_join() { // The plus operator is also a concat operator self.value.a.format(self.format).fmt(out)?; self.value.b.format(self.format).fmt(out) } else { use Operator::{Div, Minus, Plus}; fn is_op(v: &Value) -> Option { match v { Value::BinOp(op) => Some(op.op), _ => None, } } // TODO: This simplification should probably be done in eval. let (op, b) = match (self.value.op, &self.value.b) { (Plus, Value::Numeric(v, _)) if v.value.is_negative() => { (Minus, Value::from(-v)) } (Minus, Value::Numeric(v, _)) if v.value.is_negative() => { (Plus, Value::from(-v)) } (Div, Value::Numeric(v, c)) if !v.value.is_finite() && !v.is_no_unit() => { ( Div, Value::Paren(Box::new(Value::Numeric(v.clone(), *c))), ) } (op, Value::Paren(p)) => { if let Some(op2) = is_op(p.as_ref()) { if op2 > op { (op, *p.clone()) } else { (op, self.value.b.clone()) } } else { (op, self.value.b.clone()) } } (op, Value::BinOp(op2)) if ((op2.op < op) || (op == Minus && op2.op == Minus)) && !(op.is_cmp() && op2.op.is_cmp()) => { (op, Value::Paren(Box::new(self.value.b.clone()))) } (op, v) => (op, v.clone()), }; self.value.a.format(self.format).fmt(out)?; if self.value.s1 { out.write_char(' ')?; } op.fmt(out)?; if self.value.s2 { out.write_char(' ')?; } b.format(self.format).fmt(out) } } } fn add_as_join(v: &Value) -> bool { match v { Value::List(..) | Value::True | Value::False => true, Value::Literal(ref s) => !s.is_css_fn(), Value::Call(ref name, _) => !is_function_name(name), Value::BinOp(op) => op.add_as_join(), _ => false, } } rsass-0.29.0/rsass/src/css/call_args.rs000066400000000000000000000077261474765622100177760ustar00rootroot00000000000000use super::{is_not, Value}; use crate::ordermap::OrderMap; use crate::sass::{ArgsError, Name}; use crate::value::ListSeparator; use std::default::Default; use std::fmt; /// the actual arguments of a function or mixin call. /// /// There are both positional and named values. #[derive(Clone, Debug, Default, PartialEq, Eq, PartialOrd)] pub struct CallArgs { pub(crate) positional: Vec, // Ordered for formattig. pub(crate) named: OrderMap, pub(crate) trailing_comma: bool, } impl CallArgs { /// Create args from a Value. /// /// The value may be a list of arguments or a single argument. pub fn from_value(v: Value) -> Result { match v { Value::ArgList(args) => Ok(args), Value::List(v, Some(ListSeparator::Comma), false) => { Ok(Self::from_list(v)) } Value::Map(args) => { let mut result = Self::default(); result.add_from_value_map(args)?; Ok(result) } Value::Null => Ok(Self::default()), v => Ok(Self::from_single(v)), } } /// Create args that is one single positional argument. pub(crate) fn from_single(arg: Value) -> Self { Self::from_list(vec![arg]) } pub(crate) fn from_list(positional: Vec) -> Self { Self { positional, ..Default::default() } } pub(crate) fn from_iter(positional: I) -> Self where T: Into, I: IntoIterator, { Self::from_list(positional.into_iter().map(Into::into).collect()) } pub(crate) fn add_from_value_map( &mut self, map: OrderMap, ) -> Result<(), String> { for (k, v) in map { match k { Value::Null => self.positional.push(v), Value::Literal(s) => { self.named.insert(s.value().into(), v); } x => return Err(is_not(&x, "a string")), } } Ok(()) } pub(crate) fn take_positional(&mut self, n: usize) -> Vec { let n = std::cmp::min(n, self.positional.len()); let t = self.positional.split_off(n); std::mem::replace(&mut self.positional, t) } pub(crate) fn only_named(&mut self, name: &Name) -> Option { if self.positional.is_empty() && self.named.len() == 1 { self.named.remove(name) } else { None } } pub(crate) fn get_single(&self) -> Result<&Value, ArgsError> { self.check_no_named()?; match self.positional.len() { 1 => Ok(self.positional.first().unwrap()), 0 => Ok(&Value::Null), n => Err(ArgsError::TooMany(1, n)), } } pub(crate) fn check_no_named(&self) -> Result<(), ArgsError> { if let Some(extra) = self.named.keys().next() { Err(ArgsError::Unexpected(extra.clone())) } else { Ok(()) } } /// Get number of arguments. pub fn len(&self) -> usize { self.positional.len() + self.named.len() } /// Return true if the argument list is empty. pub fn is_empty(&self) -> bool { self.positional.is_empty() && self.named.is_empty() } } impl From for Value { fn from(args: CallArgs) -> Self { Self::ArgList(args) } } impl fmt::Display for CallArgs { fn fmt(&self, out: &mut fmt::Formatter) -> fmt::Result { let pos = self .positional .iter() .map(|v| format!("{}", v.format(Default::default()))); let named = self .named .iter() .map(|(k, v)| format!("{}={}", k, v.format(Default::default()))); let t = pos.chain(named).collect::>().join(", "); write!(out, "{t}")?; if self.trailing_comma { write!(out, ", ")?; } Ok(()) } } rsass-0.29.0/rsass/src/css/comment.rs000066400000000000000000000027461474765622100175060ustar00rootroot00000000000000use crate::output::CssBuf; use std::cmp::Ordering; /// A comment in a css file. #[derive(Clone, Debug)] pub struct Comment(String); impl> From for Comment { fn from(t: T) -> Self { Self(t.into()) } } impl Comment { /// Write this comment to a css output buffer. pub(crate) fn write(&self, buf: &mut CssBuf) { if self.0.starts_with('#') { buf.add_one("\n", ""); return; } let indent = buf.indent_level(); let existing = self .0 .lines() .skip(1) .map(|s| { let i = s.bytes().take_while(|b| *b == b' ').count(); if s.as_bytes().get(i).unwrap_or(&b'*') == &b'*' { i } else { i.saturating_sub(2) } }) .min() .unwrap_or(indent); buf.do_indent_no_nl(); buf.add_str("/*"); match indent.cmp(&existing) { Ordering::Greater => { let start = buf.format().get_indent(indent - existing); buf.add_str(&self.0.replace('\n', start)); } Ordering::Less => { let start = buf.format().get_indent(existing - indent - 1); buf.add_str(&self.0.replace(start, "\n")); } Ordering::Equal => { buf.add_str(&self.0); } } buf.add_one("*/\n", "*/"); } } rsass-0.29.0/rsass/src/css/item.rs000066400000000000000000000040711474765622100167730ustar00rootroot00000000000000use super::{AtRule, Comment, MediaRule, Rule, Value}; use crate::output::CssBuf; use std::io::{self, Write}; /// A top-level item in a css file. #[derive(Clone, Debug)] pub enum Item { /// A comment Comment(Comment), /// A css import statement Import(Import), /// A css rule. Rule(Rule), /// An `@media` rule. MediaRule(MediaRule), /// An (unknown) `@` rule. AtRule(AtRule), /// An extra newline for grouping (unless compressed format). Separator, } impl Item { pub(crate) fn write(&self, buf: &mut CssBuf) -> io::Result<()> { match self { Self::Comment(comment) => comment.write(buf), Self::Import(import) => import.write(buf)?, Self::Rule(rule) => rule.write(buf)?, Self::MediaRule(rule) => rule.write(buf)?, Self::AtRule(atrule) => atrule.write(buf)?, Self::Separator => buf.opt_nl(), } Ok(()) } } impl From for Item { fn from(comment: Comment) -> Self { Self::Comment(comment) } } impl From for Item { fn from(import: Import) -> Self { Self::Import(import) } } impl From for Item { fn from(rule: Rule) -> Self { Self::Rule(rule) } } impl From for Item { fn from(value: AtRule) -> Self { Self::AtRule(value) } } impl From for Item { fn from(value: MediaRule) -> Self { Self::MediaRule(value) } } /// An `@import` rule in css. #[derive(Clone, Debug)] pub struct Import { name: Value, args: Value, } impl Import { /// Create a new `@import`. pub fn new(name: Value, args: Value) -> Self { Self { name, args } } /// Write this comment to a css output buffer. pub(crate) fn write(&self, buf: &mut CssBuf) -> io::Result<()> { buf.do_indent_no_nl(); write!(buf, "@import {}", &self.name.format(buf.format()))?; if !self.args.is_null() { write!(buf, " {}", self.args.format(buf.format()))?; } buf.add_one(";\n", ";"); Ok(()) } } rsass-0.29.0/rsass/src/css/mediarule.rs000066400000000000000000000104511474765622100200030ustar00rootroot00000000000000use super::atrule::AtRuleBodyItem; use super::Value; use crate::output::{CssBuf, Format}; use crate::parser::{css::media, input_span}; use crate::value::Operator; use crate::ParseError; use std::io::{self, Write}; /// An `@media` rule in css. #[derive(Clone, Debug)] pub struct MediaRule { args: MediaArgs, body: Vec, } impl MediaRule { pub(crate) fn new(args: MediaArgs, body: Vec) -> Self { Self { args, body } } pub(crate) fn write(&self, buf: &mut CssBuf) -> io::Result<()> { if !self.body.is_empty() { buf.do_indent_no_nl(); buf.add_str("@media "); self.args.write(buf)?; buf.start_block(); for item in &self.body { item.write(buf)?; } buf.end_block(); } Ok(()) } } /// The media selection argument of an `@media` rule. #[derive(Clone, Debug)] pub enum MediaArgs { /// A named media, such as `all` or `screen`. Name(String), /// `(cond: value)` media. Condition(String, Value), /// A condition / range, such as `(witdh < 14em)` or /// `(14em <= width < 80em)`. Range(Vec<(Operator, Value)>), /// Any media subquery in parenthesis. Paren(Box), /// Any media subquery in square brackets. Bracket(Box), /// unary operation. /// The operator (`not`, `only`) is a string to preserve case. UnaryOp(String, Box), /// a and b and c media. Comma(Vec), /// a and b and c media. And(Vec), /// a or b or c media. Or(Vec), } impl MediaArgs { pub(crate) fn write(&self, buf: &mut CssBuf) -> io::Result<()> { match self { Self::Name(name) => write!(buf, "{name}")?, Self::UnaryOp(op, a) => { buf.add_str(op); buf.add_str(" "); a.write(buf)?; } Self::Condition(c, v) => { write!(buf, "({c}: {})", v.format(buf.format()))?; } Self::Comma(args) => { if let Some((first, rest)) = args.split_first() { first.write(buf)?; for arg in rest { buf.add_one(", ", ","); arg.write(buf)?; } } } Self::And(args) => { if let Some((first, rest)) = args.split_first() { first.write(buf)?; for arg in rest { buf.add_str(" and "); arg.write(buf)?; } } } Self::Or(args) => { if let Some((first, rest)) = args.split_first() { first.write(buf)?; for arg in rest { buf.add_str(" or "); arg.write(buf)?; } } } Self::Paren(a) => { buf.add_str("("); a.write(buf)?; buf.add_str(")"); } Self::Bracket(a) => { buf.add_str("["); a.write(buf)?; buf.add_str("]"); } Self::Range(v) => { buf.add_str("("); if let Some(((_op, first), rest)) = v.split_first() { buf.add_str( &first.to_string(buf.format()).replace('\n', " "), ); for (op, val) in rest { write!(buf, " {op} ")?; buf.add_str( &val.to_string(buf.format()).replace('\n', " "), ); } } buf.add_str(")"); } } Ok(()) } } // Note: I'm not sure printing and parsing is the best way to do this, // but then, I'm not sure media arguments in scss are best represented // as a Value either. impl TryFrom for MediaArgs { type Error = crate::Error; fn try_from(value: Value) -> Result { let value = value.format(Format::default()).to_string(); Ok(ParseError::check(media::args(input_span(value).borrow()))?) } } rsass-0.29.0/rsass/src/css/mod.rs000066400000000000000000000015471474765622100166210ustar00rootroot00000000000000//! Types for css values and rules. mod atrule; mod binop; mod call_args; mod comment; mod item; mod mediarule; mod rule; mod selectors; mod string; mod util; mod value; mod valueformat; pub use self::atrule::{AtRule, AtRuleBodyItem}; pub use self::binop::BinOp; pub use self::call_args::CallArgs; pub use self::comment::Comment; pub use self::item::{Import, Item}; pub use self::mediarule::{MediaArgs, MediaRule}; pub use self::rule::{BodyItem, CustomProperty, Property, Rule}; pub use self::selectors::{BadSelector, Selector, SelectorSet}; pub use self::string::CssString; pub use self::value::{InvalidCss, Value, ValueMap, ValueToMapError}; pub(crate) use self::selectors::{CssSelectorSet, SelectorCtx}; pub(crate) use self::util::{is_calc_name, is_function_name, is_not, IsNot}; pub(crate) mod parser { pub(crate) use super::selectors::parser::selector_set; } rsass-0.29.0/rsass/src/css/rule.rs000066400000000000000000000101651474765622100170050ustar00rootroot00000000000000use super::{ selectors::Opt, AtRule, Comment, CssString, Import, SelectorSet, Value, }; use crate::output::CssBuf; use std::io; /// A css rule. /// /// A rule binds a [`SelectorSet`] to a body of [`BodyItem`]s (mainly /// properties with [`Value`]s). #[derive(Clone, Debug)] pub struct Rule { pub(crate) selectors: SelectorSet, pub(crate) body: Vec, } impl Rule { /// Create a new Rule. pub fn new(selectors: SelectorSet) -> Self { Self { selectors, body: Vec::new(), } } /// Add an item to the body of this rule. pub fn push(&mut self, item: BodyItem) { self.body.push(item); } /// Write this rule to a css output buffer. pub(crate) fn write(&self, buf: &mut CssBuf) -> io::Result<()> { if !self.body.is_empty() { let s = self.selectors.no_placeholder(); if matches!(s, Opt::None) { return Ok(()); } buf.do_indent_no_nl(); let p = buf.len(); if let Opt::Some(s) = s { s.write_to(buf); } if buf.len() == p { buf.add_str("*"); } buf.start_block(); for item in &self.body { item.write(buf)?; } buf.end_block(); } Ok(()) } } /// Something that may exist inside a rule. #[derive(Clone, Debug)] pub enum BodyItem { /// An `@import` statement with a name and args. Import(Import), /// A property declaration with a name and a value. Property(Property), /// A custom property declaration with a name and a value. CustomProperty(CustomProperty), /// A comment Comment(Comment), /// Empty at-rules are allowed in a rule body. ARule(AtRule), } impl BodyItem { /// Write this item to a css output buffer. pub(crate) fn write(&self, buf: &mut CssBuf) -> io::Result<()> { match self { Self::Comment(c) => c.write(buf), Self::Import(import) => import.write(buf)?, Self::Property(property) => property.write(buf), Self::CustomProperty(property) => property.write(buf), Self::ARule(rule) => rule.write(buf)?, } Ok(()) } } impl From for BodyItem { fn from(comment: Comment) -> Self { Self::Comment(comment) } } impl From for BodyItem { fn from(import: Import) -> Self { Self::Import(import) } } impl From for BodyItem { fn from(property: Property) -> Self { Self::Property(property) } } impl From for BodyItem { fn from(property: CustomProperty) -> Self { Self::CustomProperty(property) } } impl TryFrom for BodyItem { type Error = AtRule; fn try_from(value: AtRule) -> Result { if value.no_body() { Ok(Self::ARule(value)) } else { Err(value) } } } /// A css property; a name and [Value]. #[derive(Clone, Debug)] pub struct Property { name: String, value: Value, } impl Property { /// Create a new Property. pub fn new(name: String, value: Value) -> Self { Self { name, value } } pub(crate) fn write(&self, buf: &mut CssBuf) { buf.do_indent_no_nl(); buf.add_str(&self.name); buf.add_one(": ", ":"); buf.add_str(&self.value.to_string(buf.format()).replace('\n', " ")); buf.add_one(";\n", ";"); } } /// A css custom property (css variable); a name and a literal value. #[derive(Clone, Debug)] pub struct CustomProperty { name: String, value: CssString, } impl CustomProperty { /// Construct a new custom property. pub fn new(name: String, value: CssString) -> Self { Self { name, value } } pub(crate) fn write(&self, buf: &mut CssBuf) { buf.do_indent_no_nl(); buf.add_str(&self.name); buf.add_str(":"); if !(self.value.quotes().is_none() || buf.format().is_compressed()) { buf.add_str(" "); } buf.add_str(&self.value.to_string()); buf.add_one(";\n", ";"); } } rsass-0.29.0/rsass/src/css/selectors/000077500000000000000000000000001474765622100174705ustar00rootroot00000000000000rsass-0.29.0/rsass/src/css/selectors/attribute.rs000066400000000000000000000055771474765622100220570ustar00rootroot00000000000000use crate::{css::CssString, output::CssBuf}; /// An attribute selector. #[derive(Debug, Clone, PartialEq, Eq)] pub(crate) struct Attribute { /// The attribute name name: String, /// An operator op: String, /// A value to match. val: CssString, /// Optional modifier. modifier: Option, } impl Attribute { pub(super) fn is_superselector(&self, b: &Self) -> bool { self.name == b.name && self.op == b.op && self.val == b.val && self.modifier == b.modifier } pub(super) fn write_to(&self, buf: &mut CssBuf) { buf.add_char('['); buf.add_str(&self.name); buf.add_str(&self.op); buf.add_str(&self.val.to_string()); if let Some(m) = self.modifier { buf.add_char(' '); buf.add_char(m); } buf.add_char(']'); } } pub(super) mod parser { use super::super::parser::name_opt_ns; use super::Attribute; use crate::parser::css::strings::css_string_any; use crate::parser::util::term_opt_space; use crate::parser::{input_to_str, PResult, Span}; use nom::branch::alt; use nom::bytes::complete::tag; use nom::character::complete::one_of; use nom::combinator::{map, map_res, opt}; use nom::sequence::{delimited, pair}; use nom::Parser as _; pub(crate) fn attribute(input: Span) -> PResult { map( delimited( term_opt_space(tag("[")), pair( term_opt_space(name_opt_ns), opt(( term_opt_space(map_res( alt(( tag("*="), tag("|="), tag("="), tag("$="), tag("~="), tag("^="), )), input_to_str, )), term_opt_space(css_string_any), opt(term_opt_space(one_of( "ABCDEFGHIJKLMNOPQRSTUVWXYZ\ abcdefghijklmnopqrstuvwxyz", ))), )), ), tag("]"), ), |(name, ovm)| { if let Some((op, val, modifier)) = ovm { Attribute { name, op: op.to_owned(), val, modifier, } } else { Attribute { name, op: String::new(), val: "".into(), modifier: None, } } }, ) .parse(input) } } rsass-0.29.0/rsass/src/css/selectors/compound.rs000066400000000000000000000301671474765622100216710ustar00rootroot00000000000000use super::{Attribute, CssSelectorSet, ElemType, Opt, Pseudo, SelectorSet}; use crate::{output::CssBuf, parser::input_span, ParseError}; use lazy_static::lazy_static; use std::fmt; #[derive(Default, Clone, PartialEq, Eq)] pub(crate) struct CompoundSelector { pub(super) backref: Option<()>, element: Option, placeholders: Vec, classes: Vec, id: Option, attr: Vec, pseudo: Vec, } impl CompoundSelector { pub fn is_empty(&self) -> bool { self.element.is_none() && self.backref.is_none() && self.placeholders.is_empty() && self.classes.is_empty() && self.id.is_none() && self.attr.is_empty() && self.pseudo.is_empty() } pub(super) fn has_backref(&self) -> bool { self.backref.is_some() || self.pseudo.iter().any(Pseudo::has_backref) } pub(super) fn has_id(&self) -> bool { self.id.is_some() } pub(super) fn cant_append(&self) -> bool { self.is_empty() || self.element.as_ref().map_or(false, ElemType::cant_append) } pub(super) fn append(&self, other: &Self) -> Result { let mut s = CssBuf::new(Default::default()); self.write_to(&mut s); other.write_to(&mut s); let s = s.take(); if s.is_empty() { Ok(Self::default()) } else { let span = input_span(s); Ok(ParseError::check(parser::compound_selector(span.borrow()))?) } } pub(super) fn is_rootish(&self) -> bool { self.pseudo.iter().any(Pseudo::is_rootish) } /// Return true if these compound selectors can't meaningfully /// appear in the same selector. pub(super) fn must_not_inherit(&self, other: &Self) -> bool { if self.id.is_some() && self.id == other.id { return true; } if let Some(pseudo) = self.pseudo_element() { if other.pseudo_element() == Some(pseudo) { return true; } } false } pub fn no_placeholder(&self) -> Opt { if !self.placeholders.is_empty() { return Opt::None; } let pseudo = match Opt::collect_neg( self.pseudo.iter().map(Pseudo::no_placeholder), ) { Opt::Some(p) => p, Opt::Any => vec![], Opt::None => return Opt::None, }; Opt::Some(Self { pseudo, ..self.clone() }) } pub(super) fn dedup(&mut self, original: &Self) { if original.element == self.element && !self.element.as_ref().map_or(true, ElemType::is_any) { self.element = None; } self.placeholders .retain(|p| !original.placeholders.iter().any(|o| o == p)); if original.id == self.id { self.id = None; } self.attr.retain(|a| !original.attr.iter().any(|o| a == o)); self.classes .retain(|c| !original.classes.iter().any(|o| c == o)); self.pseudo .retain(|p| !original.pseudo.iter().any(|o| p == o)); } pub(super) fn resolve_ref_in_pseudo(&mut self, ctx: &CssSelectorSet) { self.pseudo = self.pseudo.drain(..).map(|p| p.resolve_ref(ctx)).collect(); } pub(super) fn replace_in_pseudo( &mut self, original: &SelectorSet, replacement: &SelectorSet, ) { self.pseudo = self .pseudo .drain(..) .map(|p| p.replace(original, replacement)) .collect(); } pub fn is_superselector(&self, sub: &Self) -> bool { fn elem_or_default(e: &Option) -> &ElemType { lazy_static! { static ref DEF: ElemType = ElemType::default(); } e.as_ref().unwrap_or(&DEF) } elem_or_default(&self.element) .is_superselector(elem_or_default(&sub.element)) && all_any(&self.placeholders, &sub.placeholders, PartialEq::eq) && all_any(&self.classes, &sub.classes, PartialEq::eq) && self.id.iter().all(|id| sub.id.as_ref() == Some(id)) && all_any(&self.attr, &sub.attr, Attribute::is_superselector) && all_any(&self.pseudo, &sub.pseudo, Pseudo::is_superselector) && self.pseudo_element().as_ref().map_or_else( || sub.pseudo_element().is_none(), |aa| { sub.pseudo_element() .as_ref() .map_or(false, |ba| aa.is_superselector(ba)) }, ) } pub fn pseudo_element(&self) -> Option<&Pseudo> { self.pseudo.iter().find(|p| p.is_element()) } pub(crate) fn simple_selectors(&self) -> Vec { let mut result = Vec::new(); if let Some(element) = &self.element { result.push(element.to_string()); } result.extend(self.placeholders.iter().map(|p| format!("%{p}"))); result.extend(self.classes.iter().map(|c| format!(".{c}"))); result.extend(self.id.iter().map(|id| format!("#{id}"))); result.extend(self.attr.iter().map(|a| { let mut s = CssBuf::new(Default::default()); a.write_to(&mut s); String::from_utf8_lossy(&s.take()).to_string() })); result.extend(self.pseudo.iter().map(|p| { let mut s = CssBuf::new(Default::default()); p.write_to(&mut s); String::from_utf8_lossy(&s.take()).to_string() })); result } pub fn write_to(&self, buf: &mut CssBuf) { if self.backref.is_some() { buf.add_char('&'); } if let Some(e) = &self.element { if !e.is_any() || (self.classes.is_empty() && self.placeholders.is_empty() && self.id.is_none() && self.pseudo.is_empty()) { e.write_to(buf); } } for p in &self.placeholders { buf.add_char('%'); buf.add_str(p); } if let Some(id) = &self.id { buf.add_char('#'); buf.add_str(id); } for c in &self.classes { buf.add_char('.'); buf.add_str(c); } for attr in &self.attr { attr.write_to(buf); } for pseudo in &self.pseudo { pseudo.write_to(buf); } } pub fn unify(mut self, mut other: Self) -> Option { let pseudo_element = match (self.pseudo_element(), other.pseudo_element()) { (None, None) => None, (Some(pe), None) | (None, Some(pe)) => Some(pe), (Some(a), Some(b)) => { if b.is_superselector(a) { Some(a) } else if a.is_superselector(b) { Some(b) } else { return None; } } } .cloned(); self.pseudo.retain(|p| !p.is_element()); other.pseudo.retain(|p| !p.is_element()); self.element = match (self.element, other.element) { (None, None) => None, (None, Some(e)) | (Some(e), None) => Some(e), (Some(a), Some(b)) => Some(a.unify(&b)?), }; for c in other.placeholders { if !self.placeholders.iter().any(|sc| sc == &c) { self.placeholders.push(c); } } for c in other.classes { if !self.classes.iter().any(|sc| sc == &c) { self.classes.push(c); } } self.id = match (self.id, other.id) { (None, None) => None, (None, Some(id)) | (Some(id), None) => Some(id), (Some(s_id), Some(o_id)) => { if s_id == o_id { Some(s_id) } else { return None; } } }; combine_vital( &mut self.attr, &mut other.attr, Attribute::is_superselector, ); combine_vital( &mut self.pseudo, &mut other.pseudo, Pseudo::is_superselector, ); if let Some(pseudo_element) = pseudo_element { self.pseudo.push(pseudo_element); } if self.pseudo.iter().any(Pseudo::is_host) && (self.pseudo.iter().any(Pseudo::is_hover) || self.element.is_some() || !self.classes.is_empty()) { return None; } Some(self) } } impl fmt::Debug for CompoundSelector { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { let mut s = f.debug_struct("CompoundSelector"); if self.backref.is_some() { s.field("backref", &"&"); } if let Some(elem) = &self.element { s.field("element", &elem); } if !self.placeholders.is_empty() { s.field("placeholders", &self.placeholders); } if let Some(id) = &self.id { s.field("id", &id); } if !self.classes.is_empty() { s.field("classes", &self.classes); } if !self.attr.is_empty() { s.field("attr", &self.attr); } if !self.pseudo.is_empty() { s.field("pseudo", &self.pseudo); } s.finish() } } /// Return true if all elements of `one` has an element in `other` for /// whitch `cond` is true. fn all_any(one: &[T], other: &[T], cond: F) -> bool where F: Fn(&T, &T) -> bool, { one.iter().all(|a| other.iter().any(|b| cond(a, b))) } // Combine all alements from `v` that is not made redundant by `other` // with those from `other` that is not redunant with `v`, into `v` // (leaving `other` empty). fn combine_vital(v: &mut Vec, other: &mut Vec, q: Q) where Q: Fn(&T, &T) -> bool, { v.retain(|a| !other.iter().any(|b| q(b, a))); other.retain(|a| !v.iter().any(|b| q(b, a))); v.append(other); } pub(crate) mod parser { use super::super::parser::{attribute, elem_name, keyframe_stop, pseudo}; use super::CompoundSelector; use crate::parser::css::strings::css_string_nohash as css_string; use crate::parser::{PResult, Span}; use nom::bytes::complete::tag; use nom::combinator::{opt, value, verify}; use nom::sequence::preceded; use nom::Parser as _; pub(crate) fn compound_selector( input: Span, ) -> PResult { let mut result = CompoundSelector::default(); if let PResult::Ok((rest, stop)) = keyframe_stop(input) { result.element = Some(stop); return Ok((rest, result)); } let (rest, backref) = opt(value((), tag("&"))).parse(input)?; result.backref = backref; let (mut rest, elem) = opt(elem_name).parse(rest)?; result.element = elem; loop { rest = match rest.first() { Some(b'#') => { let (r, id) = preceded(tag("#"), css_string).parse(rest)?; result.id = Some(id); r } Some(b'%') => { let (r, p) = preceded(tag("%"), css_string).parse(rest)?; result.placeholders.push(p); r } Some(b'.') => { let (r, c) = preceded(tag("."), css_string).parse(rest)?; result.classes.push(c); r } Some(b':') => { let (r, p) = pseudo(rest)?; result.pseudo.push(p); r } Some(b'[') => { let (r, c) = attribute(rest)?; result.attr.push(c); r } _ => break, }; } verify(tag(""), |_| !result.is_empty()).parse(rest)?; Ok((rest, result)) } } rsass-0.29.0/rsass/src/css/selectors/context.rs000066400000000000000000000030431474765622100215220ustar00rootroot00000000000000use super::{CssSelectorSet, SelectorSet}; /// A full set of selectors with a separate backref. #[derive(Clone, Debug, PartialEq, Eq)] pub struct SelectorCtx { /// The actual selectors. s: CssSelectorSet, backref: CssSelectorSet, } impl SelectorCtx { pub fn root() -> Self { Self { s: CssSelectorSet::root(), backref: CssSelectorSet::root(), } } /// Return true if this is a root (empty) selector. pub fn is_root(&self) -> bool { self.s.is_root() } pub fn real(&self) -> CssSelectorSet { self.s.clone() } /// Evaluate selectors inside this context. pub(crate) fn nest(&self, selectors: SelectorSet) -> CssSelectorSet { if selectors.has_backref() { CssSelectorSet { s: selectors.resolve_ref(self.get_backref()), } } else { self.s.nest(selectors) } } pub(crate) fn at_root(&self, selectors: SelectorSet) -> Self { let backref = self.get_backref(); Self { s: CssSelectorSet { s: selectors.resolve_ref(backref), }, backref: backref.clone(), } } pub(crate) fn get_backref(&self) -> &CssSelectorSet { if self.s.is_root() { &self.backref } else { &self.s } } } impl From for SelectorCtx { fn from(value: CssSelectorSet) -> Self { Self { s: value, backref: CssSelectorSet::root(), } } } rsass-0.29.0/rsass/src/css/selectors/cssselectorset.rs000066400000000000000000000132021474765622100231010ustar00rootroot00000000000000use super::error::BadSelector0; use super::{BadSelector, SelectorSet}; use crate::css::Value; use crate::error::Invalid; use crate::output::CssBuf; use crate::parser::{input_span, ParseError}; use crate::sass::CallError; use crate::value::ListSeparator; use nom::Finish; /// A `CssSelectorset` is like a [`Selectorset`] but valid in css. /// /// The practical difference is that a `CssSelectorset` is guaranteed /// not to contain backrefs (`&`), which may be present in a /// `Selectorset`. #[derive(Clone, Debug, PartialEq, Eq)] pub struct CssSelectorSet { pub(super) s: SelectorSet, } impl CssSelectorSet { pub(crate) fn root() -> Self { Self { s: SelectorSet::root(), } } /// Return true if this is a root (empty) selector. pub fn is_root(&self) -> bool { self.s.is_root() } pub fn parse_value(value: Value) -> Result { fn join(value: &Value) -> Result { if let Value::List(vs, Some(ListSeparator::Comma), false) = value { vs.iter() .map(join2) .collect::, _>>() .map(|v| v.join(", ")) } else { join2(value) } } fn join2(value: &Value) -> Result { if let Value::List(vs, Some(ListSeparator::Space) | None, false) = value { vs.iter() .map(join3) .collect::, _>>() .map(|v| v.join(" ")) } else { join3(value) } } fn join3(value: &Value) -> Result { match value { Value::Literal(s) => Ok(s.value().to_string()), _ => Err(BadSelector0::Value), } } let selector = join(&value).map_err(|e| e.ctx(value))?; let span = input_span(selector); let (rest, value) = super::parser::selector_set(span.borrow()) .finish() .map_err(ParseError::from)?; if rest.fragment().is_empty() { value.try_into() } else { Err(ParseError::new("expected selector.", rest.to_owned()).into()) } } pub fn is_superselector(&self, sub: &Self) -> bool { self.s.is_superselector(&sub.s) } pub(crate) fn append(self, ext: &Self) -> Result { Ok(Self { s: SelectorSet { s: self .s .s .into_iter() .flat_map(|b| { ext.s.s.iter().map(move |e| { b.append(e).map_err(|err| err.context(e, &b)) }) }) .collect::>()?, }, }) } pub(crate) fn extend( self, extendee: &Self, extender: &Self, ) -> Result { self.s.extend(&extendee.s, &extender.s).map(|s| Self { s }) } /// Nest `other` selectors inside this as though they were nested /// within one another in the stylesheet. pub(crate) fn nest(&self, other: SelectorSet) -> Self { let mut parts = other .s .into_iter() .map(|o| { if o.has_backref() { o.resolve_ref(self) } else { self.s.s.iter().map(|s| s.nest(&o)).collect() } }) .map(Vec::into_iter) .collect::>(); let mut result = Vec::new(); let mut empty = false; while !empty { empty = true; for i in &mut parts { if let Some(next) = i.next() { result.push(next); empty = false; } } } Self { s: SelectorSet { s: result }, } } pub(crate) fn replace( self, original: &Self, replacement: &Self, ) -> Result { self.s .replace(&original.s, &replacement.s) .map(|s| Self { s }) } pub(crate) fn unify(self, other: &Self) -> Self { Self { s: SelectorSet { s: self .s .s .into_iter() .flat_map(|s| { other .s .s .iter() .flat_map(move |o| s.clone().unify(o.clone())) }) .collect(), }, } } pub fn write_to(&self, buf: &mut CssBuf) { self.s.write_to(buf); } } impl From for SelectorSet { fn from(value: CssSelectorSet) -> Self { value.s } } impl TryFrom for CssSelectorSet { type Error = BadSelector; fn try_from(value: SelectorSet) -> Result { for s in &value.s { if s.has_backref() { let sel = s.clone().into_string_vec().join(" "); return Err(BadSelector::Backref(input_span(sel))); } } Ok(Self { s: value }) } } impl TryFrom for CssSelectorSet { type Error = BadSelector; fn try_from(value: Value) -> Result { SelectorSet::try_from(value)?.try_into() } } impl From for Value { fn from(value: CssSelectorSet) -> Self { value.s.into() } } rsass-0.29.0/rsass/src/css/selectors/elemtype.rs000066400000000000000000000070501474765622100216640ustar00rootroot00000000000000use crate::output::CssBuf; use std::fmt; #[derive(Clone, Debug, PartialEq, Eq)] pub(crate) struct ElemType { s: String, } impl Default for ElemType { fn default() -> Self { Self { s: "*".into() } } } impl ElemType { pub fn is_any(&self) -> bool { self.s == "*" } pub(super) fn cant_append(&self) -> bool { self.s.starts_with('*') || self.s.starts_with('|') } pub fn is_superselector(&self, sub: &Self) -> bool { let (e_ns, e_name) = self.split_ns(); let (sub_ns, sub_name) = sub.split_ns(); match_name(e_ns.unwrap_or("*"), sub_ns.unwrap_or("*")) && match_name(e_name, sub_name) } pub fn unify(&self, other: &Self) -> Option { let (e_ns, e_name) = self.split_ns(); let (o_ns, o_name) = other.split_ns(); let ns = match (e_ns, o_ns) { (None, None) => None, (Some("*"), ns) | (ns, Some("*")) => ns, (Some(e), Some(o)) if e == o => Some(e), _ => return None, }; let name = match (e_name, o_name) { ("*", name) | (name, "*") => name, (e, o) if e == o => e, _ => return None, }; Some(Self { s: if let Some(ns) = ns { format!("{ns}|{name}") } else { name.to_string() }, }) } fn split_ns(&self) -> (Option<&str>, &str) { match self.s.split_once('|') { Some((ns, name)) => (Some(ns), name), None => (None, &self.s), } } pub fn write_to(&self, buf: &mut CssBuf) { buf.add_str(&self.s); } } impl fmt::Display for ElemType { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { self.s.fmt(f) } } fn match_name(a: &str, b: &str) -> bool { a == "*" || a == b } pub(super) mod parser { use super::ElemType; use crate::parser::css::strings::css_string_nohash as css_string; use crate::parser::{PResult, Span}; use nom::branch::alt; use nom::bytes::complete::{is_a, tag}; use nom::combinator::{map, opt, recognize, value}; use nom::sequence::{pair, preceded}; use nom::Parser as _; pub(crate) fn elem_name(input: Span) -> PResult { map(name_opt_ns, |s| ElemType { s }).parse(input) } /// Recognize a keyframe stop as an element selector. /// /// This is the way keyframes are currently supported, may change /// in the future. pub(crate) fn keyframe_stop(input: Span) -> PResult { map( recognize(( is_a("0123456789."), opt((is_a("eE"), opt(tag("-")), is_a("0123456789"))), tag("%"), )), |stop: Span| ElemType { s: String::from_utf8_lossy(stop.fragment()).to_string(), }, ) .parse(input) } pub(crate) fn name_opt_ns(input: Span) -> PResult { fn name_part(input: Span) -> PResult { alt((value(String::from("*"), tag("*")), css_string)).parse(input) } alt(( map(preceded(tag("|"), name_part), |mut s| { s.insert(0, '|'); s }), map( pair(name_part, opt(preceded(tag("|"), name_part))), |(a, b)| { if let Some(b) = b { format!("{a}|{b}") } else { a } }, ), )) .parse(input) } } rsass-0.29.0/rsass/src/css/selectors/error.rs000066400000000000000000000030351474765622100211700ustar00rootroot00000000000000use crate::css::{is_not, Value}; use crate::input::SourcePos; use crate::ParseError; use std::fmt; pub(super) enum BadSelector0 { Value, Parse(ParseError), } impl BadSelector0 { pub(super) fn ctx(self, v: Value) -> BadSelector { match self { Self::Value => BadSelector::Value(v), Self::Parse(err) => BadSelector::Parse(err), } } } impl From for BadSelector0 { fn from(e: ParseError) -> Self { Self::Parse(e) } } /// The error when a [`Value`] cannot be converted to a /// [`SelectorSet`][super::SelectorSet] or [`Selector`][super::Selector]. #[derive(Debug)] pub enum BadSelector { /// The value was not the expected type of list or string. Value(Value), /// There was an error parsing a string value. Parse(ParseError), /// A backref (`&`) were present but not allowed there. Backref(SourcePos), } impl fmt::Display for BadSelector { fn fmt(&self, out: &mut fmt::Formatter) -> fmt::Result { match self { Self::Value(v) => out.write_str(&is_not( v, "a valid selector: it must be a string,\ \na list of strings, or a list of lists of strings", )), Self::Parse(e) => e.fmt(out), Self::Backref(pos) => { writeln!(out, "Parent selectors aren\'t allowed here.")?; pos.show(out) } } } } impl From for BadSelector { fn from(e: ParseError) -> Self { Self::Parse(e) } } rsass-0.29.0/rsass/src/css/selectors/mod.rs000066400000000000000000000020711474765622100206150ustar00rootroot00000000000000//! This module contains types for the selectors of a rule. //! //! Basically, in a rule like `p.foo, .foo p { some: thing; }` there //! is a `SelectorSet` object which contains two `Selector` objects, one //! for `p.foo` and one for `.foo p`. mod attribute; mod compound; mod context; mod cssselectorset; mod elemtype; mod error; mod opt; mod pseudo; mod selector; mod selectorset; use self::attribute::Attribute; use self::elemtype::ElemType; pub(crate) use self::opt::Opt; use self::pseudo::Pseudo; pub use context::SelectorCtx; pub(crate) use cssselectorset::CssSelectorSet; pub use error::BadSelector; pub use selector::Selector; pub use selectorset::SelectorSet; pub(crate) mod parser { pub(super) use super::attribute::parser::attribute; pub(super) use super::compound::parser::compound_selector; pub(super) use super::elemtype::parser::{ elem_name, keyframe_stop, name_opt_ns, }; pub(super) use super::pseudo::parser::pseudo; pub(super) use super::selector::parser::selector; pub(crate) use super::selectorset::parser::selector_set; } rsass-0.29.0/rsass/src/css/selectors/opt.rs000066400000000000000000000025151474765622100206430ustar00rootroot00000000000000/// A special kind of option relevant for selectors. /// /// There is both a positive (match-anything) and a negative (match-nothing) /// empty value. #[derive(Debug)] pub(crate) enum Opt { Some(T), Any, None, } impl Opt { pub(crate) fn collect_pos( iter: impl Iterator>, ) -> Opt> { let mut result = Vec::new(); for p in iter { match p { Opt::Some(p) => result.push(p), Opt::Any => return Opt::Any, Opt::None => (), } } if result.is_empty() { Opt::None } else { Opt::Some(result) } } pub(crate) fn collect_neg( iter: impl Iterator>, ) -> Opt> { let mut result = Vec::new(); for p in iter { match p { Opt::Some(p) => result.push(p), Opt::Any => (), Opt::None => return Opt::None, } } if result.is_empty() { Opt::Any } else { Opt::Some(result) } } pub(crate) fn map U>(self, f: F) -> Opt { match self { Opt::Some(t) => Opt::Some(f(t)), Opt::Any => Opt::Any, Opt::None => Opt::None, } } } rsass-0.29.0/rsass/src/css/selectors/pseudo.rs000066400000000000000000000155741474765622100213510ustar00rootroot00000000000000use super::{CssSelectorSet, Opt, SelectorSet}; use crate::output::CssBuf; /// A pseudo-class or a css2 pseudo-element (:foo) #[derive(Debug, Clone, PartialEq, Eq)] pub(crate) struct Pseudo { /// The name of the pseudo-class name: String, /// Arguments to the pseudo-class arg: Arg, /// True if this is a `::psedu-element`, false for a `:pseudo-class`. element: bool, } impl Pseudo { pub(crate) fn no_placeholder(&self) -> Opt { let arg = match &self.arg { Arg::Selector(s) => { match (s.no_placeholder(), self.name_in(&["not"])) { (Opt::Some(t), _) => { if self.name_in(&["is"]) { match t.no_leading_combinator() { Opt::Some(t) => Arg::Selector(t), Opt::Any => return Opt::Any, Opt::None => return Opt::None, } } else { Arg::Selector(t) } } (Opt::Any, false) | (Opt::None, true) => return Opt::Any, (Opt::None, false) | (Opt::Any, true) => { return Opt::None } } } arg => arg.clone(), }; Opt::Some(Self { arg, name: self.name.clone(), element: self.element, }) } pub(crate) fn is_superselector(&self, b: &Self) -> bool { if self.is_element() != b.is_element() || self.name != b.name { return false; } // Note: A better implementetation of is/matches/any would be // different from has, host, and host-context. if self.name_in(&["not"]) { b.arg.is_superselector(&self.arg) // NOTE: Reversed! } else if self.name_in(&["current"]) { self.arg == b.arg } else { self.arg.is_superselector(&b.arg) } } pub(super) fn is_element(&self) -> bool { self.element || is_pseudo_element(&self.name) } pub(super) fn is_hover(&self) -> bool { self.name == "hover" } pub(super) fn is_host(&self) -> bool { self.name_in(&["host", "host-context"]) } pub(super) fn is_rootish(&self) -> bool { self.name_in(&["host", "host-context", "root", "scope"]) } pub(super) fn has_backref(&self) -> bool { if let Arg::Selector(s) = &self.arg { s.has_backref() } else { false } } pub(super) fn resolve_ref(mut self, ctx: &CssSelectorSet) -> Self { self.arg = match self.arg { Arg::Selector(s) => Arg::Selector(s.resolve_ref(ctx)), x => x, }; self } pub(super) fn replace( mut self, original: &SelectorSet, replacement: &SelectorSet, ) -> Self { if self.name_in(&[ "is", "matches", "not", "any", "where", "has", "host", "host-context", ]) { self.arg = match self.arg { Arg::Selector(s) => { Arg::Selector(s.replace(original, replacement).unwrap()) } x => x, }; } self } pub(super) fn write_to(&self, buf: &mut CssBuf) { buf.add_char(':'); if self.element { buf.add_char(':'); } buf.add_str(&self.name); // Note: This is an ugly workaround for lack of proper support // for "nth" type of pseudoclass arguments. if self.name_in(&[ "nth-child", "nth-last-child", "nth-last-of-type", "nth-of-type", ]) { let mut t = CssBuf::new(buf.format()); self.arg.write_to(&mut t); buf.add_str( &String::from_utf8_lossy(&t.take()).replacen(" + ", "+", 1), ); } else { self.arg.write_to(buf); } } fn name_in(&self, names: &[&str]) -> bool { name_in(&self.name, names) } } fn is_pseudo_element(n: &str) -> bool { let pse = [ "after", "before", "file-selector-button", "first-letter", "first-line", "grammar-error", "marker", "placeholder", "selection", "spelling-error", "target-text", ]; pse.binary_search(&n).is_ok() } fn name_in(name: &str, known: &[&str]) -> bool { if name.starts_with('-') { known.iter().any(|end| { name.strip_suffix(end).map_or(false, |s| s.ends_with('-')) }) } else { known.iter().any(|known| name == *known) } } #[derive(Debug, Clone, PartialEq, Eq)] enum Arg { Selector(SelectorSet), Other(String), None, } impl Arg { fn is_superselector(&self, b: &Self) -> bool { match (self, b) { (Self::Selector(a), Self::Selector(b)) => a.is_superselector(b), (Self::Other(a), Self::Other(b)) => a == b, (Self::None, Self::None) => true, _ => false, } } pub(super) fn write_to(&self, buf: &mut CssBuf) { match self { Self::Selector(s) => { buf.add_char('('); s.write_to(buf); buf.add_char(')'); } Self::Other(a) => { buf.add_char('('); buf.add_str(a); buf.add_char(')'); } Self::None => (), } } } pub(super) mod parser { use super::super::parser::selector_set; use super::{Arg, Pseudo}; use crate::parser::css::strings::{ css_string_nohash, custom_value_inner, }; use crate::parser::{PResult, Span}; use nom::branch::alt; use nom::bytes::complete::tag; use nom::combinator::{map, value}; use nom::sequence::delimited; use nom::Parser as _; pub(crate) fn pseudo(input: Span) -> PResult { map( ( alt((value(true, tag("::")), value(false, tag(":")))), css_string_nohash, // Note: The accepted type of selector should probably // depend on the name, so that known pseudo attributes // requires the correct kind of arguments. alt(( map( delimited(tag("("), selector_set, tag(")")), Arg::Selector, ), map( delimited(tag("("), custom_value_inner, tag(")")), Arg::Other, ), map(tag(""), |_| Arg::None), )), ), |(element, name, arg)| Pseudo { name, arg, element }, ) .parse(input) } } rsass-0.29.0/rsass/src/css/selectors/selector.rs000066400000000000000000000562131474765622100216650ustar00rootroot00000000000000use super::compound::CompoundSelector; use super::error::BadSelector0; use super::{BadSelector, CssSelectorSet, Opt, SelectorSet}; use crate::css::Value; use crate::output::CssBuf; use crate::parser::input_span; use crate::sass::CallError; use crate::value::ListSeparator; use crate::{Invalid, ParseError}; use core::fmt; use std::iter::once; type RelBox = Box<(RelKind, Selector)>; /// A css selector. /// /// A selector is a sequence of compound selectors, joined by /// relational operators (where the "ancestor" relation is just /// whitespace in the text representation). #[derive(Default, Clone, PartialEq, Eq)] pub struct Selector { rel_of: Option, compound: CompoundSelector, } impl Selector { pub(crate) fn no_placeholder(&self) -> Opt { let compound = match self.compound.no_placeholder() { Opt::Some(compound) => compound, Opt::Any => CompoundSelector::default(), Opt::None => return Opt::None, }; if self.is_local_empty() && self.rel_of.is_some() { eprintln!("Deprecated dobule empty relation"); return Opt::None; } let rel_of = if let Some((kind, rel)) = self.rel_of.as_deref() { match rel.no_placeholder() { Opt::Some(rel) => Some(Box::new((*kind, rel))), Opt::Any => None, Opt::None => return Opt::None, } } else { None }; Opt::Some(Self { rel_of, compound }) } pub(crate) fn no_leading_combinator(&self) -> Opt { if self.has_leading_combinator() { Opt::None } else { Opt::Some(self.clone()) } } fn has_leading_combinator(&self) -> bool { self.rel_of.as_deref().map_or(false, |(_k, r)| { if r.rel_of.is_none() { r.is_local_empty() } else { r.has_leading_combinator() } }) } pub(super) fn append(&self, other: &Self) -> Result { if self.is_local_empty() { Err(AppendError::Parent) } else if let Some(rel) = other.rel_of.clone() { Ok(Self { rel_of: Some(Box::new((rel.0, self.append(&rel.1)?))), compound: other.compound.clone(), }) } else if other.compound.cant_append() { Err(AppendError::Sub) } else { Ok(Self { rel_of: self.rel_of.clone(), compound: self.compound.append(&other.compound)?, }) } } pub(super) fn extend( self, extendee: &SelectorSet, extender: &SelectorSet, ) -> Vec { let mut result = vec![self]; for original in &extendee.s { result = result .into_iter() .flat_map(|mut s| { if original.is_superselector(&s) { let base = s.clone(); s.compound.dedup(&original.compound); let mut result = extender .s .iter() .flat_map(|r| s.unify_extend(r)) .collect::>(); result.retain(|r| !base.is_superselector(r)); result.insert(0, base); result } else { vec![s] } }) .collect(); } result } pub(super) fn nest(&self, other: &Self) -> Self { let mut result = other.clone(); if !self.is_local_empty() || self.rel_of.is_some() { result.rel_of = match result.rel_of.take().map(|b| *b) { Some((kind, rel)) => { let rel = self.nest(&rel); if rel.is_local_empty() { match rel.rel_of.map(|b| *b) { Some((rk, rr)) => match (kind, rk) { (kind, RelKind::Ancestor) => { Some(Box::new((kind, rr))) } (kind, rk) => Some(Box::new(( kind, Selector { rel_of: Some(Box::new((rk, rr))), ..Default::default() }, ))), }, None => None, } } else { Some(Box::new((kind, rel))) } } None => Some(Box::new((RelKind::Ancestor, self.clone()))), }; } result } pub(super) fn resolve_ref(mut self, ctx: &CssSelectorSet) -> Vec { self = self.resolve_ref_in_pseudo(ctx); let rel_of = self.rel_of.take(); let result = if self.compound.backref.is_some() { self.compound.backref = None; ctx.s .s .iter() .flat_map(|s| { Selector { rel_of: s.rel_of.clone(), compound: CompoundSelector::default(), } .unify(Selector { rel_of: self.rel_of.clone(), compound: s.compound.append(&self.compound).unwrap(), }) }) .collect() } else { vec![self] }; if let Some(rel_of) = rel_of { let rels = rel_of.1.resolve_ref(ctx); rels.into_iter() .flat_map(|rel| { result .iter() .map(|r| { let mut r = r.to_owned(); let mut t = &mut r.rel_of; loop { if let Some(next) = t { t = &mut next.1.rel_of; } else { let _ = t.insert(Box::new(( rel_of.0, rel.clone(), ))); break; } } r }) .collect::>() }) .collect() } else { result } } pub(super) fn resolve_ref_in_pseudo( mut self, ctx: &CssSelectorSet, ) -> Self { self.rel_of = self.rel_of.map(|mut rel| { rel.1 = rel.1.resolve_ref_in_pseudo(ctx); rel }); self.compound.resolve_ref_in_pseudo(ctx); self } /// Return true iff this selector is a superselector of `sub`. pub(super) fn is_superselector(&self, sub: &Self) -> bool { self.is_local_superselector(sub) && self.rel_of.as_deref().map_or(true, |(kind, s)| { match kind { RelKind::Ancestor => { let mut t = sub.rel_of.as_deref(); while let Some((ss_kind, ss)) = t { match ss_kind { RelKind::Ancestor | RelKind::Parent => { if s.is_superselector(ss) { return true; } // else keep looking up the hieararchy! } RelKind::Sibling | RelKind::AdjacentSibling => (), // the siblings parent is our parent } t = ss.rel_of.as_deref(); } false } RelKind::Parent => { let t = sub.rel_of.as_deref(); if let Some((RelKind::Parent, ss)) = t { s.is_superselector(ss) } else { false } } RelKind::Sibling => { let mut t = sub.rel_of.as_deref(); while let Some((ss_kind, ss)) = t { if ss_kind != &RelKind::Sibling && ss_kind != &RelKind::AdjacentSibling { return false; } if s.is_superselector(ss) { return true; } t = ss.rel_of.as_deref(); } false } RelKind::AdjacentSibling => { // Only the closest relative can be an adjacent sibling if let Some((RelKind::AdjacentSibling, ss)) = sub.rel_of.as_deref() { s.is_superselector(ss) } else { false } } } }) } fn is_local_superselector(&self, sub: &Self) -> bool { self.compound.is_superselector(&sub.compound) } pub(super) fn replace( mut self, original: &SelectorSet, replacement: &SelectorSet, ) -> Vec { self.compound.replace_in_pseudo(original, replacement); let mut result = vec![self]; for original in &original.s { result = result .into_iter() .flat_map(|mut s| { if original.is_superselector(&s) { s.compound.dedup(&original.compound); replacement .s .iter() .flat_map(|r| s.clone().unify(r.clone())) .collect() } else { vec![s] } }) .collect(); } result } pub(super) fn unify(self, other: Self) -> Vec { self._unify(other).unwrap_or_default() } pub(crate) fn unify_extend(&self, other: &Self) -> Vec { self.clone()._unify(other.clone()).unwrap_or_default() } fn _unify(self, other: Self) -> Option> { let rel_of = match (self.rel_of, other.rel_of) { (None, None) => vec![], (None, Some(rel)) | (Some(rel), None) => vec![rel], (Some(a), Some(b)) => { let v = unify_relbox(a, b)?; if v.is_empty() { return None; } v } }; let compound = self.compound.unify(other.compound)?; Some(if rel_of.is_empty() { vec![compound.into()] } else if compound.is_empty() { vec![] } else if rel_of.len() == 1 { let mut rel_of = rel_of; vec![Selector { rel_of: rel_of.pop(), compound, }] } else { rel_of .into_iter() .map(|r| Selector { rel_of: Some(r), compound: compound.clone(), }) .collect() }) } /// Return true if this is a complex selector (has any relation). pub(super) fn is_complex(&self) -> bool { self.rel_of.is_some() } fn is_local_empty(&self) -> bool { self.compound.is_empty() } pub(super) fn has_backref(&self) -> bool { self.compound.has_backref() || self .rel_of .as_deref() .map_or(false, |(_, s)| s.has_backref()) } fn add_root_ancestor(&mut self, ancestor: Self) { if let Some(rel) = self.rel_of.as_mut() { if rel.1.is_local_empty() && !rel.1.is_complex() { rel.1 = ancestor; } else { rel.1.add_root_ancestor(ancestor); } } else { self.rel_of = Some(Box::new((RelKind::Ancestor, ancestor))); } } fn with_rel_of(mut self, rel: RelKind, other: Self) -> Vec { if self.rel_of.is_some() { self.unify(Self { rel_of: Some(Box::new((rel, other))), ..Self::default() }) } else if self.compound.is_rootish() { vec![] } else { self.rel_of = Some(Box::new((rel, other))); vec![self] } } pub(crate) fn simple_selectors(&self) -> Result, Invalid> { if self.rel_of.is_some() { return Err(Invalid::AtError( "Combinators not allowed in simple-selectors.".into(), )); } Ok(self.compound.simple_selectors()) } /// Write this `Selector` to a formatted buffer. pub fn write_to(&self, buf: &mut CssBuf) { if let Some((kind, sel)) = self.rel_of.as_deref() { sel.write_to(buf); if let Some(symbol) = kind.symbol() { if !sel.is_local_empty() { buf.add_one(" ", ""); } buf.add_str(symbol); buf.add_one(" ", ""); } else { buf.add_str(" "); } } self.compound.write_to(buf); } pub(super) fn into_string_vec(self) -> Vec { let mut vec = if let Some((kind, sel)) = self.rel_of.map(|b| *b) { let mut vec = sel.into_string_vec(); if let Some(symbol) = kind.symbol() { vec.push(symbol.to_string()); } vec } else { Vec::new() }; if !self.compound.is_empty() { let mut buf = CssBuf::new(Default::default()); self.compound.write_to(&mut buf); vec.push(String::from_utf8_lossy(&buf.take()).to_string()); } vec } /// Internal (the api is [`TryFrom`]). pub(super) fn _try_from_value(v: &Value) -> Result { match v { Value::List(list, None | Some(ListSeparator::Space), _) => list .iter() .try_fold(None, |a, v| { let mut s = match v { Value::Literal(s) => ParseError::check( parser::selector(input_span(s.value()).borrow()), )?, _ => return Err(BadSelector0::Value), }; if let Some(a) = a { s.add_root_ancestor(a); } Ok(Some(s)) }) .map(Option::unwrap_or_default), Value::Literal(s) => { if s.value().is_empty() { Ok(Self::default()) } else { let span = input_span(s.value()); Ok(ParseError::check(parser::selector(span.borrow()))?) } } _ => Err(BadSelector0::Value), } } } impl From for Selector { fn from(compound: CompoundSelector) -> Self { Self { rel_of: None, compound, } } } pub(super) enum AppendError { Parent, Sub, Selector(BadSelector), } impl AppendError { pub(super) fn context(self, e: &Selector, b: &Selector) -> CallError { match self { Self::Parent => { CallError::msg( format!( "Selector {:?} can't be used as a parent in a compound selector.", show(b) ) ) }, Self::Sub => { CallError::msg( format!("Can't append {} to {}.", show(e), show(b)) ) }, Self::Selector(b) => b.into(), } } } fn show(s: &Selector) -> String { s.clone().into_string_vec().join(" ") } impl From for AppendError { fn from(value: ParseError) -> Self { Self::Selector(value.into()) } } impl From for AppendError { fn from(value: BadSelector) -> Self { Self::Selector(value) } } // NOTE: I think returning an empty vector here should be equivalent // to returning None, so maybe just return a Vec and check for // emtpyness at the call site? #[allow(clippy::boxed_local)] fn unify_relbox(a: RelBox, b: RelBox) -> Option> { use RelKind::*; fn as_rel_vec( kind: RelKind, s: impl IntoIterator, ) -> Vec { s.into_iter().map(|s| Box::new((kind, s))).collect() } if a.0 == b.0 && a.1.compound.is_rootish() && b.1.compound.is_rootish() { return Some(as_rel_vec(a.0, a.1.unify(b.1))); } Some(match (*a, *b) { ((k @ AdjacentSibling, a), (AdjacentSibling, b)) | ((k @ Parent, a), (Parent, b)) => as_rel_vec(k, a._unify(b)?), ((Ancestor, a), (Ancestor, b)) => { if b.is_local_superselector(&a) { as_rel_vec(Ancestor, a._unify(b)?) } else if a.is_local_superselector(&b) || a.compound.must_not_inherit(&b.compound) { as_rel_vec(Ancestor, b._unify(a)?) } else { as_rel_vec( Ancestor, b.clone() .with_rel_of(Ancestor, a.clone()) .into_iter() .chain(a.with_rel_of(Ancestor, b)), ) } } ((k @ Sibling, a), (Sibling, b)) => { if a.is_superselector(&b) { as_rel_vec(Sibling, once(b)) } else if b.is_superselector(&a) { as_rel_vec(Sibling, once(a)) } else if !a.compound.must_not_inherit(&b.compound) { as_rel_vec( Sibling, b.clone() .with_rel_of(k, a.clone()) .into_iter() .chain(a.clone().with_rel_of(k, b.clone())) .chain(a.unify(b)), ) } else { as_rel_vec(Sibling, a.unify(b)) } } ((a_k @ AdjacentSibling, a_s), (Sibling, b_s)) | ((Sibling, b_s), (a_k @ AdjacentSibling, a_s)) => { if b_s.is_superselector(&a_s) { as_rel_vec(a_k, once(a_s)) } else if a_s.compound.has_id() || b_s.compound.has_id() { as_rel_vec(a_k, a_s.with_rel_of(Sibling, b_s)) } else { as_rel_vec( a_k, a_s.clone() .with_rel_of(Sibling, b_s.clone()) .into_iter() .chain(b_s.unify(a_s)), ) } } ((a_k @ (AdjacentSibling | Sibling), a_s), (b_k, b_s)) | ((b_k, b_s), (a_k @ (AdjacentSibling | Sibling), a_s)) => { as_rel_vec(a_k, a_s.with_rel_of(b_k, b_s)) } ((Parent, p), (Ancestor, a)) | ((Ancestor, a), (Parent, p)) => { if a.is_superselector(&p) { as_rel_vec(Parent, once(p)) } else { as_rel_vec(Parent, p.with_rel_of(RelKind::Ancestor, a)) } } }) } impl TryFrom for Selector { type Error = BadSelector; fn try_from(value: Value) -> Result { Self::_try_from_value(&value).map_err(move |e| e.ctx(value)) } } impl From for Value { fn from(value: Selector) -> Self { Self::List( value .into_string_vec() .into_iter() .map(Self::from) .collect(), Some(ListSeparator::Space), false, ) } } impl fmt::Debug for Selector { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { let mut s = f.debug_struct("Selector"); if let Some((kind, rel)) = self.rel_of.as_deref() { s.field(&format!("{kind:?}"), &rel); } s.field("compound", &NoAlt { t: &self.compound }); s.finish() } } struct NoAlt { t: T, } impl fmt::Debug for NoAlt { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "{:?}", self.t) } } #[derive(Clone, Copy, Debug, Eq, PartialEq)] enum RelKind { Ancestor, Parent, Sibling, AdjacentSibling, } impl RelKind { fn symbol(self) -> Option<&'static str> { match self { Self::Ancestor => None, Self::Parent => Some(">"), Self::Sibling => Some("~"), Self::AdjacentSibling => Some("+"), } } } pub(crate) mod parser { use super::super::parser::compound_selector; use super::{RelKind, Selector}; use crate::parser::util::{opt_spacelike, spacelike}; use crate::parser::{PResult, Span}; use nom::branch::alt; use nom::bytes::complete::tag; use nom::combinator::{into, opt, value, verify}; use nom::multi::fold_many0; use nom::sequence::{delimited, pair, preceded, terminated}; use nom::Parser as _; pub(crate) fn selector(input: Span) -> PResult { let (input, prerel) = preceded(opt_spacelike, opt(explicit_rel_kind)).parse(input)?; let (input, first) = if let Some(prerel) = prerel { let (input, first) = opt(compound_selector).parse(input)?; let first = Selector { rel_of: Some(Box::new((prerel, Selector::default()))), compound: first.unwrap_or_default(), }; (input, first) } else { into(compound_selector).parse(input)? }; terminated( fold_many0( verify(pair(rel_kind, opt(compound_selector)), |(k, s)| { k.symbol().is_some() || s.is_some() }), move || first.clone(), |rel, (kind, e)| Selector { compound: e.unwrap_or_default(), rel_of: Some(Box::new((kind, rel))), }, ), opt_spacelike, ) .parse(input) } fn explicit_rel_kind(input: Span) -> PResult { delimited( opt_spacelike, alt(( value(RelKind::AdjacentSibling, tag("+")), value(RelKind::Sibling, tag("~")), value(RelKind::Parent, tag(">")), )), opt_spacelike, ) .parse(input) } fn rel_kind(input: Span) -> PResult { alt((explicit_rel_kind, value(RelKind::Ancestor, spacelike))) .parse(input) } } rsass-0.29.0/rsass/src/css/selectors/selectorset.rs000066400000000000000000000126111474765622100223730ustar00rootroot00000000000000use super::error::BadSelector0; use super::{BadSelector, CssSelectorSet, Opt, Selector}; use crate::css::Value; use crate::output::CssBuf; use crate::parser::input_span; use crate::value::ListSeparator; use crate::{Invalid, ParseError}; /// A set of selectors. /// This is the normal top-level selector, which can be a single /// [`Selector`] or a comma-separated list (set) of such selectors. #[derive(Clone, Debug, PartialEq, Eq)] pub struct SelectorSet { pub(crate) s: Vec, } impl SelectorSet { pub(crate) fn root() -> Self { Self { s: vec![Selector::default()], } } /// Return true if this is a root (empty) selector. pub fn is_root(&self) -> bool { self.s.len() == 1 && self.s[0] == Selector::default() } pub(crate) fn no_placeholder(&self) -> Opt { let s = self.s.iter().map(Selector::no_placeholder); Opt::collect_pos(s).map(|s| Self { s }) } pub(crate) fn no_leading_combinator(&self) -> Opt { let s = self.s.iter().map(Selector::no_leading_combinator); Opt::collect_pos(s).map(|s| Self { s }) } pub(crate) fn extend( self, extendee: &Self, extender: &Self, ) -> Result { extendee.check_extend_complex()?; let result = self .s .into_iter() .flat_map(|s| s.extend(extendee, extender)) .collect(); Ok(Self { s: result }) } pub(super) fn is_superselector(&self, other: &Self) -> bool { other .s .iter() .all(|sub| self.s.iter().any(|sup| sup.is_superselector(sub))) } pub(crate) fn replace( self, original: &Self, replacement: &Self, ) -> Result { original.check_extend_complex()?; let result = self .s .into_iter() .flat_map(|s| s.replace(original, replacement)) .collect(); Ok(Self { s: result }) } fn check_extend_complex(&self) -> Result<(), Invalid> { for extendee in &self.s { if extendee.is_complex() { let s = extendee.clone().into_string_vec().join(" "); return Err(Invalid::AtError(format!( "Can\'t extend complex selector {s}." ))); } } Ok(()) } /// Write this set of selectors to a formatted buffer. pub fn write_to(&self, buf: &mut CssBuf) { if let Some((first, rest)) = self.s.split_first() { first.write_to(buf); for one in rest { buf.add_one(", ", ","); one.write_to(buf); } } } pub(super) fn has_backref(&self) -> bool { self.s.iter().any(Selector::has_backref) } pub(super) fn resolve_ref(self, ctx: &CssSelectorSet) -> Self { let mut resolved = self .s .into_iter() .map(|s| s.resolve_ref(ctx).into_iter()) .collect::>(); // Now put the resolved items in the correct order. // We have [[a1, b1], [a2, b2]] but want [a1, a2, b1, b2] let mut s = Vec::new(); loop { let mut done = true; for v in &mut resolved { if let Some(next) = v.next() { s.push(next); done = false; } } if done { break; } } Self { s } } } impl From for Value { fn from(value: SelectorSet) -> Self { if value.is_root() { return Self::Null; } let v = value.s.into_iter().map(Self::from).collect::>(); if v.is_empty() { Self::Null } else { Self::List(v, Some(ListSeparator::Comma), false) } } } impl TryFrom for SelectorSet { type Error = BadSelector; fn try_from(value: Value) -> Result { value_to_selectors(&value).map_err(move |e| e.ctx(value)) } } fn value_to_selectors(v: &Value) -> Result { match v { Value::List(vv, Some(ListSeparator::Comma), _) => { let s = vv .iter() .map(Selector::_try_from_value) .collect::>()?; Ok(SelectorSet { s }) } v @ Value::List(..) => Ok(SelectorSet { s: vec![Selector::_try_from_value(v)?], }), Value::Literal(s) => { if s.value().is_empty() { Ok(SelectorSet { s: vec![] }) } else { let span = input_span(s.value()); Ok(ParseError::check(parser::selector_set(span.borrow()))?) } } _ => Err(BadSelector0::Value), } } pub(super) mod parser { use super::SelectorSet; use crate::parser::{util::opt_spacelike, PResult, Span}; use nom::bytes::complete::tag; use nom::combinator::map; use nom::multi::separated_list1; use nom::sequence::delimited; use nom::Parser as _; pub(crate) fn selector_set(input: Span) -> PResult { map( separated_list1( delimited(opt_spacelike, tag(","), opt_spacelike), super::super::parser::selector, ), |s| SelectorSet { s }, ) .parse(input) } } rsass-0.29.0/rsass/src/css/string.rs000066400000000000000000000157221474765622100173500ustar00rootroot00000000000000use crate::value::Quotes; use std::fmt::{self, Write}; /// A string in css. May be quoted. #[derive(Clone, Debug, Eq, PartialOrd)] pub struct CssString { value: String, quotes: Quotes, } impl CssString { /// Create a new `CssString`. pub fn new(value: String, quotes: Quotes) -> Self { Self { value, quotes } } /// Unquote this string. pub fn unquote(self) -> String { if self.quotes.is_none() { self.value } else { let mut result = String::new(); let mut iter = self.value.chars().peekable(); while let Some(c) = iter.next() { if c == '\\' { let mut val: u32 = 0; let mut got_num = false; let nextchar = loop { match iter.peek() { Some(' ') if got_num => { iter.next(); break None; } Some(&c) => { if let Some(digit) = c.to_digit(16) { val = val * 10 + digit; got_num = true; iter.next(); } else if !got_num { break iter.next(); } else { break None; } } _ => break None, } }; if got_num { result.push( char::try_from(val) .unwrap_or(char::REPLACEMENT_CHARACTER), ); } match nextchar { Some('\n') => { result.push('\\'); result.push('a'); } Some(c) => { result.push(c); } None => (), } } else { result.push(c); } } result } } /// If the value is name-like, make it unquoted. pub fn opt_unquote(self) -> Self { let t = is_namelike(&self.value); Self { value: self.value, quotes: if t { Quotes::None } else { self.quotes }, } } /// Quote this string pub fn quote(self) -> Self { let value = if self.quotes.is_none() { self.value.replace('\\', "\\\\") } else { self.value }; if value.contains('"') && !value.contains('\'') { Self { value, quotes: Quotes::Single, } } else { Self { value, quotes: Quotes::Double, } } } /// Adapt the kind of quotes as prefered for a css value. pub fn pref_dquotes(self) -> Self { let value = self.value; let quotes = match self.quotes { Quotes::Double if value.contains('"') && !value.contains('\'') => { Quotes::Single } Quotes::Single if !value.contains('"') || value.contains('\'') => { Quotes::Double } q => q, }; Self { value, quotes } } /// Return true if this is an empty unquoted string. pub fn is_null(&self) -> bool { self.value.is_empty() && self.quotes.is_none() } pub(crate) fn is_name(&self) -> bool { self.quotes == Quotes::None && is_namelike(&self.value) } /// Return true if this is a css special function call. pub(crate) fn is_css_fn(&self) -> bool { let value = self.value(); self.quotes() == Quotes::None && (value.ends_with(')') && (value.starts_with("calc(") || value.starts_with("var("))) // The following is only relevant in relative colors // but I don't see how to get that context to where its needed, // and I don't see any real harm in puttin them like this. || ["h", "s", "l", "r", "g", "b"].iter().any(|s| value == *s) } /// Return true if this is a css special function call. pub(crate) fn is_css_calc(&self) -> bool { let value = self.value(); self.quotes() == Quotes::None && value.ends_with(')') && (value.starts_with("calc(") || value.starts_with("clamp(")) } /// Return true if this is a css url function call. pub(crate) fn is_css_url(&self) -> bool { let value = self.value(); self.quotes() == Quotes::None && value.ends_with(')') && value.starts_with("url(") } /// Access the string value pub fn value(&self) -> &str { &self.value } /// Take the string value, discarding quote information. pub fn take_value(self) -> String { self.value } /// Access the quotes pub fn quotes(&self) -> Quotes { self.quotes } } impl> From for CssString { fn from(value: S) -> Self { Self { value: value.into(), quotes: Quotes::None, } } } impl fmt::Display for CssString { fn fmt(&self, out: &mut fmt::Formatter) -> fmt::Result { let q = match self.quotes { Quotes::None => None, Quotes::Double => Some('"'), Quotes::Single => Some('\''), }; if let Some(q) = q { out.write_char(q)?; } for c in self.value.chars() { if Some(c) == q { out.write_char('\\')?; out.write_char(c)?; } else if is_private_use(c) { write!(out, "\\{:x}", c as u32)?; } else { out.write_char(c)?; } } if let Some(q) = q { out.write_char(q)?; }; Ok(()) } } impl PartialEq for CssString { fn eq(&self, other: &Self) -> bool { if self.quotes == other.quotes { self.value == other.value } else { self.clone().unquote() == other.clone().unquote() } } } impl From for crate::sass::Name { fn from(s: CssString) -> Self { s.value.into() } } fn is_namelike(s: &str) -> bool { let mut chars = s.chars(); chars .next() .map_or(false, |c| c.is_alphabetic() || c == '_') && chars.all(|c| c.is_alphanumeric() || c == '-' || c == '_') } fn is_private_use(c: char) -> bool { // https://en.wikipedia.org/wiki/Private_Use_Areas ('\u{E000}'..='\u{F8FF}').contains(&c) || ('\u{F0000}'..='\u{FFFFD}').contains(&c) || ('\u{100000}'..='\u{10FFFD}').contains(&c) } rsass-0.29.0/rsass/src/css/util.rs000066400000000000000000000025641474765622100170170ustar00rootroot00000000000000use super::Value; use crate::output::{Format, Formatted}; pub fn is_not<'a, T>(value: &'a T, expected: &str) -> String where Formatted<'a, T>: std::fmt::Display, { format!( "{} is not {}.", Formatted { value, format: Format::introspect() }, expected, ) } #[derive(Debug)] pub struct IsNot { got: Value, expected: &'static str, } impl IsNot { pub fn new(got: Value, expected: &'static str) -> Self { Self { got, expected } } pub fn value(&self) -> &Value { &self.got } } impl std::fmt::Display for IsNot { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!( f, "{} is not {}.", Formatted { value: &self.got, format: Format::introspect() }, self.expected, ) } } // Needed for error propagation impl From for String { fn from(value: IsNot) -> Self { value.to_string() } } /// Return true iff s is a valid _css_ function name. pub fn is_function_name(s: &str) -> bool { is_calc_name(s) || s == "var" } /// Return true iff s is a valid _css_ calculation name. /// /// That is, a css function name that is not `"var"`. pub fn is_calc_name(s: &str) -> bool { s == "calc" || s == "clamp" || s == "max" || s == "min" } rsass-0.29.0/rsass/src/css/value.rs000066400000000000000000000333731474765622100171600ustar00rootroot00000000000000use super::util::IsNot; use super::{is_calc_name, is_not, BinOp, CallArgs, CssString}; use crate::ordermap::OrderMap; use crate::output::{Format, Formatted}; use crate::sass::Function; use crate::value::{Color, ListSeparator, Number, Numeric, Operator}; /// A css value. #[derive(Clone, Debug, PartialOrd)] pub enum Value { /// A special kind of escape. Only really used for !important. Bang(String), /// An function call that was not evaluated. Call(String, CallArgs), /// A (callable?) function. Function(String, Option), /// A string literal. Literal(CssString), /// A comma- or space separated list of values, with or without brackets. List(Vec, Option, bool), /// A Numeric value is a rational value with a Unit (which may be /// Unit::None) and flags. /// /// The boolean flag is true for calculated values and false for /// literal values. Numeric(Numeric, bool), /// A color value (and optionally, its source string). Color(Color, Option), /// The null value. Null, /// The true boolean value. True, /// The false boolean value. False, /// A binary operation, two operands and an operator. /// The booleans represents possible whitespace. BinOp(Box), /// A unary operator and its operand. UnaryOp(Operator, Box), /// A map of values. Map(ValueMap), /// A unicode range for font selections. U+NN, U+N?, U+NN-MM. /// The string is the entire value, including the "U+" tag. UnicodeRange(String), /// A value in parenthesis. Paren(Box), /// An argumentt list ArgList(super::CallArgs), } /// An `OrderMap` where both the keys and the values are css values. pub type ValueMap = OrderMap; impl Value { /// Create a numeric value with no unit. pub fn scalar>(v: T) -> Self { Self::Numeric(Numeric::scalar(v), true) } pub(crate) fn call, I>(name: &str, args: I) -> Self where I: IntoIterator, { Self::Call(name.into(), CallArgs::from_iter(args)) } /// Check that the value is valid in css. pub fn valid_css(self) -> Result { match self { Self::Numeric(ref num, _) => { if num.unit.valid_in_css() { Ok(self) } else { Err(InvalidCss::Value(self)) } } Self::BinOp(op) => Ok(op.valid_css()?.into()), Self::UnaryOp(_, ref v) if v.is_calculation() => { Err(InvalidCss::UndefOp(self)) } Self::Call(ref name, ref args) => { if name != "calc" { for arg in &args.positional { arg.clone().valid_css()?; } } Ok(self) } Self::List(ref v, _, false) => { if v.is_empty() { Err(InvalidCss::Value(self)) } else { Ok(self) } } Self::Function(..) | Self::Map(_) => Err(InvalidCss::Value(self)), _ => Ok(self), } } /// Get the type name of this value. pub fn type_name(&self) -> &'static str { match *self { ref v if v.is_calculation() => "calculation", Self::ArgList(..) => "arglist", Self::Call(ref f, _) => { if f == "var" { "variable" } else { "string" } } Self::Color(..) => "color", Self::Literal(..) | Self::BinOp(_) => "string", Self::Map(..) => "map", Self::Numeric(..) => "number", Self::List(..) => "list", Self::Function(..) => "function", Self::True | Self::False => "bool", Self::Null => "null", _ => "unknown", } } /// Returns true if this is a css `calc(...)` function. pub fn is_calculation(&self) -> bool { match *self { Self::Call(ref name, _) if is_calc_name(name) => true, Self::Literal(ref s) if s.is_css_calc() => true, _ => false, } } pub(crate) fn to_string(&self, format: Format) -> String { let value = self.format(format); if self.needs_calc() { format!("calc({value})") } else { value.to_string() } } fn needs_calc(&self) -> bool { if let Self::Numeric(Numeric { value, unit }, _) = self { !value.is_finite() || !unit.valid_in_css() } else { false } } /// Return true if this is a calculated value. /// /// The return of functions or operators are calculated, verbatim /// values are not. pub fn is_calculated(&self) -> bool { match *self { Self::Numeric(.., calculated) => calculated, Self::Color(_, None) => true, _ => false, } } /// Get this value, but marked as calculated. /// /// Make sure arithmetic operators are evaluated. pub fn into_calculated(self) -> Self { match self { Self::Numeric(num, _) => Self::Numeric(num, true), Self::BinOp(op) => op.into_calculated(), other => other, } } /// All values other than `False` and `Null` should be considered true. pub fn is_true(&self) -> bool { !matches!(self, Self::False | Self::Null) } /// Return true if this value is null. /// /// Note that an empty unquoted string and a list containing no /// non-null values is also considered null. pub fn is_null(&self) -> bool { match *self { Self::Null => true, Self::List(ref list, _, false) => list.iter().all(Self::is_null), Self::Literal(ref s) => s.is_null(), Self::Paren(ref v) => v.is_null(), _ => false, } } /// Check if this value is numeric. /// /// If it is, get the number and unit, otherwise, get the value /// itself as error. pub fn numeric_value(self) -> Result { match self { Self::Numeric(num, ..) => Ok(num), v => Err(v), } } /// Unquote this value. /// /// If the value is a quoted string, the content is unquoted. pub fn unquote(self) -> Self { match self { Self::Literal(s) => s.unquote().into(), Self::List(list, s, b) => Self::List( list.into_iter().map(Self::unquote).collect(), s, b, ), Self::Paren(v) => *v, v => v, } } /// Get this value as iterable items. /// /// Lists and maps have iterable items, which are returned as a /// vector of values. Other values are returned as a vec /// containing the value as a single item. pub fn iter_items(self) -> Vec { match self { Self::ArgList(args) => { let mut vec = args.positional; // I'm not sure that including the named arguments after the // positional is the right thing to do here. vec.extend(args.named.into_iter().map(|(k, v)| { Self::List( vec![Self::from(k.as_ref()), v], Some(ListSeparator::Space), false, ) })); if args.trailing_comma { vec.push(Self::Null); } vec } Self::List(v, _, _) => v, Self::Map(map) => map .into_iter() .map(|(k, v)| { Self::List(vec![k, v], Some(ListSeparator::Space), false) }) .collect(), Self::Paren(v) => v.iter_items(), v => vec![v], } } /// Get a reference to this `Value` bound to an output format. /// /// The bound reference implements `Display`, so it can be written /// with the rust `format!(...)` macros or coverted with the /// `to_string()` method. /// /// # Example /// /// ``` /// # use rsass::css::Value; /// assert_eq!( /// Value::scalar(42).format(Default::default()).to_string(), /// "42", /// ); /// ``` pub fn format(&self, format: Format) -> Formatted { Formatted { value: self, format, } } /// Format this value for error messages. pub fn introspect(&self) -> String { self.to_string(Format::introspect()) } } /// Some Values are equal according to spec even with some /// implementation differences. impl PartialEq for Value { fn eq(&self, other: &Self) -> bool { match (&self, other) { (Self::Bang(a), Self::Bang(b)) => a == b, (Self::Numeric(a, _), Self::Numeric(b, _)) => a == b, (Self::Literal(a), Self::Literal(b)) => a == b, (Self::True, Self::True) | (Self::False, Self::False) | (Self::Null, Self::Null) => true, (Self::Color(a, _), Self::Color(b, _)) => a == b, (Self::Call(af, aa), Self::Call(bf, ba)) => af == bf && aa == ba, (Self::Function(a, abody), Self::Function(b, bbody)) => { a == b && abody == bbody } (Self::List(av, asep, ab), Self::List(bv, bsep, bb)) => { av == bv && asep == bsep && ab == bb } (Self::Map(a), Self::Map(b)) => a == b, (Self::UnaryOp(a, av), Self::UnaryOp(b, bv)) => { a == b && av == bv } (Self::BinOp(a), Self::BinOp(b)) => a == b, (Self::UnicodeRange(a), Self::UnicodeRange(b)) => a == b, (Self::Paren(a), Self::Paren(b)) => a == b, (Self::List(a, ..), Self::Map(b)) => a.is_empty() && b.is_empty(), (Self::Map(a), Self::List(b, ..)) => a.is_empty() && b.is_empty(), _ => false, } } } impl Eq for Value {} impl From for Value { fn from(v: bool) -> Self { match v { true => Self::True, false => Self::False, } } } impl From for Value { fn from(s: CssString) -> Self { Self::Literal(s.pref_dquotes()) } } impl From<&str> for Value { fn from(s: &str) -> Self { String::from(s).into() } } impl From for Value { fn from(s: String) -> Self { CssString::from(s).into() } } impl TryFrom for CssString { type Error = String; fn try_from(value: Value) -> Result { match value { Value::Literal(s) => Ok(s), Value::Call(name, args) => Ok(format!("{name}({args})").into()), v => Err(is_not(&v, "a string")), } } } impl TryFrom for String { type Error = Self; fn try_from(value: Value) -> Result { CssString::try_from(value).map(CssString::take_value) } } impl From for Value { fn from(v: Numeric) -> Self { Self::Numeric(v, true) } } impl> From for Value { fn from(c: C) -> Self { Self::Color(c.into(), None) } } impl TryFrom for Color { type Error = String; fn try_from(value: Value) -> Result { match value { Value::Color(col, _) => Ok(col), v => Err(is_not(&v, "a color")), } } } impl TryFrom for Numeric { type Error = IsNot; fn try_from(value: Value) -> Result { match value { Value::Numeric(num, ..) => Ok(num), v => Err(IsNot::new(v, "a number")), } } } impl TryInto> for Value { type Error = ValueToMapError; fn try_into(self) -> Result, ValueToMapError> { match self { Self::Map(m) => m .into_iter() .map(|(k, v)| match (k, v) { (Self::Literal(k), v) => Ok((k, v)), (k, _v) => { Err(ValueToMapError::Key(is_not(&k, "a string"))) } }) .collect(), // An empty map and an empty list looks the same Self::List(ref l, ..) if l.is_empty() => Ok(OrderMap::new()), v => Err(ValueToMapError::Root(is_not(&v, "a map"))), } } } /// Specific error type for converting a `Value` to a `ValueMap`. #[derive(Debug)] pub enum ValueToMapError { /// The `Value` was not convertible to a `ValueMap`. Root(String), /// One key value was not convertible to the key type. Key(String), } /// An value is not valid for use in css. #[derive(Debug)] pub enum InvalidCss { /// Value contains an undefined operation. UndefOp(Value), /// Value isn't a valid css value. Value(Value), /// {} and {} have incompatible units. Incompat(Numeric, Numeric), } impl std::error::Error for InvalidCss {} impl std::fmt::Display for InvalidCss { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { Self::UndefOp(v) => { write!(f, "Undefined operation \"{}\".", v.introspect()) } Self::Value(v) => { write!(f, "{} isn't a valid CSS value.", v.introspect()) } Self::Incompat(a, b) => write!( f, "{} and {} have incompatible units.", Value::from(a.clone()).introspect(), Value::from(b.clone()).introspect(), ), } } } rsass-0.29.0/rsass/src/css/valueformat.rs000066400000000000000000000160441474765622100203650ustar00rootroot00000000000000use super::{CallArgs, Value}; use crate::output::Formatted; use crate::value::{ListSeparator, Numeric, Operator}; use std::fmt::{self, Display, Write}; impl Display for Formatted<'_, Value> { fn fmt(&self, out: &mut fmt::Formatter) -> fmt::Result { match *self.value { Value::Bang(ref s) => write!(out, "!{s}"), Value::Literal(ref s) => s.fmt(out), Value::Function(ref n, ref _f) => { let name = n .chars() .flat_map(|c| match c { '"' => vec!['\\', '"'], c => vec![c], }) .collect::(); write!(out, "get-function(\"{name}\")") } Value::Numeric(ref num, _) => num.format(self.format).fmt(out), Value::Color(ref col, ref name) => { if let Some(ref name) = *name { name.fmt(out) } else { col.format(self.format).fmt(out) } } Value::List(ref v, sep, brackets) => { let sep = sep.unwrap_or_default(); let introspect = self.format.is_introspection(); if brackets { out.write_str("[")?; } else if introspect && v.is_empty() { return out.write_str("()"); } let t = v .iter() // TODO: Get rid of this filter entirely? .filter(|v| !v.is_null() || sep.is_slash() || introspect) .map(|v| { let needs_paren = match *v { Value::List(ref v, inner, false) => { ((brackets && (sep < inner.unwrap_or_default())) || introspect && (sep <= inner.unwrap_or_default())) && !(introspect && v.len() < 2) && (introspect || v.len() != 1) } _ => false, }; if needs_paren { format!("({})", v.format(self.format)) } else { format!("{}", v.format(self.format)) } }) .collect::>(); if let Some((first, rest)) = t.split_first() { if rest.is_empty() && introspect && sep > ListSeparator::Space { if brackets { write!(out, "{}{}", first, sep.sep(true))?; } else { write!(out, "({}{})", first, sep.sep(true))?; } } else { write!(out, "{first}")?; let sep = sep.sep(self.format.is_compressed()); for i in rest { write!(out, "{sep}{i}")?; } } } if brackets { out.write_str("]")?; } Ok(()) } Value::Call(ref name, ref arg) => { // TODO: Converting calc(1px) to 1px should probably be done earlier. // it is for scss, but not when loading plain css. if let Some(arg) = is_calc_result(name, arg) { write!(out, "{}", arg.format(self.format)) } else { write!(out, "{name}({arg})") } } Value::BinOp(ref op) => op.format(self.format).fmt(out), Value::UnaryOp(ref op, ref v) => { op.fmt(out)?; if *op == Operator::Not { out.write_char(' ')?; } v.format(self.format).fmt(out) } Value::True => write!(out, "true"), Value::False => write!(out, "false"), Value::Null => { if self.format.is_introspection() { out.write_str("null") } else { Ok(()) } } Value::Map(ref map) => { out.write_char('(')?; for (i, (k, v)) in map.iter().enumerate() { if i > 0 { out.write_str(", ")?; } if matches!( k, Value::List(_, Some(ListSeparator::Comma), _) ) && self.format.is_introspection() { write!(out, "({})", k.format(self.format))?; } else { write!(out, "{}", k.format(self.format))?; } out.write_str(": ")?; if matches!( v, Value::List(_, Some(ListSeparator::Comma), _) ) && self.format.is_introspection() { write!(out, "({})", v.format(self.format))?; } else { write!(out, "{}", v.format(self.format))?; } } out.write_char(')') } Value::UnicodeRange(ref s) => write!(out, "{s}"), Value::Paren(ref v) => { out.write_char('(')?; v.format(self.format).fmt(out)?; out.write_char(')') } Value::ArgList(ref args) => { // Note: named args not included in output. if let Some((first, rest)) = args.positional.split_first() { if self.format.is_introspection() && rest.is_empty() { out.write_char('(')?; first.format(self.format).fmt(out)?; out.write_str(",)")?; } else { first.format(self.format).fmt(out)?; let sep = ListSeparator::Comma .sep(self.format.is_compressed()); for item in rest { out.write_str(sep)?; item.format(self.format).fmt(out)?; } } } else { out.write_str("()")?; } Ok(()) } } } } /// If a css `calc` can be evaluated to a static numerical result, return that value. fn is_calc_result<'a>(name: &str, arg: &'a CallArgs) -> Option<&'a Numeric> { if name == "calc" { arg.get_single().ok().and_then(|a| match a { Value::Numeric(n, _) if n.unit.valid_in_css() => Some(n), _ => None, }) } else { None } } rsass-0.29.0/rsass/src/error.rs000066400000000000000000000201351474765622100163750ustar00rootroot00000000000000use crate::css::{is_not, InvalidCss}; use crate::input::{LoadError, SourcePos}; use crate::output::{Format, Formatted}; use crate::parser::ParseError; use crate::ScopeError; use std::{fmt, io}; /// Many functions in rsass that returns a Result uses this Error type. /// /// Other errors in rsass, such as [`CallError`][crate::sass::CallError] or /// [`Invalid`] can be converted to this Error type, often with /// a method providing some context rather than with just an `Into` /// implementation. /// E.g. [`CallError::called_from`][crate::sass::CallError::called_from] /// also takes a [`SourcePos`] and a function name, defining the call /// that went wrong. #[derive(Debug)] pub enum Error { /// Failed to load a file. Input(LoadError), /// An IO error without specifying a path. /// /// This is (probably) an error writing output. IoError(io::Error), /// A failed function call, with call- and optionally declaration /// position. BadCall(String, SourcePos, Option), /// Tried to import file at pos while already importing it at pos. /// /// The bool is true for a used module and false for an import. ImportLoop(bool, SourcePos, Option), /// Error parsing sass data. ParseError(ParseError), /// Something bad at a specific position. Invalid(Invalid, SourcePos), /// Fallback error type. /// /// This just contains a string with some message. /// /// Note: This variant should probably be removed in the future. S(String), } impl std::error::Error for Error {} impl fmt::Display for Error { fn fmt(&self, out: &mut fmt::Formatter) -> fmt::Result { match *self { Self::S(ref s) => write!(out, "{s}"), Self::Input(ref load) => load.fmt(out), Self::ParseError(ref err) => fmt::Display::fmt(err, out), Self::ImportLoop(ref module, ref pos, ref oldpos) => { if *module { writeln!( out, "Module loop: this module is already being loaded." )?; } else { writeln!(out, "This file is already being loaded.")?; } if let Some(oldpos) = oldpos { SourcePos::show_two( out, pos, "new load", oldpos, "original load", ) } else { pos.show(out) } } Self::BadCall(ref msg, ref callpos, ref declpos) => { writeln!(out, "{msg}")?; if let Some(declpos) = declpos { SourcePos::show_two( out, callpos, "invocation", declpos, "declaration", ) } else { callpos.show(out) } } Self::Invalid(ref what, ref pos) => { writeln!(out, "{what}")?; pos.show(out) } Self::IoError(ref err) => err.fmt(out), } } } impl From for Error { fn from(e: io::Error) -> Self { Self::IoError(e) } } impl From for Error { fn from(e: fmt::Error) -> Self { Self::IoError(io::Error::new(io::ErrorKind::Other, e)) } } impl From for Error { fn from(e: ParseError) -> Self { Self::ParseError(e) } } impl From for Error { fn from(err: LoadError) -> Self { Self::Input(err) } } /// Something invalid. /// /// Should be combined with a position to get an [Error]. #[derive(Debug)] #[non_exhaustive] pub enum Invalid { /// Tried to declare a function with a forbidden name. FunctionName, /// This at rule is not allowed here. AtRule, /// Mixins may not contain mixin declarations. MixinInMixin, /// Mixins may not be declared in control directives. MixinInControl, /// Mixins may not contain function declarations. FunctionInMixin, /// Functions may not be declared in control directives. FunctionInControl, /// Duplicate argument. DuplicateArgument, /// Positional arguments must come before keyword arguments. PositionalArgAfterNamed, /// Declarations may only be used within style rules. DeclarationOutsideRule, /// Only properties are valid inside namespace rules. InNsRule, /// Global custom property not allowed. GlobalCustomProperty, /// Global namespaced property not allowed. GlobalNsProperty, /// Built-in modules can't be configured. ConfigBuiltin, /// Some invalid scope operation. InScope(ScopeError), /// An `@error` reached. AtError(String), } impl Invalid { pub(crate) fn not<'a, T>(v: &'a T, what: &str) -> Self where Formatted<'a, T>: std::fmt::Display, { Self::AtError(is_not(v, what)) } pub(crate) fn expected_to<'a, T>(value: &'a T, cond: &str) -> Self where Formatted<'a, T>: std::fmt::Display, { Self::AtError(format!( "Expected {} to {}.", Formatted { value, format: Format::introspect() }, cond )) } /// Combine this with a position to get an [`Error`]. pub fn at(self, pos: SourcePos) -> Error { Error::Invalid(self, pos) } } impl std::error::Error for Invalid {} impl fmt::Display for Invalid { fn fmt(&self, out: &mut fmt::Formatter<'_>) -> fmt::Result { match self { Self::FunctionName => "Invalid function name.".fmt(out), Self::AtRule => "This at-rule is not allowed here.".fmt(out), Self::MixinInMixin => { "Mixins may not contain mixin declarations.".fmt(out) } Self::MixinInControl => { "Mixins may not be declared in control directives.".fmt(out) } Self::FunctionInMixin => { "Mixins may not contain function declarations.".fmt(out) } Self::FunctionInControl => { "Functions may not be declared in control directives." .fmt(out) } Self::DuplicateArgument => "Duplicate argument.".fmt(out), Self::PositionalArgAfterNamed => { "Positional arguments must come before keyword arguments." .fmt(out) } Self::DeclarationOutsideRule => { "Declarations may only be used within style rules.".fmt(out) } Self::InNsRule => { "Only properties are valid inside namespace rules.".fmt(out) } Self::GlobalCustomProperty => { "Global custom property not allowed.".fmt(out) } Self::GlobalNsProperty => { "Global namespaced property not allowed.".fmt(out) } Self::ConfigBuiltin => { "Built-in modules can\'t be configured.".fmt(out) } Self::InScope(err) => err.fmt(out), Self::AtError(msg) => msg.fmt(out), } } } pub(crate) trait ResultPos { /// Someting bad happened at a given source position. fn at(self, pos: &SourcePos) -> Result; /// Something bad happened, but we don't know the position. /// This is probably room for improvement in rsass error handling. fn no_pos(self) -> Result; } impl ResultPos for Result { fn at(self, pos: &SourcePos) -> Result { self.map_err(|e| e.at(pos.clone())) } fn no_pos(self) -> Result { self.map_err(|e| Error::S(e.to_string())) } } impl ResultPos for Result { fn at(self, pos: &SourcePos) -> Result { self.map_err(|e| Invalid::AtError(e.to_string()).at(pos.clone())) } fn no_pos(self) -> Result { self.map_err(|e| Error::S(e.to_string())) } } rsass-0.29.0/rsass/src/input/000077500000000000000000000000001474765622100160345ustar00rootroot00000000000000rsass-0.29.0/rsass/src/input/cargoloader.rs000066400000000000000000000066471474765622100207010ustar00rootroot00000000000000use super::{LoadError, Loader, SourceFile, SourceName}; use std::path::{Path, PathBuf}; /// A [`Loader`] for when calling rsass from a `build.rs` script. /// /// This is very similar to a [`FsLoader`][super::FsLoader], but has a /// `for_crate` constructor that uses the `CARGO_MANIFEST_DIR` /// environment variable instead of the current working directory, and /// it prints `cargo:rerun-if-changed` messages for each path that it /// loads. #[derive(Debug)] pub struct CargoLoader { path: Vec, } impl CargoLoader { /// Create a new `FsFileContext`. /// /// Files will be resolved from the directory containing the /// manifest of your package. /// This assumes the program is called by `cargo`, so the /// `CARGO_MANIFEST_DIR` environment variable is set. pub fn for_crate() -> Result { Ok(Self { path: vec![get_pkg_base()?], }) } /// Add a path to search for files. /// /// The path can be relative to the crate manifest directory, or /// absolute. pub fn push_path(&mut self, path: &Path) -> Result<(), LoadError> { self.path.push(if path.is_absolute() { path.into() } else { get_pkg_base()?.join(path) }); Ok(()) } /// Create a loader and a `SourceFile` from a given `Path`. /// /// The path can be relative to the crate manifest directory, or /// absolute. pub fn for_path(path: &Path) -> Result<(Self, SourceFile), LoadError> { let path = if path.is_absolute() { path.into() } else { get_pkg_base()?.join(path) }; let mut f = std::fs::File::open(&path) .map_err(|e| LoadError::Input(path.display().to_string(), e))?; cargo_watch(&path); let (path, name) = if let Some((base, path)) = path .parent() .and_then(|base| Some((base, path.strip_prefix(base).ok()?))) { (vec![base.to_path_buf()], path) } else { (vec![get_pkg_base()?], path.as_ref()) }; let loader = Self { path }; let source = SourceName::root(name.display().to_string()); let source = SourceFile::read(&mut f, source)?; Ok((loader, source)) } } impl Loader for CargoLoader { type File = std::fs::File; fn find_file(&self, url: &str) -> Result, LoadError> { if !url.is_empty() { for base in &self.path { let full = base.join(url); if full.is_file() { tracing::debug!(?full, "opening file"); let file = Self::File::open(&full).map_err(|e| { LoadError::Input(full.display().to_string(), e) })?; cargo_watch(&full); return Ok(Some(file)); } tracing::trace!(?full, "Not found"); } } Ok(None) } } /// Tell cargo to recompile if the file on `path` changes. fn cargo_watch(path: &Path) { println!("cargo:rerun-if-changed={}", path.display()); } /// Get the package base dir. /// /// This returns the `CARGO_MANIFEST_DIR` environment variable as a path. /// If the env is not set, an error is returned. fn get_pkg_base() -> Result { std::env::var_os("CARGO_MANIFEST_DIR") .map(PathBuf::from) .ok_or(LoadError::NotCalledFromCargo) } rsass-0.29.0/rsass/src/input/context.rs000066400000000000000000000266701474765622100201010ustar00rootroot00000000000000use super::{ CargoLoader, FsLoader, LoadError, Loader, SourceFile, SourceKind, SourcePos, }; use crate::output::{handle_parsed, CssData, Format}; use crate::{Error, ScopeRef}; use std::{borrow::Cow, collections::BTreeMap, fmt, path::Path}; use tracing::instrument; type Combine = &'static dyn Fn(&str, &str) -> String; /// Utility keeping track of loading files. /// /// The context is generic over the [`Loader`]. /// [`FsContext`] and [`CargoContext`] are type aliases for `Context` /// where the loader is a [`FsLoader`] or [`CargoLoader`], /// respectively. /// /// # Examples /// /// The Context here is a [`FsContext`]. /// Input is usually a scss file. /// /// ``` /// # use rsass::input::{FsContext, SourceFile, SourceName}; /// # use rsass::output::{Format, Style}; /// # fn main() -> Result<(), rsass::Error> { /// let context = FsContext::for_cwd() /// .with_format(Format { style: Style::Compressed, precision: 2 }); /// let scss_input = SourceFile::scss_bytes( /// "$gap: 4em / 3; /// \np {\ /// \n margin: $gap 0; /// \n}\n", /// SourceName::root("-") /// ); /// assert_eq!( /// context.transform(scss_input)?, /// b"p{margin:1.33em 0}\n" /// ); /// # Ok(()) } /// ``` /// /// This method can also be used as a plain css compression. /// ``` /// # use rsass::input::{FsContext, SourceFile, SourceName}; /// # use rsass::output::{Format, Style}; /// # fn main() -> Result<(), rsass::Error> { /// # let context = FsContext::for_cwd().with_format(Format { style: Style::Compressed, precision: 2 }); /// let css_input = SourceFile::css_bytes( /// "p {\ /// \n margin: 1.333333333em 0;\ /// \n}\n", /// SourceName::root("-") /// ); /// assert_eq!( /// context.transform(css_input)?, /// b"p{margin:1.33em 0}\n" /// ); /// # Ok(()) } /// ``` pub struct Context { loader: Loader, scope: Option, loading: BTreeMap, // TODO: Maybe have a map to loaded SourceFiles as well? Or even Parsed? } /// A file-system based [`Context`]. pub type FsContext = Context; impl FsContext { /// Create a new `Context`, loading files based on the current /// working directory. pub fn for_cwd() -> Self { Self::for_loader(FsLoader::for_cwd()) } /// Create a new `Context` and load a file. /// /// The directory part of `path` is used as a base directory for the loader. pub fn for_path(path: &Path) -> Result<(Self, SourceFile), LoadError> { let (file_context, file) = FsLoader::for_path(path)?; Ok((Self::for_loader(file_context), file)) } /// Add a path to search for files. pub fn push_path(&mut self, path: &Path) { self.loader.push_path(path); } } /// A file-system based [`Context`] for use in cargo build scripts. /// /// This is very similar to a [`FsContext`], but has a /// `for_crate` constructor that uses the `CARGO_MANIFEST_DIR` /// environment variable instead of the current working directory, and /// it prints `cargo:rerun-if-changed` messages for each path that it /// loads. pub type CargoContext = Context; impl CargoContext { /// Create a new `Context`, loading files based in the manifest /// directory of the current crate. /// /// Relative paths will be resolved from the directory containing the /// manifest of your package. /// This assumes the program is called by `cargo` as a build script, so /// the `CARGO_MANIFEST_DIR` environment variable is set. pub fn for_crate() -> Result { Ok(Self::for_loader(CargoLoader::for_crate()?)) } /// Create a new `Context` and load a file. /// /// The directory part of `path` is used as a base directory for the loader. /// If `path` is relative, it will be resolved from the directory /// containing the manifest of your package. pub fn for_path(path: &Path) -> Result<(Self, SourceFile), LoadError> { let (file_context, file) = CargoLoader::for_path(path)?; Ok((Self::for_loader(file_context), file)) } /// Add a path to search for files. /// /// If `path` is relative, it will be resolved from the directory /// containing the manifest of your package. pub fn push_path(&mut self, path: &Path) -> Result<(), LoadError> { self.loader.push_path(path) } } impl Context { /// Create a new `Context` for a given file [`Loader`]. pub fn for_loader(loader: AnyLoader) -> Self { Self { loader, scope: None, loading: Default::default(), } } /// Transform some input source to css. /// /// The css output is returned as a raw byte vector. pub fn transform(mut self, file: SourceFile) -> Result, Error> { let scope = self .scope .clone() .unwrap_or_else(|| ScopeRef::new_global(Default::default())); self.lock_loading(&file, false)?; let mut css = CssData::new(); let format = scope.get_format(); handle_parsed(file.parse()?, &mut css, scope, &mut self)?; self.unlock_loading(&file); css.into_buffer(format) } /// Set the output format for this context. /// /// Note that this resets the scope. If you use both `with_format` and /// [`get_scope`][Self::get_scope], you need to call `with_format` /// _before_ `get_scope`. pub fn with_format(mut self, format: Format) -> Self { self.scope = Some(ScopeRef::new_global(format)); self } /// Get the scope for this context. /// /// A `ScopeRef` dereferences to a [`crate::Scope`], which uses internal /// mutability. /// So this can be used for predefining variables, functions, mixins, /// or modules before transforming some scss input. /// /// Note that if you use both [`with_format`][Self::with_format] and /// `get_scope`, you need to call `with_format` _before_ `get_scope`. pub fn get_scope(&mut self) -> ScopeRef { self.scope .get_or_insert_with(|| ScopeRef::new_global(Default::default())) .clone() } /// Find a file. /// /// This method handles sass file name resolution, but delegates /// the actual checking for existing files to the [`Loader`]. /// /// Given a url like `my/util`, this method will check for /// `my/util`, `my/util.scss`, `my/_util.scss`, /// `my/util/index.scss`, and `my/util/_index.scss`. /// The variants that are not a directory index will also be /// checked for `.css` files (and in the future it may also check /// for `.sass` files if rsass suports that format). /// /// If `from` indicates that the loading is for an `@import` rule, /// some [extra file names][import-only] are checked. /// /// The `Context` keeps track of "locked" files (files currently beeing /// parsed or transformed into css). /// The source file returned from this function is locked, so the /// caller of this method need to call [`Self::unlock_loading`] after /// handling it. /// /// [import-only]: https://sass-lang.com/documentation/at-rules/import#import-only-files #[instrument] pub fn find_file( &mut self, url: &str, from: SourceKind, ) -> Result, Error> { let names: &[Combine] = if from.is_import() { &[ // base will either be empty or end with a slash. &|base, name| format!("{base}{name}.import.scss"), &|base, name| format!("{base}_{name}.import.scss"), &|base, name| format!("{base}{name}.scss"), &|base, name| format!("{base}_{name}.scss"), &|base, name| format!("{base}{name}/index.import.scss"), &|base, name| format!("{base}{name}/_index.import.scss"), &|base, name| format!("{base}{name}/index.scss"), &|base, name| format!("{base}{name}/_index.scss"), &|base, name| format!("{base}{name}.css"), &|base, name| format!("{base}_{name}.css"), ] } else { &[ // base will either be empty or end with a slash. &|base, name| format!("{base}{name}.scss"), &|base, name| format!("{base}_{name}.scss"), &|base, name| format!("{base}{name}/index.scss"), &|base, name| format!("{base}{name}/_index.scss"), &|base, name| format!("{base}{name}.css"), &|base, name| format!("{base}_{name}.css"), ] }; // Note: Should a "full stack" of bases be used here? // Or is this fine? let url = relative(&from, url); if let Some((path, mut file)) = self.do_find_file(&url, names)? { let is_module = !from.is_import(); let source = from.url(&path); let file = SourceFile::read(&mut file, source)?; self.lock_loading(&file, is_module)?; Ok(Some(file)) } else { Ok(None) } } /// Find a file in a given filecontext matching a url over a set of /// name rules. fn do_find_file( &self, url: &str, names: &[Combine], ) -> Result, LoadError> { if url.ends_with(".css") || url.ends_with(".sass") || url.ends_with(".scss") { self.loader .find_file(url) .map(|file| file.map(|file| (url.into(), file))) } else { let (base, name) = url.rfind('/').map_or(("", url), |p| url.split_at(p + 1)); for name in names.iter().map(|f| f(base, name)) { if let Some(result) = self.loader.find_file(&name)? { return Ok(Some((name, result))); } } Ok(None) } } pub(crate) fn lock_loading( &mut self, file: &SourceFile, as_module: bool, ) -> Result<(), Error> { let name = file.source().name(); let pos = &file.source().imported; if let Some(old) = self.loading.insert(name.into(), pos.clone()) { Err(Error::ImportLoop( as_module, pos.next().unwrap().clone(), old.next().cloned(), )) } else { Ok(()) } } /// Unlock a file that is locked for input processing. /// /// The lock exists to break circular dependency chains. /// Each file that is locked (by [`Self::find_file`]) needs to be unlocked /// when processing of it is done. pub fn unlock_loading(&mut self, file: &SourceFile) { self.loading.remove(file.path()); } } /// Make a url relative to a given base. fn relative<'a>(base: &SourceKind, url: &'a str) -> Cow<'a, str> { base.next() .map(SourcePos::file_url) .and_then(|base| { base.rfind('/') .map(|p| base.split_at(p + 1).0) .map(|base| format!("{base}{url}").into()) }) .unwrap_or_else(|| url.into()) } impl fmt::Debug for Context { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.debug_struct("Context") .field("loader", &self.loader) .field( "scope", &if self.scope.is_some() { "loaded" } else { "no" }, ) .field("locked", &self.loading.keys()) .finish() } } rsass-0.29.0/rsass/src/input/fsloader.rs000066400000000000000000000037511474765622100202070ustar00rootroot00000000000000use super::{LoadError, Loader, SourceFile, SourceName}; use std::path::{Path, PathBuf}; /// A [`Loader`] that loads files from the filesystem. #[derive(Debug)] pub struct FsLoader { path: Vec, } impl FsLoader { /// Create a new `FsFileContext`. /// /// Files will be resolved from the current working directory. pub fn for_cwd() -> Self { Self { path: vec![PathBuf::new()], } } /// Add a path to search for files. pub fn push_path(&mut self, path: &Path) { self.path.push(path.into()); } /// Create a loader and a `SourceFile` from a given `Path`. pub fn for_path(path: &Path) -> Result<(Self, SourceFile), LoadError> { let mut f = std::fs::File::open(path) .map_err(|e| LoadError::Input(path.display().to_string(), e))?; let (path, name) = path .parent() .and_then(|base| { Some(( vec![base.to_path_buf()], path.strip_prefix(base).ok()?, )) }) .unwrap_or_else(|| (vec![PathBuf::new()], path)); let loader = Self { path }; let source = SourceName::root(name.display().to_string()); let source = SourceFile::read(&mut f, source)?; Ok((loader, source)) } } impl Loader for FsLoader { type File = std::fs::File; fn find_file(&self, url: &str) -> Result, LoadError> { if !url.is_empty() { for base in &self.path { let full = base.join(url); if full.is_file() { tracing::debug!(?full, "opening file"); return Self::File::open(&full) .map_err(|e| { LoadError::Input(full.display().to_string(), e) }) .map(Some); } tracing::trace!(?full, "Not found"); } } Ok(None) } } rsass-0.29.0/rsass/src/input/loader.rs000066400000000000000000000046041474765622100176540ustar00rootroot00000000000000use std::fmt; /// A file context manages finding and loading files. /// /// # Example /// ``` /// use std::collections::HashMap; /// use rsass::input::{Loader, LoadError}; /// /// #[derive(Clone, Debug)] /// struct MemoryLoader<'a> { /// files: HashMap, /// } /// /// impl<'a> Loader for MemoryLoader<'a> { /// type File = &'a [u8]; /// /// fn find_file(&self, name: &str) -> Result, LoadError> { /// Ok(self.files.get(name).map(|data| *data)) /// } /// } /// ``` pub trait Loader: Sized + std::fmt::Debug { /// Anything that can be read can be a File in an implementation. type File: std::io::Read; /// Find a file. /// /// If a file named `base/input.scss` uses a file named `module`, the /// name is converted to `base/module.scss` and variants by /// [`Context::find_file`][crate::input::Context::find_file], and /// this method is called for each variant to check if it exists. /// /// Note that if a file with the given name does not exist, that is not /// an error. /// In that case, `find_file` is expected to return `Ok(None)`. /// Things like illegal file names (for the given backend) or lacking /// permissions, are handled as errors. /// /// The official Sass specification prescribes that files are loaded by /// url instead of by path to ensure universal compatibility of style sheets. /// This effectively mandates the use of forward slashes on all platforms. fn find_file(&self, url: &str) -> Result, LoadError>; } /// An error loading a file. #[non_exhaustive] #[derive(Debug)] pub enum LoadError { /// Reading {0} failed: {1} Input(String, std::io::Error), /// {0} is not a css or sass file. UnknownFormat(String), /// Expected a cargo environment, but none found. NotCalledFromCargo, } impl std::error::Error for LoadError {} impl fmt::Display for LoadError { fn fmt(&self, out: &mut fmt::Formatter) -> fmt::Result { match self { Self::Input(path, err) => { write!(out, "Reading {path:?} failed: {err}") } Self::UnknownFormat(name) => { write!(out, "{name:?} is not a css or sass file.") } Self::NotCalledFromCargo => { write!(out, "Expected a cargo environment, but none found.") } } } } rsass-0.29.0/rsass/src/input/mod.rs000066400000000000000000000006251474765622100171640ustar00rootroot00000000000000//! Finding and loading files. mod cargoloader; mod context; mod fsloader; mod loader; mod sourcefile; mod sourcename; mod sourcepos; pub use cargoloader::CargoLoader; pub use context::{CargoContext, Context, FsContext}; pub use fsloader::FsLoader; pub use loader::{LoadError, Loader}; pub use sourcefile::{Parsed, SourceFile}; pub use sourcename::{SourceKind, SourceName}; pub use sourcepos::SourcePos; rsass-0.29.0/rsass/src/input/sourcefile.rs000066400000000000000000000113031474765622100205400ustar00rootroot00000000000000use super::{LoadError, SourceName}; use crate::parser::{css, sassfile, Span}; use crate::{Error, ParseError}; use std::io::Read; use std::sync::Arc; /// The full data of a source file. /// /// This type contains both the contents (internally as a `Vec`) /// of a file and information on from where (and why) it was loaded. /// You can create a `SourceFile` with the [`SourceFile::read`] /// constructor, but normally you will get one from an /// [`input::Context`][crate::input::Context]. /// /// A `SourceFile` knows what format it is in, so it can apply the /// correct parser in the [`parse`][Self::parse] method. /// Currently, the `scss` and `css` formats are supported. /// If rsass adds support for the `sass` (indented) format, it will /// also be supported by this type. /// /// This type is internally reference counted. #[derive(Clone)] pub struct SourceFile { data: Arc, } struct Impl { data: Vec, source: SourceName, format: SourceFormat, } impl SourceFile { /// Create a `SourceFile` from something readable and a name. /// /// The format will be determined from the suffix of the `source` /// file name. /// /// This will return an error if reading the `file` fails, or if a /// supported format cannot be determined from the `source` name. pub fn read( file: &mut T, source: SourceName, ) -> Result { let format = SourceFormat::try_from(source.name())?; let mut data = vec![]; file.read_to_end(&mut data) .map_err(|e| LoadError::Input(source.name().to_string(), e))?; Ok(Self::new(data, source, format)) } /// Handle some raw byte data as an input file with a given source /// name. /// /// The `data` is expected to be in the `scss` format, the `source` /// does not need a suffix (e.g. it can be `SourceName::root("-")` /// as per convention for standard input). pub fn scss_bytes(data: impl Into>, source: SourceName) -> Self { Self::new(data.into(), source, SourceFormat::Scss) } /// Handle some raw byte data as an input file with a given source /// name. /// /// The `data` is expected to be in the `css` format, the `source` /// does not need a suffix (e.g. it can be `SourceName::root("-")` /// as per convention for standard input). pub fn css_bytes(data: impl Into>, source: SourceName) -> Self { Self::new(data.into(), source, SourceFormat::Css) } fn new(data: Vec, source: SourceName, format: SourceFormat) -> Self { Self { data: Arc::new(Impl { data, source, format, }), } } /// Parse this source. /// /// The correct parser will be applied based on the (known) format /// of this `SourceFile`. pub fn parse(&self) -> Result { let data = Span::new(self); match self.data.format { SourceFormat::Scss => { Ok(Parsed::Scss(ParseError::check(sassfile(data))?)) } SourceFormat::Css => { Ok(Parsed::Css(ParseError::check(css::file(data))?)) } } } pub(crate) fn data(&self) -> &[u8] { &self.data.data } pub(crate) fn source(&self) -> &SourceName { &self.data.source } pub(crate) fn path(&self) -> &str { self.data.source.name() } } impl Ord for SourceFile { fn cmp(&self, other: &Self) -> std::cmp::Ordering { self.data.source.cmp(&other.data.source) } } impl PartialOrd for SourceFile { fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } } impl PartialEq for SourceFile { fn eq(&self, other: &Self) -> bool { self.data.source == other.data.source } } impl Eq for SourceFile {} /// A supported input format. /// /// Rsass handles the scss format and raw css. /// TODO: In the future, the sass format may also be supported. #[derive(Clone, Copy, Debug, PartialEq, Eq)] enum SourceFormat { /// The scss format is the main input format. Scss, /// The css format Css, } impl TryFrom<&str> for SourceFormat { type Error = LoadError; fn try_from(name: &str) -> Result { if name.ends_with(".scss") { Ok(Self::Scss) } else if name.ends_with(".css") { Ok(Self::Css) } else { Err(LoadError::UnknownFormat(name.into())) } } } /// Parsed source that is either css or sass data. #[derive(Clone, Debug)] pub enum Parsed { /// Raw css data. Css(Vec), /// Sass (scss) data. Scss(Vec), } rsass-0.29.0/rsass/src/input/sourcename.rs000066400000000000000000000053161474765622100205500ustar00rootroot00000000000000use super::SourcePos; use std::fmt; /// The name of a source file. /// /// This also contains the information if this was the root stylesheet /// or where it was imported from. #[derive(Clone, Debug, Eq, PartialEq, PartialOrd, Ord)] pub struct SourceName { name: String, pub(crate) imported: SourceKind, } impl SourceName { /// Create a new top-level `SourceName`. pub fn root(name: T) -> Self { Self { name: name.to_string(), imported: SourceKind::Root, } } /// Create a name for a mixin called from a specific pos. pub fn called(name: T, from: SourcePos) -> Self { Self { name: from.file_url().into(), imported: SourceKind::Call(name.to_string(), from), } } /// Get the name of this source. pub fn name(&self) -> &str { &self.name } /// True if this is the position of something built-in. pub fn is_builtin(&self) -> bool { // Note: maybe implement this as a sepate source kind? self.name.starts_with("sass:") || self.name.is_empty() } } /// The kind of loading, or why a load is attempted. #[derive(Clone, Debug, Eq, PartialEq, PartialOrd, Ord)] pub enum SourceKind { /// The root file that `rsass` loads. Root, /// An `@import` rule at the given position. Import(SourcePos), /// An `@use` rule at the given position. Use(SourcePos), /// An `@forward` rule at the given position. Forward(SourcePos), /// A call to a named function at the given position. Call(String, SourcePos), } impl SourceKind { /// A `load-css` call is attempted at the given pos. pub fn load_css(pos: &SourcePos) -> Self { Self::Call("load-css".into(), pos.clone()) } pub(crate) fn url(self, url: &str) -> SourceName { SourceName { name: url.to_string(), imported: self, } } pub(crate) fn next(&self) -> Option<&SourcePos> { match self { Self::Root => None, Self::Import(pos) => Some(pos), Self::Use(pos) => Some(pos), Self::Forward(pos) => Some(pos), Self::Call(_, pos) => Some(pos), } } pub(crate) fn is_import(&self) -> bool { matches!(self, Self::Import(_)) } } impl fmt::Display for SourceKind { fn fmt(&self, out: &mut fmt::Formatter) -> fmt::Result { match self { Self::Root => out.write_str("root stylesheet"), Self::Import(_) => out.write_str("@import"), Self::Use(_) => out.write_str("@use"), Self::Forward(_) => out.write_str("@forward"), Self::Call(name, _) => write!(out, "{name}()"), } } } rsass-0.29.0/rsass/src/input/sourcepos.rs000066400000000000000000000226751474765622100204400ustar00rootroot00000000000000use crate::input::{SourceFile, SourceName}; use crate::parser::{DebugBytes, Span}; use crate::sass::{FormalArgs, Name}; use std::cmp::Ordering; use std::fmt::{self, Write}; use std::ops::Range; /// A specific part of input. /// /// This is represented as start and end offsets into [`SourceFile`]. /// The sourcefile is internally reference counted, so a `SourcePos` can /// be cheaply cloned, but does not implement copy. #[derive(Clone)] pub struct SourcePos { start: usize, end: usize, source: SourceFile, } impl SourcePos { pub(crate) fn new_range(source: SourceFile, range: Range) -> Self { Self { start: range.start, end: range.end, source, } } pub(crate) fn borrow(&self) -> Span { Span::new_range(&self.source, self.range()) } fn range(&self) -> Range { self.start..self.end } /// This span of input as actual bytes. pub fn fragment(&self) -> &[u8] { &self.source.data()[self.range()] } /// Return true if the pos is at the end of the source. pub fn is_at_end(&self) -> bool { self.start == self.source.data().len() } /// Return the line number for (the beginning of) this span. pub fn line_no(&self) -> usize { self.source.data()[0..self.start] .iter() .filter(|c| c == &&b'\n') .count() + 1 } fn line_pos(&self) -> usize { let data = self.source.data(); let start = (0..self.start) .rev() .find(|i| data.get(*i) == Some(&b'\n')) .map_or(0, |n| n + 1); self.start - start + 1 } /// Show this source position. /// /// Dislays the line containg the position, highlighting /// the position. /// This is typically used when there is one source position /// relevant for an error. pub fn show(&self, out: &mut impl Write) -> fmt::Result { self.show_impl(out, "", '^', "")?; self.show_files(out) } /// Show two source positions together. pub fn show_two( out: &mut fmt::Formatter, one: &Self, one_name: &str, other: &Self, other_name: &str, ) -> fmt::Result { if one.file_url() == other.file_url() { if one < other { Self::show_in_file(out, one, one_name, other, other_name) } else { Self::show_in_file(out, other, other_name, one, one_name) }?; } else { one.show_detail(out, '^', one_name)?; writeln!(out)?; other.show_detail(out, '=', other_name)?; } one.show_files(out) } fn show_in_file( out: &mut fmt::Formatter, first: &Self, first_name: &str, second: &Self, second_name: &str, ) -> fmt::Result { let ellipsis = first.line_no() + 1 < second.line_no(); let lnw = second.line_no().to_string().len(); let lnw = if ellipsis { std::cmp::max(3, lnw) } else { lnw }; writeln!(out, "{0:lnw$} ,", "", lnw = lnw)?; first.show_inner(out, lnw, '=', first_name)?; if ellipsis { writeln!(out, "... |")?; } second.show_inner(out, lnw, '^', second_name)?; write!(out, "{0:lnw$} '", "", lnw = lnw)?; Ok(()) } fn show_detail( &self, out: &mut impl Write, marker: char, what: &str, ) -> fmt::Result { let filename = self.file_url(); let filename = if filename.is_empty() { String::new() } else { format!("--> {filename}") }; self.show_impl(out, &filename, marker, what) } fn show_impl( &self, out: &mut impl Write, arrow: &str, marker: char, what: &str, ) -> fmt::Result { let lnw = self.line_no().to_string().len(); writeln!(out, "{0:lnw$} ,{arrow}", "", arrow = arrow, lnw = lnw)?; self.show_inner(out, lnw, marker, what)?; write!(out, "{0:lnw$} '", "", lnw = lnw) } fn show_inner( &self, out: &mut impl Write, lnw: usize, marker: char, what: &str, ) -> fmt::Result { let data = self.source.data(); let start = (0..self.start) .rev() .find(|i| data.get(*i) == Some(&b'\n')) .map_or(0, |n| n + 1); let end = (self.start..) .find(|i| data.get(*i).map_or(true, |b| b == &b'\n')) .unwrap(); let line = &data[start..end]; let line_no = self.line_no(); write!( out, "{ln:lpos$}{mark}", "", line = String::from_utf8_lossy(line).trim_end_matches('\r'), ln = line_no, lnw = lnw, lpos = self.start - start, // TODO: Count visible char width mark = marker.to_string().repeat((self.end - self.start).max(1)), // DITO )?; if what.is_empty() { writeln!(out) } else { writeln!(out, " {what}") } } /// Show the file name of this pos and where it was imported from. fn show_files(&self, out: &mut impl Write) -> fmt::Result { let mut nextpos = Some(self.clone()); let mut lines = Vec::new(); while let Some(pos) = nextpos { lines.push(( format!( "{file} {row}:{col}", file = pos.file_url(), row = pos.line_no(), col = pos.line_pos(), ), pos.source.source().imported.to_string(), )); nextpos = pos.source.source().imported.next().cloned(); } if let Some(whatw) = lines.iter().map(|(what, _why)| what.len()).max() { for (what, why) in lines { write!( out, "\n{0:lnw$} {what:whatw$} {why}", "", lnw = self.line_no().to_string().len(), what = what, whatw = whatw, why = why, )?; } } Ok(()) } /// If self is preceded (on same line) by `s`, include `s` in self. pub(crate) fn opt_back(mut self, s: &str) -> Self { let len = s.len(); if self.source.data().get(self.start - len..self.start) == Some(s.as_bytes()) { self.start -= len; } self } /// If the position is `calc(some-arg)`, change to only `some-arg`. /// /// This is only used to make errors from rsass more similar to /// dart-sass errors. pub(crate) fn opt_in_calc(mut self) -> Self { let s = b"calc("; let part = &self.fragment(); if part.starts_with(s) && part.ends_with(b")") { self.start += s.len(); self.end -= 1; } self } /// Only to make error messages match dart-sass in peculiar cases. pub(crate) fn opt_trail_ws(mut self) -> Self { while self.source.data().get(self.end) == Some(&b' ') { self.end += 1; } self } pub(crate) fn in_call(&self, name: &str) -> Self { Self { start: self.start, end: self.end, source: SourceFile::scss_bytes( self.source.data(), SourceName::called(name, self.clone()), ), } } /// True if the source of this position is built-in. pub fn is_builtin(&self) -> bool { self.source.source().is_builtin() } pub(crate) fn mock_function( name: &Name, args: &FormalArgs, module: &str, ) -> Self { Self::mock_impl("@function", name, args, module) } pub(crate) fn mock_mixin( name: &Name, args: &FormalArgs, module: &str, ) -> Self { Self::mock_impl("@mixin", name, args, module) } fn mock_impl( kind: &str, name: &Name, args: &FormalArgs, module: &str, ) -> Self { let line = format!("{kind} {name}{args} {{"); Self { start: kind.len() + 1, end: line.len() - 2, source: SourceFile::scss_bytes(line, SourceName::root(module)), } } /// Get the resolved name / url of the file this source is loaded from. pub fn file_url(&self) -> &str { self.source.source().name() } } impl From for SourcePos { fn from(source: SourceFile) -> Self { Self { start: 0, end: source.data().len(), source, } } } impl PartialOrd for SourcePos { fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } } impl Ord for SourcePos { fn cmp(&self, other: &Self) -> std::cmp::Ordering { self.source .cmp(&other.source) .then(self.start.cmp(&other.start)) .then(self.end.cmp(&other.end)) } } impl PartialEq for SourcePos { fn eq(&self, other: &Self) -> bool { self.partial_cmp(other) == Some(Ordering::Equal) } } impl Eq for SourcePos {} impl std::fmt::Debug for SourcePos { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { f.debug_struct("OwnedSpan") .field("range", &self.range()) .field("data", &DebugBytes(self.fragment())) .finish() } } rsass-0.29.0/rsass/src/lib.rs000066400000000000000000000073001474765622100160110ustar00rootroot00000000000000//! Sass reimplemented in rust (not yet complete). //! //! The "r" in the name might stand for the Rust programming language, //! for "re-implemented", or possibly for my name Rasmus. //! //! # Example //! //! ``` //! use rsass::{compile_scss_path, output}; //! //! let path = "tests/misc/14_imports/a.scss".as_ref(); //! let format = output::Format { //! style: output::Style::Compressed, //! .. Default::default() //! }; //! let css = compile_scss_path(path, format).unwrap(); //! //! assert_eq!(css, b"div span{moo:goo}\n") //! ``` //! //! # Sass language and implemetation status //! //! The sass language [is defined in its reference //! doc](http://sass-lang.com/documentation/). //! This implementation is incomplete but getting there, if slowly. //! //! Progress: 5879 of 12589 tests passed. //! //! If you want a working rust library for sass right now, you may //! be better of with [sass-rs](https://crates.io/crates/sass-rs) //! or [sass-alt](https://crates.io/crates/sass-alt), //! which are rust wrappers around libsass. //! Another alternative is [grass](https://crates.io/crates/grass) //! which is another early stage pure rust implementation. //! That said, this implementation has reached a version where I find it //! usable for my personal projects, and the number of working tests are //! improving. #![forbid(unsafe_code)] #![forbid(missing_docs)] pub mod css; mod error; pub mod input; mod ordermap; pub mod output; mod parser; pub mod sass; pub mod value; mod variablescope; pub use crate::error::{Error, Invalid}; pub use crate::parser::{parse_value_data, ParseError}; pub use crate::variablescope::{Scope, ScopeError, ScopeRef}; use crate::input::{FsContext, SourceName}; use crate::output::Format; use std::path::Path; /// Parse a scss value from a buffer and write its css representation /// in the given format. /// /// # Example /// /// ``` /// # use rsass::{compile_value, Error}; /// # fn main() -> Result<(), Error> { /// assert_eq!(compile_value(b"10px + 4px", Default::default())?, b"14px"); /// assert_eq!(compile_value(b"10px 4px", Default::default())?, b"10px 4px"); /// # Ok(()) /// # } /// ``` pub fn compile_value(input: &[u8], format: Format) -> Result, Error> { let scope = ScopeRef::new_global(format); let value = parse_value_data(input)?.evaluate(scope)?; Ok(value.format(format).to_string().into_bytes()) } /// Parse scss data from a buffer and write css in the given style. /// /// # Example /// /// ``` /// use rsass::compile_scss; /// /// assert_eq!( /// compile_scss( /// b"foo {\ /// \n bar {\ /// \n baz:value;\ /// \n }\ /// \n}", /// Default::default(), /// ).unwrap(), /// b"foo bar {\ /// \n baz: value;\ /// \n}\n" /// ) /// ``` pub fn compile_scss(input: &[u8], format: Format) -> Result, Error> { FsContext::for_cwd().with_format(format).transform( input::SourceFile::scss_bytes(input, SourceName::root("-")), ) } /// Parse a file of scss data and write css in the given style. /// /// Any `@import` directives will be handled relative to the directory /// part of `file`. /// /// # Example /// /// ``` /// use rsass::{compile_scss_path, output::{Format, Style}}; /// /// assert_eq!( /// compile_scss_path( /// "tests/misc/14_imports/a.scss".as_ref(), /// Format { style: Style::Compressed, precision: 5 }, /// ).unwrap(), /// b"div span{moo:goo}\n" /// ) /// ``` /// /// **Attention**: Previously, this function was named `compile_scss_file()`. pub fn compile_scss_path( path: &Path, format: Format, ) -> Result, Error> { let (context, source) = FsContext::for_path(path)?; context.with_format(format).transform(source) } rsass-0.29.0/rsass/src/ordermap.rs000066400000000000000000000045431474765622100170620ustar00rootroot00000000000000use std::slice::Iter; use std::vec::IntoIter; #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)] pub struct OrderMap(Vec<(K, V)>); impl OrderMap { pub fn new() -> Self { Self(Vec::new()) } pub fn singleton(key: K, value: V) -> Self { Self(vec![(key, value)]) } pub fn insert(&mut self, key: K, value: V) -> Option { for (ref k, ref mut v) in &mut self.0 { if k == &key { return Some(std::mem::replace(v, value)); } } self.0.push((key, value)); None } pub fn iter(&self) -> Iter<(K, V)> { self.0.iter() } pub fn keys(&self) -> impl Iterator { self.0.iter().map(|(k, _v)| k) } pub fn values(&self) -> impl Iterator { self.0.iter().map(|(_k, v)| v) } pub fn get(&self, key: &K) -> Option<&V> { for (k, v) in &self.0 { if k == key { return Some(v); } } None } pub fn get_mut(&mut self, key: &K) -> Option<&mut V> { for kv in &mut self.0 { if &kv.0 == key { return Some(&mut kv.1); } } None } pub fn remove(&mut self, key: &K) -> Option { for (i, (k, _v)) in self.0.iter().enumerate() { if k == key { return Some(self.0.remove(i).1); } } None } pub fn contains_key(&self, key: &K) -> bool { self.0.iter().any(|(k, _v)| k == key) } pub fn len(&self) -> usize { self.0.len() } pub fn is_empty(&self) -> bool { self.0.is_empty() } pub fn get_item(&self, i: usize) -> Option<&(K, V)> { self.0.get(i) } pub fn set_item(&mut self, i: usize, key: K, value: V) { self.0[i] = (key, value); } } impl Default for OrderMap { fn default() -> Self { Self(Default::default()) } } impl IntoIterator for OrderMap { type Item = (K, V); type IntoIter = IntoIter<(K, V)>; fn into_iter(self) -> IntoIter<(K, V)> { self.0.into_iter() } } impl FromIterator<(K, V)> for OrderMap { fn from_iter(i: T) -> Self where T: IntoIterator, { Self(Vec::from_iter(i)) } } rsass-0.29.0/rsass/src/output/000077500000000000000000000000001474765622100162355ustar00rootroot00000000000000rsass-0.29.0/rsass/src/output/cssbuf.rs000066400000000000000000000043211474765622100200700ustar00rootroot00000000000000use super::Format; use std::io::{self, Write}; pub struct CssBuf { buf: Vec, format: Format, indent: usize, } impl CssBuf { pub fn new(format: Format) -> Self { Self { buf: Vec::new(), format, indent: 0, } } pub fn take(self) -> Vec { self.buf } pub(crate) fn len(&self) -> usize { self.buf.len() } pub(crate) fn format(&self) -> Format { self.format } pub(crate) fn indent_level(&self) -> usize { self.indent } pub fn start_block(&mut self) { self.add_one(" {\n", "{"); self.indent += 2; } pub fn end_block(&mut self) { self.pop_nl(); if self.format.is_compressed() && self.buf.last() == Some(&b';') { self.buf.pop(); } self.indent -= 2; if self.buf.last() != Some(&b'{') { self.do_indent(); } self.add_one("}\n", "}"); } pub fn pop_nl(&mut self) { if self.buf.last() == Some(&b'\n') { self.buf.pop(); } } pub fn do_indent(&mut self) { self.add_str(self.format.get_indent(self.indent)); } pub(crate) fn do_indent_no_nl(&mut self) { let stuff = self.format.get_indent(self.indent); if stuff.len() > 1 { self.add_str(&stuff[1..]); } } pub fn add_str(&mut self, sub: &str) { self.buf.extend_from_slice(sub.as_bytes()); } pub(crate) fn add_char(&mut self, ch: char) { let mut buf = [b'0'; 6]; self.add_str(ch.encode_utf8(&mut buf)) } pub fn add_one(&mut self, normal: &str, compressed: &str) { self.add_str(if self.format.is_compressed() { compressed } else { normal }); } pub fn opt_nl(&mut self) { if !self.format.is_compressed() && !self.buf.is_empty() && !self.buf.ends_with(b"\n\n") { self.add_str("\n"); } } } impl Write for CssBuf { fn write(&mut self, data: &[u8]) -> io::Result { self.buf.extend_from_slice(data); Ok(data.len()) } fn flush(&mut self) -> io::Result<()> { Ok(()) } } rsass-0.29.0/rsass/src/output/cssdata.rs000066400000000000000000000071141474765622100202300ustar00rootroot00000000000000use super::cssdest::{ AtMediaDest, AtRuleDest, CssDestination, NsRuleDest, RuleDest, }; use super::{CssBuf, Format}; use crate::css::{ Comment, CssSelectorSet, CssString, Import, Item, MediaArgs, Value, }; use crate::{Error, Invalid, ScopeRef}; use std::collections::BTreeMap; type Result = std::result::Result; /// A holder for css data. pub struct CssData { imports: Vec, body: Vec, modules: BTreeMap, } impl CssData { pub fn new() -> Self { Self { imports: Default::default(), body: Default::default(), modules: Default::default(), } } pub fn into_iter(self) -> impl Iterator { self.imports.into_iter().map(Into::into).chain(self.body) } pub fn load_module( &mut self, path: &str, init: Init, ) -> Result where Init: FnOnce(&mut Self) -> Result, { if let Some(loaded) = self.modules.get(path) { return Ok(loaded.clone()); } let module = init(self)?; self.modules.insert(path.into(), module.clone()); Ok(module) } pub fn into_buffer(self, format: Format) -> Result, Error> { let mut buf = CssBuf::new(format); for i in &self.imports { i.write(&mut buf)?; } for i in &self.body { i.write(&mut buf)?; } let buf = buf.take(); let compressed = format.is_compressed(); let mut result = if buf.is_ascii() { buf } else { let mark = if compressed { // U+FEFF is byte order mark, used to show encoding. "\u{feff}" } else { "@charset \"UTF-8\";\n" }; let mut result = Vec::with_capacity(mark.len() + buf.len()); result.extend_from_slice(mark.as_bytes()); result.extend(buf); result }; while result.last() == Some(&b'\n') { result.pop(); } if compressed && result.last() == Some(&b';') { result.pop(); } if !result.is_empty() { result.push(b'\n'); } Ok(result) } } impl CssDestination for CssData { fn head(&mut self) -> &mut CssData { self } fn start_rule(&mut self, selectors: CssSelectorSet) -> Result { Ok(RuleDest::new(self, selectors)) } fn start_atmedia(&mut self, args: MediaArgs) -> AtMediaDest { AtMediaDest::new(self, args) } fn start_atrule(&mut self, name: String, args: Value) -> AtRuleDest { AtRuleDest::new(self, name, args) } fn start_nsrule(&mut self, _name: String) -> Result { Err(Invalid::GlobalNsProperty) } fn push_import(&mut self, import: Import) { self.imports.push(import); } fn push_comment(&mut self, c: Comment) { self.body.push(c.into()); } fn push_item(&mut self, item: Item) -> Result<()> { if let Item::Import(import) = item { self.push_import(import); } else { self.body.push(item); } Ok(()) } fn push_property(&mut self, _name: String, _value: Value) -> Result<()> { Err(Invalid::DeclarationOutsideRule) } fn push_custom_property( &mut self, _: String, _: CssString, ) -> Result<()> { Err(Invalid::GlobalCustomProperty) } fn separate(&mut self) { self.body.push(Item::Separator); } } rsass-0.29.0/rsass/src/output/cssdest.rs000066400000000000000000000273071474765622100202640ustar00rootroot00000000000000use super::CssData; use crate::css::{ AtRule, AtRuleBodyItem, Comment, CssSelectorSet, CssString, CustomProperty, Import, Item, MediaArgs, MediaRule, Property, Rule, Value, }; use crate::Invalid; type Result = std::result::Result; pub trait CssDestination { fn head(&mut self) -> &mut CssData; fn start_rule(&mut self, selectors: CssSelectorSet) -> Result; fn start_atmedia(&mut self, args: MediaArgs) -> AtMediaDest; fn start_atrule(&mut self, name: String, args: Value) -> AtRuleDest; fn start_nsrule(&mut self, name: String) -> Result; fn push_import(&mut self, import: Import); fn push_comment(&mut self, c: Comment); fn push_item(&mut self, item: Item) -> Result; fn push_property(&mut self, name: String, value: Value) -> Result; fn push_custom_property( &mut self, name: String, value: CssString, ) -> Result; /// Nop in default implementation, adds a spacer in `CssHead`. fn separate(&mut self) {} } pub struct RuleDest<'a> { parent: &'a mut dyn CssDestination, rule: Rule, trail: Vec, } impl<'a> RuleDest<'a> { pub fn new( parent: &'a mut dyn CssDestination, selectors: CssSelectorSet, ) -> Self { RuleDest { parent, rule: Rule::new(selectors.into()), trail: Default::default(), } } } impl Drop for RuleDest<'_> { fn drop(&mut self) { fn end(dest: &mut RuleDest) -> Result<()> { dest.parent.push_item(dest.rule.clone().into())?; for item in std::mem::take(&mut dest.trail) { dest.parent.push_item(item)?; } dest.parent.separate(); Ok(()) } if let Err(err) = end(self) { eprintln!("Error in ending RuleDest: {err}"); } } } impl CssDestination for RuleDest<'_> { fn head(&mut self) -> &mut CssData { self.parent.head() } fn start_rule(&mut self, selectors: CssSelectorSet) -> Result { Ok(RuleDest::new(self, selectors)) } fn start_atmedia(&mut self, args: MediaArgs) -> AtMediaDest { let selectors = self.rule.selectors.clone(); AtMediaDest { parent: self, args, rule: Some(Rule::new(selectors)), body: Vec::new(), } } fn start_atrule(&mut self, name: String, args: Value) -> AtRuleDest { let rule = if is_flat_rule(&name) { None } else { Some(Rule::new(self.rule.selectors.clone())) }; AtRuleDest { parent: self, name, args, rule, body: Vec::new(), } } fn start_nsrule(&mut self, name: String) -> Result { Ok(NsRuleDest { parent: self, name }) } fn push_import(&mut self, import: Import) { self.rule.push(import.into()); } fn push_comment(&mut self, c: Comment) { self.rule.push(c.into()); } fn push_item(&mut self, item: Item) -> Result { match item { Item::AtRule(r) => match r.try_into() { Ok(item) => self.rule.push(item), Err(r) => self.trail.push(r.into()), }, item => self.trail.push(item), } Ok(()) } fn push_property(&mut self, name: String, value: Value) -> Result { self.rule.push(Property::new(name, value).into()); Ok(()) } fn push_custom_property( &mut self, name: String, value: CssString, ) -> Result { self.rule.push(CustomProperty::new(name, value).into()); Ok(()) } } pub struct NsRuleDest<'a> { parent: &'a mut dyn CssDestination, name: String, } impl CssDestination for NsRuleDest<'_> { fn head(&mut self) -> &mut CssData { self.parent.head() } fn start_rule(&mut self, _selectors: CssSelectorSet) -> Result { Err(Invalid::InNsRule) } fn start_atmedia(&mut self, args: MediaArgs) -> AtMediaDest { AtMediaDest::new(self, args) } fn start_atrule(&mut self, name: String, args: Value) -> AtRuleDest { AtRuleDest { parent: self, name, args, rule: None, body: Vec::new(), } } fn start_nsrule(&mut self, name: String) -> Result { Ok(NsRuleDest { parent: self, name }) } fn push_import(&mut self, import: Import) { self.parent.push_import(import); } fn push_comment(&mut self, c: Comment) { self.parent.push_comment(c); } fn push_item(&mut self, _item: Item) -> Result { Err(Invalid::InNsRule) } fn push_property(&mut self, name: String, value: Value) -> Result { self.parent .push_property(format!("{}-{}", self.name, name), value) } fn push_custom_property(&mut self, _: String, _: CssString) -> Result { Err(Invalid::InNsRule) } } pub struct AtRuleDest<'a> { parent: &'a mut dyn CssDestination, name: String, args: Value, rule: Option, body: Vec, } impl<'a> AtRuleDest<'a> { pub fn new( parent: &'a mut dyn CssDestination, name: String, args: Value, ) -> Self { AtRuleDest { parent, name, args, rule: None, body: Vec::new(), } } } impl Drop for AtRuleDest<'_> { fn drop(&mut self) { let mut body = std::mem::take(&mut self.body); let name = std::mem::take(&mut self.name); let args = std::mem::replace(&mut self.args, Value::Null); if let Some(rule) = self.rule.take() { body.insert(0, rule.into()); } let result = AtRule::new(name, args, Some(body)); if let Err(err) = self.parent.push_item(result.into()) { eprintln!("Error ending AtRuleDest: {err}"); } self.parent.separate(); } } impl CssDestination for AtRuleDest<'_> { fn head(&mut self) -> &mut CssData { self.parent.head() } fn start_rule(&mut self, selectors: CssSelectorSet) -> Result { Ok(RuleDest::new(self, selectors)) } fn start_atmedia(&mut self, args: MediaArgs) -> AtMediaDest { let rule = self.rule.as_ref().map(|r| Rule::new(r.selectors.clone())); AtMediaDest { parent: self, args, rule, body: Vec::new(), } } fn start_atrule(&mut self, name: String, args: Value) -> AtRuleDest { let rule = if is_flat_rule(&name) { None } else { self.rule.as_ref().map(|r| Rule::new(r.selectors.clone())) }; AtRuleDest { parent: self, name, args, rule, body: Vec::new(), } } fn start_nsrule(&mut self, name: String) -> Result { Ok(NsRuleDest { parent: self, name }) } fn push_import(&mut self, import: Import) { self.body.push(import.into()); } fn push_comment(&mut self, c: Comment) { if let Some(rule) = &mut self.rule { rule.push(c.into()); } else { self.body.push(c.into()); } } fn push_item(&mut self, item: Item) -> Result { self.body.push(match item { Item::Comment(c) => c.into(), Item::Import(i) => i.into(), Item::Rule(r) => r.into(), // FIXME: This should bubble or something? Item::MediaRule(r) => r.into(), Item::AtRule(r) => r.into(), Item::Separator => return Ok(()), // Not pushed? }); Ok(()) } fn push_property(&mut self, name: String, value: Value) -> Result { let prop = Property::new(name, value); if let Some(rule) = &mut self.rule { rule.push(prop.into()); } else { self.body.push(prop.into()); } Ok(()) } fn push_custom_property( &mut self, name: String, value: CssString, ) -> Result { if let Some(rule) = &mut self.rule { rule.push(CustomProperty::new(name, value).into()); Ok(()) } else { Err(Invalid::GlobalCustomProperty) } } } pub struct AtMediaDest<'a> { parent: &'a mut dyn CssDestination, args: MediaArgs, rule: Option, body: Vec, } impl<'a> AtMediaDest<'a> { pub fn new(parent: &'a mut dyn CssDestination, args: MediaArgs) -> Self { AtMediaDest { parent, args, rule: None, body: Vec::new(), } } } impl Drop for AtMediaDest<'_> { fn drop(&mut self) { let mut body = std::mem::take(&mut self.body); let args = std::mem::replace(&mut self.args, MediaArgs::Name(String::new())); if let Some(rule) = self.rule.take() { if !rule.body.is_empty() { body.insert(0, rule.into()); } } let result = MediaRule::new(args, body); if let Err(err) = self.parent.push_item(result.into()) { eprintln!("Error ending AtRuleDest: {err}"); } self.parent.separate(); } } impl CssDestination for AtMediaDest<'_> { fn head(&mut self) -> &mut CssData { self.parent.head() } fn start_rule(&mut self, selectors: CssSelectorSet) -> Result { Ok(RuleDest::new(self, selectors)) } fn start_atmedia(&mut self, args: MediaArgs) -> AtMediaDest { let rule = self.rule.as_ref().map(|r| Rule::new(r.selectors.clone())); AtMediaDest { parent: self, args, rule, body: Vec::new(), } } fn start_atrule(&mut self, name: String, args: Value) -> AtRuleDest { let rule = if is_flat_rule(&name) { None } else { self.rule.as_ref().map(|r| Rule::new(r.selectors.clone())) }; AtRuleDest { parent: self, name, args, rule, body: Vec::new(), } } fn start_nsrule(&mut self, name: String) -> Result { Ok(NsRuleDest { parent: self, name }) } fn push_import(&mut self, import: Import) { self.body.push(import.into()); } fn push_comment(&mut self, c: Comment) { if let Some(rule) = &mut self.rule { rule.push(c.into()); } else { self.body.push(c.into()); } } fn push_item(&mut self, item: Item) -> Result { self.body.push(match item { Item::Comment(c) => c.into(), Item::Import(i) => i.into(), Item::Rule(r) => r.into(), // FIXME: Check if the args can be merged! // Or is that a separate pass after building a first css tree? Item::MediaRule(r) => r.into(), Item::AtRule(r) => r.into(), Item::Separator => return Ok(()), // Not pushed? }); Ok(()) } fn push_property(&mut self, name: String, value: Value) -> Result { let prop = Property::new(name, value); if let Some(rule) = &mut self.rule { rule.push(prop.into()); } else { self.body.push(prop.into()); } Ok(()) } fn push_custom_property( &mut self, name: String, value: CssString, ) -> Result { if let Some(rule) = &mut self.rule { rule.push(CustomProperty::new(name, value).into()); Ok(()) } else { Err(Invalid::GlobalCustomProperty) } } } fn is_flat_rule(name: &str) -> bool { name == "font-face" || name == "keyframes" } rsass-0.29.0/rsass/src/output/format.rs000066400000000000000000000031621474765622100200750ustar00rootroot00000000000000use super::Style; /// Specifies the format for outputing css. /// /// The format is the style (expanded or compressed) and the precision /// for numeric values. #[derive(Clone, Copy, Debug)] pub struct Format { /// The style of this format (expanded, compressed or introspection) pub style: Style, /// Number of decimals to use for numeric output. pub precision: usize, } impl Format { /// Create a format for introspection. pub fn introspect() -> Self { Self { style: Style::Introspection, ..Default::default() } } /// Return true if this is a compressed format. pub fn is_compressed(&self) -> bool { self.style == Style::Compressed } /// Return true if this is an introspection format. pub fn is_introspection(&self) -> bool { self.style == Style::Introspection } /// Get a newline followed by len spaces, unles self is compressed. pub fn get_indent(&self, len: usize) -> &'static str { static INDENT: &str = "\n "; if self.is_compressed() { "" } else { &INDENT[..=len] } } } impl Default for Format { fn default() -> Self { Self { style: Style::Expanded, precision: 10, } } } /// A small container binding a value with an output format. /// /// See e.g. [`css::Value::format`]. /// /// [`css::Value::format`]: ../css/enum.Value.html#method.format pub struct Formatted<'a, T> { pub(crate) value: &'a T, pub(crate) format: Format, } rsass-0.29.0/rsass/src/output/mod.rs000066400000000000000000000004351474765622100173640ustar00rootroot00000000000000//! Types describing how to format output. mod cssbuf; mod cssdata; mod cssdest; mod format; mod style; mod transform; pub use format::{Format, Formatted}; pub use style::Style; pub(crate) use cssbuf::CssBuf; pub(crate) use cssdata::CssData; pub(crate) use transform::handle_parsed; rsass-0.29.0/rsass/src/output/style.rs000066400000000000000000000005711474765622100177460ustar00rootroot00000000000000/// Selected target format. /// Only formats that are variants of this type are supported by rsass. #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub enum Style { /// The expanded format, nice readable css. Expanded, /// The compressed format, saves download size. Compressed, /// Special format used by the inspect(value) sass function Introspection, } rsass-0.29.0/rsass/src/output/transform.rs000066400000000000000000000460551474765622100206300ustar00rootroot00000000000000//! This module provides `handle_body` (and internally `handle_item`), //! that does most of the work for [`crate::input::Context::transform`]. use super::cssdest::CssDestination; use super::CssData; use crate::css::{self, AtRule, Import, SelectorCtx, Value}; use crate::error::ResultPos; use crate::input::{Context, Loader, Parsed, SourceKind}; use crate::sass::{get_global_module, Expose, Item, UseAs}; use crate::{Error, Invalid, ScopeRef}; pub fn handle_parsed( items: Parsed, dest: &mut dyn CssDestination, scope: ScopeRef, file_context: &mut Context, ) -> Result<(), Error> { match items { Parsed::Scss(items) => handle_body(&items, dest, scope, file_context), Parsed::Css(items) => push_items(dest, items).no_pos(), } } fn handle_body( items: &[Item], dest: &mut dyn CssDestination, scope: ScopeRef, file_context: &mut Context, ) -> Result<(), Error> { for b in items { handle_item(b, dest, scope.clone(), file_context)?; } Ok(()) } fn handle_item( item: &Item, dest: &mut dyn CssDestination, scope: ScopeRef, file_context: &mut Context, ) -> Result<(), Error> { match item { Item::Use(ref name, ref as_n, ref with, ref pos) => { let name = name.evaluate(scope.clone())?.take_value(); let module = if let Some(module) = get_global_module(&name) { if !with.is_empty() { return Err(Invalid::ConfigBuiltin).at(pos); } module } else if let Some(sourcefile) = file_context.find_file(&name, SourceKind::Use(pos.clone()))? { let module = dest.head().load_module( sourcefile.path(), |dest| { let module = ScopeRef::new_global(scope.get_format()); for (name, value, default) in with { let default = if *default { scope.get_or_none(name) } else { None }; let value = default.ok_or(()).or_else(|()| { value.do_evaluate(scope.clone(), true) })?; if module.get_or_none(name).is_none() { module.define(name.clone(), value)?; } else { return Err(Error::S( "The same variable may only be configured once.".to_string(), )); } } handle_parsed( sourcefile.parse()?, dest, module.clone(), file_context, )?; Ok(module) })?; file_context.unlock_loading(&sourcefile); module } else { return Err(Error::BadCall( "Can't find stylesheet to import.".into(), pos.clone(), None, )); }; scope.do_use(module, &name, as_n, &Expose::All)?; } Item::Forward(ref name, ref as_n, ref expose, ref with, ref pos) => { let name = name.evaluate(scope.clone())?.take_value(); let module = if let Some(module) = get_global_module(&name) { if !with.is_empty() { return Err(Invalid::ConfigBuiltin).at(pos); } module } else if let Some(sourcefile) = file_context .find_file(&name, SourceKind::Forward(pos.clone()))? { let module = dest.head().load_module( sourcefile.path(), |dest| { let module = ScopeRef::new_global(scope.get_format()); for (name, value, default) in with { let default = if *default { scope.get_or_none(name) } else { None }; let value = default.ok_or(()).or_else(|()| { value.do_evaluate(scope.clone(), true) })?; if module.get_or_none(name).is_none() { module.define(name.clone(), value)?; } else { return Err(Error::S( "The same variable may only be configured once.".to_string(), )); } } handle_parsed( sourcefile.parse()?, dest, module.clone(), file_context, )?; Ok(module) }); file_context.unlock_loading(&sourcefile); module? } else { return Err(Error::S(format!("Module {name} not found"))); }; scope.forward().do_use(module, &name, as_n, expose)?; } Item::Import(ref names, ref args, ref pos) => { 'name: for name in names { let name = name.evaluate(scope.clone())?; if args.is_null() { let x = name.value(); if let Some(sourcefile) = file_context .find_file(x, SourceKind::Import(pos.clone()))? { match sourcefile.parse()? { Parsed::Scss(items) => { let mut thead = CssData::new(); let module = ScopeRef::sub(scope.clone()); let selectors = scope.get_selectors(); if !selectors.is_root() { let mut rule = thead .start_rule(selectors.real()) .at(pos)?; handle_body( &items, &mut rule, module.clone(), file_context, )?; } else { handle_body( &items, &mut thead, module.clone(), file_context, )?; } push_items(dest, thead.into_iter()) .at(pos)?; scope.do_use( module, "", &UseAs::Star, &Expose::All, )?; } Parsed::Css(items) => { push_items(dest, items).at(pos)?; } } file_context.unlock_loading(&sourcefile); continue 'name; } if !(x.starts_with("http://") || x.starts_with("https://") || x.starts_with("//") || x.ends_with(".css") || name.is_css_url()) { return Err(Error::BadCall( "Can't find stylesheet to import.".into(), pos.clone(), None, )); } } let args = args.evaluate(scope.clone())?; dest.push_import(Import::new(Value::Literal(name), args)); } } Item::AtRoot(ref selectors, ref body) => { let selectors = selectors.eval(scope.clone())?; let ctx = scope.get_selectors().at_root(selectors); let selectors = ctx.real(); let subscope = ScopeRef::sub_selectors(scope, ctx); if !selectors.is_root() { let mut rule = dest.start_rule(selectors).no_pos()?; handle_body(body, &mut rule, subscope, file_context)?; } else { handle_body(body, dest, subscope, file_context)?; } } Item::AtMedia { args, body, pos: _ } => { let args = args.evaluate(scope.clone())?; let mut atmedia = dest.start_atmedia(args.try_into()?); if let Some(ref body) = *body { let local = ScopeRef::sub(scope); handle_body(body, &mut atmedia, local, file_context)?; } } Item::AtRule { name, args, body, pos, } => { let name = name.evaluate(scope.clone())?.take_value(); let args = args.evaluate(scope.clone())?; if let Some(ref body) = *body { let mut atrule = dest.start_atrule(name.clone(), args); let local = if name == "keyframes" { ScopeRef::sub_selectors(scope, SelectorCtx::root()) } else { ScopeRef::sub(scope) }; handle_body(body, &mut atrule, local, file_context)?; } else { dest.push_item(AtRule::new(name, args, None).into()) .at(pos)?; } } Item::VariableDeclaration(ref var) => { var.evaluate(&scope)?; } Item::FunctionDeclaration(ref name, ref body) => { if name == "calc" || name == "element" || name == "expression" || name == "url" { // Ok, this is cheating for the test suite ... let p = body.decl.clone().opt_back("@function "); return Err(Invalid::FunctionName.at(p)); } check_body(&body.body, BodyContext::Function)?; scope.define_function(name.into(), body.closure(&scope).into()); } Item::Return(_, ref pos) => { return Err(Invalid::AtRule.at(pos.clone())); } Item::MixinDeclaration(ref name, ref body) => { check_body(&body.body, BodyContext::Mixin)?; scope.define_mixin(name.into(), body.closure(&scope).into()); } Item::MixinCall(ref name, ref args, ref body, ref pos) => { if let Some(mixin) = scope.get_mixin(&name.into()) { let mixin = mixin .get(scope.clone(), args, pos, file_context) .map_err(|e| e.called_from(pos, name))?; mixin.define_content(&scope, body); handle_parsed(mixin.body, dest, mixin.scope, file_context) .map_err(|e: Error| match e { Error::Invalid(err, _) => err.at(pos.clone()), Error::BadCall(msg, pos, p2) => { Error::BadCall(msg, pos.in_call(name), p2) } e => { let pos = pos.in_call(name); Error::BadCall(e.to_string(), pos, None) } })?; } else { return Err(Error::BadCall( "Undefined mixin.".into(), pos.clone(), None, )); } } Item::Content(args, pos) => { if let Some(content) = scope.get_content() { let mixin = content .get(scope, args, pos, file_context) .map_err(|e| e.called_from(pos, "@content"))?; handle_parsed(mixin.body, dest, mixin.scope, file_context)?; } } Item::IfStatement(ref cond, ref do_if, ref do_else) => { let cond = cond.evaluate(scope.clone())?.is_true(); let items = if cond { do_if } else { do_else }; check_body(items, BodyContext::Control)?; handle_body(items, dest, scope, file_context)?; } Item::Each(ref names, ref values, ref body) => { check_body(body, BodyContext::Control)?; let pushed = scope.store_local_values(names); for value in values.evaluate(scope.clone())?.iter_items() { scope.define_multi(names, value)?; handle_body(body, dest, scope.clone(), file_context)?; } scope.restore_local_values(pushed); } Item::For(ref name, ref range, ref body) => { let range = range.evaluate(scope.clone())?; check_body(body, BodyContext::Control)?; for value in range { let scope = ScopeRef::sub(scope.clone()); scope.define(name.clone(), value)?; handle_body(body, dest, scope, file_context)?; } } Item::While(ref cond, ref body) => { check_body(body, BodyContext::Control)?; let scope = ScopeRef::sub(scope); while cond.evaluate(scope.clone())?.is_true() { handle_body(body, dest, scope.clone(), file_context)?; } } Item::Debug(ref value) => { eprintln!("DEBUG: {}", value.evaluate(scope)?.introspect()); } Item::Warn(ref value) => { eprintln!("WARNING: {}", value.evaluate(scope)?.introspect()); } Item::Error(ref value, ref pos) => { let msg = value.evaluate(scope)?.introspect(); return Err(Invalid::AtError(msg).at(pos.clone())); } Item::Extend(_selectors) => { return Err(Error::S("@extend is not supported yet".to_string())); } Item::Rule(ref selectors, ref body) => { check_body(body, BodyContext::Rule)?; let selectors = selectors.eval(scope.clone())?; let selectors = scope.get_selectors().nest(selectors); let mut dest = dest.start_rule(selectors.clone()).no_pos()?; let scope = ScopeRef::sub_selectors(scope, selectors.into()); handle_body(body, &mut dest, scope, file_context)?; } Item::Property(ref name, ref value, ref pos) => { let v = value.evaluate(scope.clone())?; if !v.is_null() { let name = name.evaluate(scope)?.take_value(); // Note: inner pos here is correctly the value pos, // but the outher should probably be the entire property. dest.push_property(name, v.valid_css().at(pos)?).at(pos)?; } } Item::CustomProperty(ref name, ref value) => { let v = value.evaluate(scope.clone())?; if !v.is_null() { let name = name.evaluate(scope)?.take_value(); dest.push_custom_property(name, v).no_pos()?; } } Item::NamespaceRule(ref name, ref value, ref body) => { check_body(body, BodyContext::NsRule)?; let value = value.evaluate(scope.clone())?; let name = name.evaluate(scope.clone())?.take_value(); if !value.is_null() { dest.push_property(name.clone(), value).no_pos()?; } let mut dest = dest.start_nsrule(name).no_pos()?; handle_body(body, &mut dest, scope, file_context)?; } Item::Comment(ref c) => { if !scope.get_format().is_compressed() { dest.push_comment(c.evaluate(scope)?.take_value().into()); } } Item::None => (), } Ok(()) } #[derive(Clone, Copy, PartialEq, Eq)] enum BodyContext { Mixin, Function, Control, Rule, NsRule, } fn check_body(body: &[Item], context: BodyContext) -> Result<(), Error> { for item in body { match item { Item::Forward(_, _, _, _, pos) => { return Err(Invalid::AtRule.at(pos.clone())); } Item::Use(_, _, _, pos) => { return Err(Invalid::AtRule.at(pos.clone())); } Item::MixinDeclaration(.., ref decl) => { let pos = decl.decl.clone().opt_back("@mixin "); match context { BodyContext::Mixin => { return Err(Invalid::MixinInMixin.at(pos)); } BodyContext::Control => { return Err(Invalid::MixinInControl.at(pos)); } BodyContext::Rule => (), // This is ok _ => { return Err(Invalid::AtRule.at(pos.opt_trail_ws())); } } } Item::FunctionDeclaration(_, ref body) => { let pos = body.decl.clone().opt_back("@function "); match context { BodyContext::Mixin => { return Err(Invalid::FunctionInMixin.at(pos)); } BodyContext::Control => { return Err(Invalid::FunctionInControl.at(pos)); } BodyContext::Rule => (), // This is ok _ => { return Err(Invalid::AtRule.at(pos.opt_trail_ws())); } } } Item::Return(_, ref pos) if context != BodyContext::Function => { return Err(Invalid::AtRule.at(pos.clone())); } Item::AtRule { name, args: _, body: _, pos, } if context != BodyContext::Rule => { if !name .single_raw() .map_or(false, |name| CSS_AT_RULES.contains(&name)) { return Err(Invalid::AtRule.at(pos.clone())); } } _ => (), } } Ok(()) } const CSS_AT_RULES: [&str; 16] = [ "charset", "color-profile", "counter-style", "document", "font-face", "font-feature-values", "import", "keyframes", "layer", "media", "namespace", "page", "property", "scroll-timeline", "supports", "viewport", ]; fn push_items( dest: &mut dyn CssDestination, items: impl IntoIterator, ) -> Result<(), Invalid> { for item in items { dest.push_item(item)?; } Ok(()) } rsass-0.29.0/rsass/src/parser/000077500000000000000000000000001474765622100161715ustar00rootroot00000000000000rsass-0.29.0/rsass/src/parser/css/000077500000000000000000000000001474765622100167615ustar00rootroot00000000000000rsass-0.29.0/rsass/src/parser/css/media.rs000066400000000000000000000107341474765622100204130ustar00rootroot00000000000000use super::super::util::ignore_comments; use super::{opt_spacelike, spacelike, strings, values, PResult, Span}; use crate::css::{MediaArgs, Value}; use crate::value::{ListSeparator, Operator}; use nom::branch::alt; use nom::bytes::complete::{tag, tag_no_case}; use nom::combinator::{map, value}; use nom::multi::{fold_many0, fold_many1, separated_list1}; use nom::sequence::{delimited, pair, preceded, terminated}; use nom::Parser as _; use std::str::from_utf8; pub fn args(input: Span) -> PResult { map( separated_list1( delimited(opt_spacelike, tag(","), spacelike), media_args_and, ), |v| { if v.len() == 1 { v.into_iter().next().unwrap() } else { MediaArgs::Comma(v) } }, ) .parse(input) } fn media_args_and(input: Span) -> PResult { map( separated_list1( delimited(opt_spacelike, tag_no_case("and"), ignore_comments), media_args_or, ), |v| { if v.len() == 1 { v.into_iter().next().unwrap() } else { MediaArgs::And(v) } }, ) .parse(input) } fn media_args_or(input: Span) -> PResult { map( separated_list1( delimited(opt_spacelike, tag_no_case("or"), ignore_comments), media_args_one, ), |v| { if v.len() == 1 { v.into_iter().next().unwrap() } else { MediaArgs::Or(v) } }, ) .parse(input) } fn media_args_one(input: Span) -> PResult { alt(( map( pair( terminated( alt((tag_no_case("not"), tag_no_case("only"))), ignore_comments, ), media_args_one, ), |(op, a)| { MediaArgs::UnaryOp( from_utf8(&op).unwrap().into(), Box::new(a), ) }, ), map(strings::css_string, MediaArgs::Name), delimited( tag("("), alt(( map( pair( terminated(strings::css_string, tag(": ")), values::any, ), |(k, v)| MediaArgs::Condition(k, v), ), map(media_relation, MediaArgs::Range), map(args, |v| MediaArgs::Paren(Box::new(v))), )), preceded(opt_spacelike, tag(")")), ), delimited( tag("["), map(media_args_one, |v| MediaArgs::Bracket(Box::new(v))), tag("]"), ), )) .parse(input) } fn media_relation(input: Span) -> PResult> { let (rest, first) = media_value(input)?; fold_many1( pair( delimited(opt_spacelike, relational_operator, opt_spacelike), media_value, ), move || vec![(Operator::Equal, first.clone())], |mut acc, item| { acc.push(item); acc }, ) .parse(rest) } pub fn relational_operator(input: Span) -> PResult { alt(( value(Operator::Equal, tag("==")), value(Operator::EqualSingle, tag("=")), value(Operator::NotEqual, tag("!=")), value(Operator::GreaterE, tag(">=")), value(Operator::Greater, tag(">")), value(Operator::LesserE, tag("<=")), value(Operator::Lesser, tag("<")), )) .parse(input) } /// Any css value that is allowd in a media relation / range. fn media_value(input: Span) -> PResult { alt(( media_slash_list_no_space, delimited( terminated(tag("("), opt_spacelike), media_value, preceded(opt_spacelike, tag(")")), ), )) .parse(input) } pub fn media_slash_list_no_space(input: Span) -> PResult { let (input, first) = values::single(input)?; let (input, list) = fold_many0( preceded(tag("/"), values::single), move || vec![first.clone()], |mut list: Vec, item| { list.push(item); list }, ) .parse(input)?; Ok(( input, if list.len() == 1 { list.into_iter().next().unwrap() } else { Value::List(list, Some(ListSeparator::SlashNoSpace), false) }, )) } rsass-0.29.0/rsass/src/parser/css/mod.rs000066400000000000000000000133731474765622100201150ustar00rootroot00000000000000pub(crate) mod media; mod rule; pub(crate) mod strings; mod values; use super::{PResult, Span}; use crate::css::{AtRule, Comment, Import, Item, MediaRule, Value}; use nom::branch::alt; use nom::bytes::complete::{is_not, tag, tag_no_case}; use nom::character::complete::{multispace0, multispace1}; use nom::combinator::{ all_consuming, into, map, map_res, not, opt, peek, recognize, }; use nom::multi::{fold_many0, many0, many_till}; use nom::sequence::{delimited, preceded, terminated}; use nom::Parser as _; use nom_language::error::{VerboseError, VerboseErrorKind}; use std::str::from_utf8; pub fn file(input: Span) -> PResult> { preceded( alt(( tag("\u{feff}".as_bytes()), tag_no_case(&b"@charset \"UTF-8\";\n"[..]), tag_no_case(&b"@charset \"ASCII\";\n"[..]), tag(""), )), map( many_till( preceded(opt_spacelike, top_level_item), all_consuming(opt_spacelike), ), |(v, _eof)| v, ), ) .parse(input) } fn top_level_item(input: Span) -> PResult { let (rest, start) = alt((tag("@"), tag("/*"), tag("$"), tag(""))).parse(input)?; match start.fragment() { b"/*" => into(comment).parse(input), b"$" => { let (end, _) = preceded(tag("$"), strings::css_string).parse(input)?; let pos = input.up_to(&end); Err(nom_err("Sass variables aren't allowed in plain CSS.", pos)) } b"@" => { let (input, name) = strings::css_string(rest)?; match name.as_ref() { "import" => into(import2).parse(input), "media" => { let (input, args) = preceded(spacelike, media::args).parse(input)?; let (input, body) = preceded( opt_spacelike, delimited( terminated(tag("{"), opt_spacelike), many0(terminated( map_res(top_level_item, TryInto::try_into), opt_spacelike, )), tag("}"), ), ) .parse(input)?; Ok((input, MediaRule::new(args, body).into())) } _ => { let (input, args) = map_res(atrule_args, |s| { std::str::from_utf8(s.fragment()) }) .parse(input)?; let (input, body) = preceded( opt_spacelike, alt(( map(tag(";"), |_| None), map( delimited( terminated(tag("{"), opt_spacelike), many0(terminated( alt(( into(comment), into(preceded( tag("@import"), import2, )), into(rule::rule), into(rule::property), )), opt_spacelike, )), tag("}"), ), Some, ), )), ) .parse(input)?; Ok(( input, AtRule::new(name, args.trim().into(), body).into(), )) } } } _ => into(rule::rule).parse(input), } } fn import2(input: Span) -> PResult { map( delimited( opt_spacelike, values::string_or_call, // TODO: Media arguments! opt(terminated(opt_spacelike, tag(";"))), ), |uri| Import::new(uri, Value::Null), ) .parse(input) } // Arguments for unknwn at-rules. Should probably be more permitting. fn atrule_args(input: Span) -> PResult { recognize(opt(preceded( is_not("()/{}"), opt(terminated( delimited(tag("("), atrule_args, tag(")")), atrule_args, )), ))) .parse(input) } pub fn comment(input: Span) -> PResult { into(preceded(tag("/*"), comment2)).parse(input) } pub fn comment2(input: Span) -> PResult { terminated( fold_many0( alt(( map_res(is_not("*\r\n\u{c}"), |s: Span| { from_utf8(s.fragment()) }), map( alt((tag("\r\n"), tag("\n"), tag("\r"), tag("\u{c}"))), |_| "\n", ), map(terminated(tag("*"), peek(not(tag("/")))), |_| "*"), )), String::new, |mut acc, add| { acc.push_str(add); acc }, ), tag("*/"), ) .parse(input) } pub fn spacelike(input: Span) -> PResult<()> { map(multispace1, |_| ()).parse(input) } pub fn opt_spacelike(input: Span) -> PResult<()> { map(multispace0, |_| ()).parse(input) } fn nom_err<'a>( msg: &'static str, pos: Span<'a>, ) -> nom::Err>> { nom::Err::Error(VerboseError { errors: vec![(pos, VerboseErrorKind::Context(msg))], }) } rsass-0.29.0/rsass/src/parser/css/rule.rs000066400000000000000000000033451474765622100203030ustar00rootroot00000000000000use super::super::{PResult, Span}; use super::opt_spacelike; use super::strings::custom_value; use super::{comment, import2, strings, values}; use crate::css::parser::selector_set; use crate::css::{BodyItem, CustomProperty, Property, Rule}; use nom::branch::alt; use nom::bytes::complete::tag; use nom::character::complete::one_of; use nom::combinator::{into, map, opt}; use nom::multi::many_till; use nom::sequence::{delimited, pair, preceded, terminated}; use nom::Parser as _; pub fn rule(input: Span) -> PResult { map( pair( terminated(selector_set, terminated(tag("{"), opt_spacelike)), many_till(terminated(body_item, opt_spacelike), tag("}")), ), |(selectors, (body, _))| Rule { selectors, body }, ) .parse(input) } fn body_item(input: Span) -> PResult { alt(( into(comment), into(preceded(tag("@import"), import2)), property, )) .parse(input) } pub fn property(input: Span) -> PResult { let (rest, name) = terminated(property_name, tag(":")).parse(input)?; if name.starts_with("--") { let (rest, value) = terminated(custom_value, opt(tag(";"))).parse(rest)?; Ok((rest, CustomProperty::new(name, value).into())) } else { let (rest, value) = delimited(opt_spacelike, values::any, opt(tag(";"))) .parse(rest)?; Ok((rest, Property::new(name, value).into())) } } fn property_name(input: Span) -> PResult { map( pair(opt(one_of("*:.")), strings::css_string), |(pre, mut main)| { if let Some(pre) = pre { main.insert(0, pre); } main }, ) .parse(input) } rsass-0.29.0/rsass/src/parser/css/strings.rs000066400000000000000000000162451474765622100210300ustar00rootroot00000000000000use super::super::{input_to_str, input_to_string, PResult, Span}; use super::{nom_err, opt_spacelike}; use crate::css::CssString; use crate::value::Quotes; use nom::branch::alt; use nom::bytes::complete::{is_not, tag, take}; use nom::character::complete::{char, one_of}; use nom::combinator::{ into, map, map_opt, map_res, opt, recognize, value, verify, }; use nom::multi::{fold_many0, fold_many1, many0, many_m_n}; use nom::sequence::{delimited, preceded, terminated}; use nom::Parser as _; use std::str::from_utf8; pub fn css_string_any(input: Span) -> PResult { alt((css_string_dq, css_string_sq, into(css_string))).parse(input) } pub fn css_string(input: Span) -> PResult { let (input, first) = alt(( selector_plain_part, normalized_first_escaped_char, map(hash_no_interpolation, String::from), )) .parse(input)?; fold_many0( // Note: This could probably be a whole lot more efficient, // but try to get stuff correct before caring too much about that. alt(( selector_plain_part, normalized_escaped_char, map(hash_no_interpolation, String::from), )), move || first.clone(), |mut acc: String, item: String| { acc.push_str(&item); acc }, ) .parse(input) } pub fn css_string_nohash(input: Span) -> PResult { let (input, first) = alt((selector_plain_part, normalized_first_escaped_char)) .parse(input)?; fold_many0( // Note: This could probably be a whole lot more efficient, // but try to get stuff correct before caring too much about that. alt((selector_plain_part, normalized_escaped_char)), move || first.clone(), |mut acc: String, item: String| { acc.push_str(&item); acc }, ) .parse(input) } pub fn css_string_dq(input: Span) -> PResult { let (input, parts) = delimited( tag("\""), many0(alt(( map_res(is_not("\""), input_to_string), value("\"".to_string(), tag("\\\"")), normalized_escaped_char_q, ))), tag("\""), ) .parse(input)?; Ok((input, CssString::new(parts.join(""), Quotes::Double))) } pub fn css_string_sq(input: Span) -> PResult { let (input, parts) = delimited( tag("'"), many0(alt(( map_res(is_not("'"), input_to_string), value(String::from("'"), tag("\\'")), normalized_escaped_char_q, ))), tag("'"), ) .parse(input)?; Ok((input, CssString::new(parts.join(""), Quotes::Single))) } fn normalized_first_escaped_char(input: Span) -> PResult { let (rest, c) = escaped_char(input)?; let result = if c.is_alphabetic() || u32::from(c) >= 0xa1 { format!("{c}") } else if !c.is_control() && !c.is_numeric() && c != '\n' && c != '\t' { format!("\\{c}") } else { format!("\\{:x} ", u32::from(c)) }; Ok((rest, result)) } fn normalized_escaped_char(input: Span) -> PResult { let (rest, c) = escaped_char(input)?; let result = if c.is_alphanumeric() || c == '-' || u32::from(c) >= 0xa1 { format!("{c}") } else if !c.is_control() && c != '\n' && c != '\t' { format!("\\{c}") } else { format!("\\{:x} ", u32::from(c)) }; Ok((rest, result)) } fn normalized_escaped_char_q(input: Span) -> PResult { let (rest, c) = escaped_char(input)?; let result = if c == '\0' { char::REPLACEMENT_CHARACTER.to_string() } else if c.is_control() && c != '\t' { format!("\\{:x} ", u32::from(c)) } else if c == '-' || c == '\\' || c == ' ' { format!("\\{c}") } else { c.to_string() }; Ok((rest, result)) } fn selector_plain_part(input: Span) -> PResult { fold_many1( verify(take_char, |ch| { ch.is_alphanumeric() || *ch == '-' || *ch == '_' }), String::new, |mut acc, chr: char| { acc.push(chr); acc }, ) .parse(input) } fn hash_no_interpolation(input: Span) -> PResult<&str> { let (next, hash) = tag("#")(input)?; if let Ok((end, _)) = interpolation_block(next) { Err(nom_err( "Interpolation isn't allowed in plain CSS.", input.up_to(&end), )) } else { Ok((next, input_to_str(hash).unwrap())) } } fn interpolation_block(input: Span) -> PResult { terminated(char('{'), opt(terminated(is_not("{}"), char('}')))) .parse(input) } fn escaped_char(input: Span) -> PResult { preceded( tag("\\"), alt((map_opt(hex_number, std::char::from_u32), take_char)), ) .parse(input) } fn hex_number(input: Span) -> PResult { map_res( map_res( terminated( recognize(many_m_n(1, 6, one_of("0123456789ABCDEFabcdef"))), opt(tag(" ")), ), input_to_str, ), |s| u32::from_str_radix(s, 16), ) .parse(input) } fn take_char(input: Span) -> PResult { alt(( map_opt(take(1usize), single_char), map_opt(take(2usize), single_char), map_opt(take(3usize), single_char), map_opt(take(4usize), single_char), map_opt(take(5usize), single_char), )) .parse(input) } fn single_char(data: Span) -> Option { from_utf8(data.fragment()) .ok() .and_then(|s| s.chars().next()) } pub fn custom_value(input: Span) -> PResult { alt(( preceded(opt_spacelike, css_string_dq), preceded(opt_spacelike, css_string_sq), map(custom_value_inner, |mut raw| { if raw.ends_with('\n') { raw.pop(); raw.push(' '); } CssString::new(raw, Quotes::None) }), )) .parse(input) } pub fn custom_value_inner(input: Span) -> PResult { fold_many1( alt(( |input| custom_value_paren("[", "]", input), |input| custom_value_paren("{", "}", input), |input| custom_value_paren("(", ")", input), map_opt(is_not("\"\\;{}()[]"), |s: Span| { if s.is_empty() { None } else { Some(String::from(input_to_str(s).ok()?)) } }), )), String::new, |mut acc, items: String| { acc.push_str(&items); acc }, ) .parse(input) } fn custom_value_paren<'a>( start: &'static str, end: &'static str, input: Span<'a>, ) -> PResult<'a, String> { map( delimited( tag(start), fold_many0( alt(( map(tag(";"), |_| String::from(";")), custom_value_inner, )), || String::from(start), |mut acc, items: String| { acc.push_str(&items); acc }, ), tag(end), ), |mut parts| { parts.push_str(end); parts }, ) .parse(input) } rsass-0.29.0/rsass/src/parser/css/values.rs000066400000000000000000000177411474765622100206400ustar00rootroot00000000000000use super::{nom_err, strings}; use super::{opt_spacelike, PResult, Span}; use crate::css::{BinOp, CallArgs, Value}; use crate::parser::input_to_str; use crate::parser::value::{numeric, unicode_range_inner}; use crate::value::{ListSeparator, Operator}; use nom::branch::alt; use nom::bytes::complete::{is_not, tag}; use nom::character::complete::{char, none_of, one_of}; use nom::combinator::{ cond, into, map, map_opt, not, opt, peek, recognize, value, }; use nom::error::context; use nom::multi::{fold_many0, many0, separated_list0, separated_list1}; use nom::sequence::{delimited, pair, preceded, terminated}; use nom::Parser; use nom_language::error::VerboseError; pub fn any(input: Span) -> PResult { let (input, list) = separated_list1(spaced(","), slash_list).parse(input)?; Ok((input, list_or_single(list, ListSeparator::Comma))) } pub fn slash_list(input: Span) -> PResult { let (input, list) = separated_list1(spaced("/"), slash_list_no_space).parse(input)?; Ok((input, list_or_single(list, ListSeparator::Slash))) } pub fn slash_list_no_space(input: Span) -> PResult { let (mut input, first) = space_list(input)?; let mut list = vec![first]; while let PResult::Ok((rest, _)) = terminated(tag("/"), peek(not(tag("*")))).parse(input) { let (rest, value) = alt((map(space_list, Some), value(None, opt_spacelike))) .parse(rest)?; list.push(value.unwrap_or(Value::Literal("".into()))); input = rest; } Ok((input, list_or_single(list, ListSeparator::SlashNoSpace))) } pub fn space_list(input: Span) -> PResult { let (input, first) = single(input)?; let (input, list) = fold_many0( preceded(opt_spacelike, single), move || vec![first.clone()], |mut list: Vec, item| { list.push(item); list }, ) .parse(input)?; Ok((input, list_or_single(list, ListSeparator::Space))) } fn list_or_single(list: Vec, sep: ListSeparator) -> Value { if list.len() == 1 { list.into_iter().next().unwrap() } else { Value::List(list, Some(sep), false) } } pub fn single(input: Span) -> PResult { match input.first() { Some(b'[') => map( delimited( terminated(tag("["), opt_spacelike), any, preceded(opt_spacelike, tag("]")), ), |v| match v { Value::List(v, sep, false) => Value::List(v, sep, true), v => Value::List(vec![v], None, true), }, ) .parse(input), Some(c) if c.is_ascii_digit() => into(numeric).parse(input), Some(c) if *c == b'-' || *c == b'.' => { alt((into(numeric), string_or_call)).parse(input) } Some(b'(') => { let (end, _) = delimited(tag("("), none_of(")"), opt(tag(")"))) .parse(input)?; let pos = input.up_to(&end); Err(nom_err("Parentheses aren't allowed in plain CSS.", pos)) } Some(b'$') => { let (end, _) = preceded(tag("$"), strings::css_string).parse(input)?; let pos = input.up_to(&end); Err(nom_err("Sass variables aren't allowed in plain CSS.", pos)) } _ => alt(( map(unicode_range_inner, Value::UnicodeRange), string_or_call, )) .parse(input), } } pub fn string_or_call(input: Span) -> PResult { let (rest, string) = strings::css_string_any(input)?; if string.quotes().is_none() { if let Ok((rest, _)) = terminated(tag("("), opt_spacelike).parse(rest) { fn endp(input: Span) -> PResult<()> { terminated(opt_spacelike, char(')')).parse(input) } let (rest, args) = if string.value() == "calc" { if let Ok((end, _)) = endp(rest) { return Err(nom_err( "Missing argument.", input.up_to(&end), )); } map(terminated(calc_expr, endp), CallArgs::from_single) .parse(rest)? } else { terminated(call_args, endp).parse(rest)? }; return Ok((rest, Value::Call(string.take_value(), args))); } else if let Ok((end, _)) = preceded(char('.'), string_or_call).parse(rest) { return Err(nom_err( "Module namespaces aren't allowed in plain CSS.", input.up_to(&end), )); } } Ok((rest, string.into())) } fn calc_expr(input: Span) -> PResult { let (rest, first) = single_factor(input)?; fold_many0( ( delimited( opt_spacelike, alt(( value(Operator::Div, tag("/")), value(Operator::Modulo, tag("%")), value(Operator::Multiply, tag("*")), )), opt_spacelike, ), single_factor, ), move || first.clone(), |v, (op, v2)| BinOp::new(v, true, op, true, v2).into(), ) .parse(rest) } pub fn single_factor(input: Span) -> PResult { let (rest, first) = single_term(input)?; fold_many0( ( delimited( opt_spacelike, alt(( value(Operator::Plus, tag("+")), value(Operator::Minus, tag("-")), )), opt_spacelike, ), single_term, ), move || first.clone(), |v, (op, v2)| BinOp::new(v, true, op, true, v2).into(), ) .parse(rest) } fn single_term(input: Span) -> PResult { match input.first() { Some(b'(') => delimited( terminated(tag("("), opt_spacelike), calc_expr, preceded(opt_spacelike, tag(")")), ) .parse(input), Some(b'$') => { let (end, _) = preceded(tag("$"), strings::css_string).parse(input)?; let pos = input.up_to(&end); Err(nom_err("Sass variables aren't allowed in plain CSS.", pos)) } Some(c) if b'0' <= *c && *c <= b'9' => into(numeric).parse(input), _ => string_or_call(input), } } fn call_args(input: Span) -> PResult { let (rest, named) = many0(pair( terminated(strings::css_string, spaced("=")), terminated(single, alt((spaced(","), peek(tag(")"))))), )) .parse(input)?; let named = named .into_iter() .map(|(name, val)| (name.into(), val)) .collect(); let (rest, positional) = separated_list0(spaced(","), single_arg).parse(rest)?; let (rest, trailing_comma) = map(opt(spaced(",")), |c| c.is_some()).parse(rest)?; let (rest, _) = cond( trailing_comma, alt(( peek(tag(")")), context("Expected expression.", recognize(single_arg)), )), ) .parse(rest)?; Ok(( rest, CallArgs { positional, named, trailing_comma, }, )) } fn single_arg(input: Span) -> PResult { fn end(input: Span) -> PResult<()> { peek(preceded(opt_spacelike, map(one_of(",)."), |_| ()))).parse(input) } terminated(space_list, end).parse(input).or_else(|err| { terminated(into(ext_arg_as_string), end) .parse(input) .map_err(|_| err) }) } fn ext_arg_as_string(input: Span) -> PResult { map_opt(is_not("\"\\;{}()[] ,"), |s: Span| { if s.first().map_or(true, |ch| ch.is_ascii_digit()) { None } else { Some(input_to_str(s).ok()?.to_owned()) } }) .parse(input) } fn spaced<'a>( the_tag: &'static str, ) -> impl Parser, Output = Span<'a>, Error = VerboseError>> { delimited(opt_spacelike, tag(the_tag), opt_spacelike) } rsass-0.29.0/rsass/src/parser/css_function.rs000066400000000000000000000073731474765622100212460ustar00rootroot00000000000000//! The `calc` function is special. A css function that is partially evaluated in sass. //! This should apply to `min`, `max` and `clamp` as well. //! //! Note that function calls in actual css is different, and implementented //! in [`crate::parser::css`]. use super::util::{opt_spacelike, spacelike2}; use super::value::{numeric, special_function, variable}; use super::{ call_args, ignore_comments, position, sass_string, PResult, Span, }; use crate::sass::{BinOp, CallArgs, Value}; use crate::value::Operator; use nom::branch::alt; use nom::bytes::complete::{tag, tag_no_case}; use nom::character::complete::multispace0; use nom::combinator::{into, map, not, peek, value}; use nom::sequence::{delimited, pair, preceded, terminated}; use nom::Parser as _; pub fn css_function(input: Span) -> PResult { let (rest, arg) = delimited( terminated(tag_no_case("calc("), ignore_comments), one_arg, preceded(ignore_comments, tag(")")), ) .parse(input)?; let pos = input.up_to(&rest).to_owned(); Ok(( rest, Value::Call("calc".into(), CallArgs::new_single(arg), pos), )) } fn one_arg(input: Span) -> PResult { alt(( map(delimited(tag("("), one_arg, tag(")")), |v| { Value::Paren(v.into(), true) }), sum_expression, map(sass_string, Value::Literal), )) .parse(input) } fn sum_expression(input: Span) -> PResult { let (mut rest, mut v) = term(input)?; while let Ok((nrest, (s1, op, s2, v2, end))) = alt(( ( value(false, tag("")), alt(( value(Operator::Plus, tag("+")), value(Operator::Minus, tag("-")), )), ignore_comments, term, position, ), ( value(true, spacelike2), alt(( value(Operator::Plus, tag("+")), value(Operator::Minus, terminated(tag("-"), spacelike2)), )), ignore_comments, term, position, ), )) .parse(rest) { let pos = input.up_to(&end).to_owned(); v = BinOp::new(v, s1, op, s2, v2, pos).into(); rest = nrest; } Ok((rest, v)) } fn term(input: Span) -> PResult { let (mut rest, mut v) = single_value(input)?; while let Ok((nrest, (s1, op, s2, v2, end))) = ( map(multispace0, |s: Span| !s.fragment().is_empty()), alt(( value(Operator::Multiply, tag("*")), value(Operator::Div, terminated(tag("/"), peek(not(tag("/"))))), value(Operator::Modulo, tag("%")), )), map(multispace0, |s: Span| !s.fragment().is_empty()), single_value, position, ) .parse(rest) { let pos = input.up_to(&end).to_owned(); rest = nrest; v = BinOp::new(v, s1, op, s2, v2, pos).into(); } Ok((rest, v)) } fn single_value(input: Span) -> PResult { alt(( paren, value(Value::True, tag("true")), value(Value::False, tag("false")), value(Value::HereSelector, tag("&")), into(numeric), variable, value(Value::Null, tag("null")), special_function, function_call, )) .parse(input) } fn paren(input: Span) -> PResult { map( delimited( terminated(tag("("), opt_spacelike), sum_expression, preceded(opt_spacelike, tag(")")), ), |inner| Value::Paren(Box::new(inner), false), ) .parse(input) } fn function_call(input: Span) -> PResult { let (rest, (name, args)) = pair(sass_string, call_args).parse(input)?; let pos = input.up_to(&rest).to_owned(); Ok((rest, Value::Call(name, args, pos))) } rsass-0.29.0/rsass/src/parser/error.rs000066400000000000000000000052561474765622100177000ustar00rootroot00000000000000use super::{PResult, Span}; use crate::input::SourcePos; use nom::{character::complete::one_of, Finish}; use nom_language::error::{VerboseError, VerboseErrorKind}; use std::fmt; /// An error encountered when parsing sass. /// /// This contains an error message (currently just a String, and often /// not very descriptive) and informaion on where in the parsed data /// the error occured. #[derive(Debug, PartialEq, Eq)] pub struct ParseError { msg: String, pos: SourcePos, } impl std::error::Error for ParseError {} impl ParseError { /// Check a nom result for errors. /// /// This differs from a `From` implementation in that an /// `Ok` result with remaining unparsed data is also considered an /// error. pub fn check(res: PResult) -> Result { let (rest, value) = res.finish()?; if rest.fragment().is_empty() { Ok(value) } else { Err(Self::new("Expected end of file.", rest.to_owned())) } } pub(crate) fn new(msg: Msg, pos: SourcePos) -> Self where Msg: Into, { Self { msg: msg.into(), pos, } } } impl From>> for ParseError { fn from(value: VerboseError>) -> Self { let (msg, pos) = value .errors .iter() .filter_map(|(pos, kind)| { match kind { VerboseErrorKind::Context(ctx) => { Some((ctx.to_string(), pos)) } VerboseErrorKind::Char(ch) if *ch == '\'' => { Some((format!("Expected {ch}."), pos)) } VerboseErrorKind::Char(ch) => { Some((format!("expected {:?}.", ch.to_string()), pos)) } VerboseErrorKind::Nom(_) => None, // Try the next one! } }) .next() .or_else(|| { value.errors.first().map(|(pos, _)| { if pos.is_at_end() { ("expected more input.".to_string(), pos) } else if let PResult::Ok((_, b)) = one_of(")}]")(*pos) { (format!("unmatched \"{b}\"."), pos) } else { ("Parse error.".to_string(), pos) } }) }) .unwrap(); Self::new(msg, pos.sanitize_end().to_owned()) } } impl fmt::Display for ParseError { fn fmt(&self, out: &mut fmt::Formatter) -> fmt::Result { writeln!(out, "{}", self.msg)?; self.pos.show(out) } } rsass-0.29.0/rsass/src/parser/formalargs.rs000066400000000000000000000053401474765622100206760ustar00rootroot00000000000000use super::strings::name; use super::util::{ignore_comments, opt_spacelike}; use super::value::space_list; use super::{PResult, Span}; use crate::sass::{CallArgs, FormalArgs, Name}; use nom::bytes::complete::tag; use nom::character::complete::char; use nom::combinator::{cut, map, map_res, opt}; use nom::error::context; use nom::multi::separated_list0; use nom::sequence::{delimited, pair, preceded, terminated}; use nom::Parser as _; pub fn formal_args(input: Span) -> PResult { let (input, _) = terminated(char('('), opt_spacelike).parse(input)?; let (input, v) = separated_list0( preceded(tag(","), opt_spacelike), map( pair( delimited(tag("$"), name, opt_spacelike), opt(delimited( terminated(tag(":"), opt_spacelike), cut(context("Expected expression.", space_list)), opt_spacelike, )), ), |(name, d)| (name.into(), d), ), ) .parse(input)?; let (input, va) = if !v.is_empty() { terminated( opt(tag("...")), preceded(opt_spacelike, terminated(opt(tag(",")), opt_spacelike)), ) .parse(input)? } else { (input, None) }; let (input, _) = char(')')(input)?; Ok(( input, if va.is_none() { FormalArgs::new(v) } else { FormalArgs::new_va(v) }, )) } pub fn call_args(input: Span) -> PResult { delimited( terminated(char('('), opt_spacelike), map_res( |input| { let (input, args) = separated_list0( terminated(tag(","), opt_spacelike), pair( opt(map( delimited( tag("$"), name, delimited( ignore_comments, char(':'), opt_spacelike, ), ), Name::from, )), terminated(space_list, opt_spacelike), ), ) .parse(input)?; let (input, trail) = if !args.is_empty() { opt(terminated(char(','), opt_spacelike)).parse(input)? } else { (input, None) }; Ok((input, (args, trail))) }, |(args, trail)| CallArgs::new(args, trail.is_some()), ), cut(char(')')), ) .parse(input) } rsass-0.29.0/rsass/src/parser/imports.rs000066400000000000000000000134051474765622100202370ustar00rootroot00000000000000//! Support for `@import`, `@use`, and `@forward`. use super::strings::{ name, sass_string, sass_string_dq, sass_string_sq, special_url, }; use super::util::{ignore_comments, opt_spacelike, semi_or_end}; use super::value::{identifier, space_list}; use super::{media, position, PResult, Span}; use crate::sass::{Expose, Item, Name, SassString, UseAs, Value}; use nom::branch::alt; use nom::bytes::complete::tag; use nom::character::complete::char; use nom::combinator::{cut, map, opt, value}; use nom::error::context; use nom::multi::{separated_list0, separated_list1}; use nom::sequence::{delimited, pair, preceded, terminated}; use nom::Parser as _; use std::collections::BTreeSet; /// What follows the `@import` tag. pub fn import2(input: Span) -> PResult { map( terminated( ( separated_list0( comma, alt(( sass_string_dq, sass_string_sq, special_url, sass_string, )), ), opt(media::args), position, ), semi_or_end, ), |(import, args, end)| { let pos = input.up_to(&end).to_owned(); Item::Import(import, args.unwrap_or(Value::Null), pos) }, ) .parse(input) } pub fn use2<'a>(start: Span, input: Span<'a>) -> PResult<'a, Item> { map( terminated( ( context( "Expected string.", terminated(quoted_sass_string, ignore_comments), ), opt(preceded( terminated(tag("with"), ignore_comments), with_arg, )), opt(preceded(terminated(tag("as"), ignore_comments), as_arg)), position, ), semi_or_end, ), |(s, w, n, end)| { Item::Use( s, n.unwrap_or(UseAs::KeepName), w.unwrap_or_default(), start.up_to(&end).to_owned(), ) }, ) .parse(input) } pub fn forward2<'a>(start: Span, input: Span<'a>) -> PResult<'a, Item> { let (mut end, path) = context( "Expected string.", terminated(quoted_sass_string, opt_spacelike), ) .parse(input)?; let mut found_as = None; let mut expose = Expose::All; let mut found_with = None; while let Ok((rest, arg)) = delimited(ignore_comments, name, ignore_comments).parse(end) { end = match arg.as_ref() { "as" if found_as.is_none() && found_with.is_none() => { let (i, a) = fwd_as_arg(rest)?; found_as = Some(a); i } "hide" if expose == Expose::All && found_with.is_none() => { let (i, (funs, vars)) = exposed_names(rest)?; expose = Expose::Hide(funs, vars); i } "show" if expose == Expose::All && found_with.is_none() => { let (i, (funs, vars)) = exposed_names(rest)?; expose = Expose::Show(funs, vars); i } "with" if found_with.is_none() => { let (i, w) = with_arg(rest)?; found_with = Some(w); i } _ => break, }; } let (rest, ()) = semi_or_end(end)?; Ok(( rest, Item::Forward( path, found_as.unwrap_or(UseAs::Star), expose, found_with.unwrap_or_default(), start.up_to(&end).to_owned(), ), )) } fn exposed_names(input: Span) -> PResult<(BTreeSet, BTreeSet)> { map( separated_list1( terminated(tag(","), opt_spacelike), pair( map(opt(tag("$")), |v| v.is_some()), cut(context( "Expected variable, mixin, or function name", map(terminated(name, opt_spacelike), Name::from), )), ), ), |items| { let mut funs = BTreeSet::new(); let mut vars = BTreeSet::new(); for (v, n) in items { if v { &mut vars } else { &mut funs }.insert(n); } (funs, vars) }, ) .parse(input) } fn as_arg(input: Span) -> PResult { terminated( alt(( map(pair(name, opt(tag("*"))), |(name, s)| match s { None => UseAs::Name(name), Some(_) => UseAs::Prefix(name), }), value(UseAs::Star, tag("*")), )), opt_spacelike, ) .parse(input) } fn fwd_as_arg(input: Span) -> PResult { map(terminated(identifier, char('*')), UseAs::Prefix).parse(input) } fn with_arg(input: Span) -> PResult> { delimited( terminated(char('('), ignore_comments), separated_list1( comma, ( delimited( char('$'), map(identifier, Name::from), delimited(ignore_comments, char(':'), ignore_comments), ), terminated(space_list, ignore_comments), map(opt(terminated(tag("!default"), opt_spacelike)), |o| { o.is_some() }), ), ), delimited(opt(comma), char(')'), opt_spacelike), ) .parse(input) } fn quoted_sass_string(input: Span) -> PResult { alt((sass_string_dq, sass_string_sq)).parse(input) } fn comma(input: Span) -> PResult<()> { delimited(ignore_comments, map(tag(","), |_| ()), ignore_comments) .parse(input) } rsass-0.29.0/rsass/src/parser/media.rs000066400000000000000000000071711474765622100176240ustar00rootroot00000000000000use super::css::media::relational_operator; use super::span::Span; use super::strings::{sass_string_dq, sass_string_sq}; use super::util::{ignore_comments, opt_spacelike, semi_or_end}; use super::value::{ self, any_additive_expr, any_product, bracket_list, dictionary, function_call_or_string_rulearg, variable, }; use super::{body_block, list_or_single, PResult}; use crate::sass::{BinOp, Item, Value}; use crate::value::ListSeparator; use nom::branch::alt; use nom::bytes::complete::tag; use nom::combinator::{into, map, opt, value}; use nom::multi::{many0, separated_list0}; use nom::sequence::{delimited, preceded, terminated}; use nom::Parser as _; #[cfg(test)] use super::check_parse; pub fn rule<'a>(start: Span, input: Span<'a>) -> PResult<'a, Item> { let pos = start.up_to(&input).to_owned(); let (input, args) = opt(terminated(args, opt_spacelike)).parse(input)?; let (input, body) = preceded( opt_spacelike, alt((map(body_block, Some), value(None, semi_or_end))), ) .parse(input)?; Ok(( input, Item::AtMedia { args: args.unwrap_or(Value::Null), body, pos, }, )) } pub fn args(input: Span) -> PResult { let (input, args) = separated_list0( preceded(tag(","), opt_spacelike), map( many0(preceded( opt(ignore_comments), alt(( dictionary, delimited( tag("("), map(media_relation, |v| { Value::Paren(Box::new(v), true) }), tag(")"), ), bracket_list, into(value::numeric), variable, map(function_call_or_string_rulearg, |s| match s { Value::Literal(s) => Value::Literal({ let lower = s .single_raw() .unwrap_or_default() .to_lowercase(); if lower == "not" || lower == "only" { lower.into() } else { s } }), call => call, }), map(sass_string_dq, Value::Literal), map(sass_string_sq, Value::Literal), )), )), |args| list_or_single(args, ListSeparator::Space), ), ) .parse(input)?; Ok((input, list_or_single(args, ListSeparator::Comma))) } fn media_relation(input: Span) -> PResult { let (rest, first) = media_additive_expr(input)?; if let Ok((rest, (op, b))) = ( delimited(opt_spacelike, relational_operator, opt_spacelike), media_relation, ) .parse(rest) { let pos = input.up_to(&rest).to_owned(); Ok(( rest, Value::BinOp(Box::new(BinOp::new(first, true, op, true, b, pos))), )) } else { Ok((rest, first)) } } fn media_additive_expr(input: Span) -> PResult { any_additive_expr(media_product, input) } fn media_product(input: Span) -> PResult { any_product(args, input) } #[test] fn test_media_args_1() { check_parse(args, b"#{$media} and ($key + \"-foo\": $value + 5)") .unwrap(); } #[test] fn test_media_args_2() { check_parse( args, b"print and (foo: 1 2 3), (bar: 3px hux(muz)), not screen", ) .unwrap(); } rsass-0.29.0/rsass/src/parser/mod.rs000066400000000000000000000416251474765622100173260ustar00rootroot00000000000000pub(crate) mod css; mod css_function; mod error; pub mod formalargs; mod imports; mod media; pub mod selectors; mod span; pub(crate) mod strings; mod unit; pub(crate) mod util; pub mod value; pub(crate) use self::strings::name; pub use error::ParseError; pub(crate) use span::DebugBytes; pub(crate) use span::{position, Span}; use self::formalargs::{call_args, formal_args}; use self::selectors::selectors; use self::strings::{ custom_value, sass_string, sass_string_dq, sass_string_sq, }; use self::util::{ comment2, ignore_comments, ignore_space, opt_spacelike, semi_or_end, spacelike, }; use self::value::{ dictionary, function_call_or_string_rulearg, single_value, value_expression, }; use crate::input::{SourceFile, SourceName, SourcePos}; use crate::sass::parser::{ src_range, variable_declaration2, variable_declaration_mod, }; use crate::sass::{ Callable, FormalArgs, Item, Name, Selectors, SrcValue, Value, }; use crate::value::ListSeparator; #[cfg(test)] use crate::value::{Numeric, Unit}; use crate::Error; use imports::{forward2, import2, use2}; use nom::branch::alt; use nom::bytes::complete::{is_a, is_not, tag}; use nom::character::complete::{char, one_of}; use nom::combinator::{ all_consuming, into, map, map_res, not, opt, peek, value, verify, }; use nom::error::context; use nom::multi::{many0, many_till, separated_list0, separated_list1}; use nom::sequence::{delimited, pair, preceded, terminated}; use nom::{IResult, Parser as _}; use nom_language::error::VerboseError; use std::str::{from_utf8, Utf8Error}; /// A Parsing Result; ok gives a span for the rest of the data and a parsed T. pub(crate) type PResult<'a, T> = IResult, T, VerboseError>>; pub(crate) fn code_span(value: &[u8]) -> SourcePos { SourceFile::scss_bytes(value, SourceName::root("(rsass)")).into() } pub(crate) fn input_span(value: impl Into>) -> SourcePos { SourceFile::scss_bytes(value, SourceName::root("-")).into() } /// Parse a scss value. /// /// Returns a single value (or an error). pub fn parse_value_data(data: &[u8]) -> Result { let data = code_span(data); let value = all_consuming(value_expression).parse(data.borrow()); Ok(ParseError::check(value)?) } #[test] fn test_parse_value_data_1() -> Result<(), Error> { let v = parse_value_data(b"17em")?; assert_eq!(Value::Numeric(Numeric::new(17, Unit::Em)), v); Ok(()) } #[test] fn test_parse_value_data_2() -> Result<(), Error> { let v = parse_value_data(b"17em;"); assert!(v.is_err()); Ok(()) } pub(crate) fn sassfile(input: Span) -> PResult> { preceded( opt(tag("\u{feff}".as_bytes())), map( many_till( preceded(opt_spacelike, top_level_item), all_consuming(opt_spacelike), ), |(v, _eof)| v, ), ) .parse(input) } fn top_level_item(input: Span) -> PResult { let (rest, tag) = alt((tag("$"), tag("/*"), tag("@"), tag(""))).parse(input)?; match tag.fragment() { b"$" => into(variable_declaration2).parse(rest), b"/*" => comment_item(rest), b"@" => at_rule2(input), b"" => alt((into(variable_declaration_mod), rule)).parse(input), _ => unreachable!(), } } fn comment_item(input: Span) -> PResult { map(comment2, Item::Comment).parse(input) } fn rule(input: Span) -> PResult { map(pair(rule_start, body_block2), |(selectors, body)| { Item::Rule(selectors, body) }) .parse(input) } fn rule_start(input: Span) -> PResult { terminated(selectors, terminated(opt(is_a(", \t\r\n")), tag("{"))) .parse(input) } fn body_item(input: Span) -> PResult { let (rest, tag) = alt((tag("$"), tag("/*"), tag(";"), tag("@"), tag("--"), tag(""))) .parse(input)?; match tag.fragment() { b"$" => into(variable_declaration2).parse(rest), b"/*" => comment_item(rest), b";" => Ok((rest, Item::None)), b"@" => at_rule2(input), b"--" => { let result = custom_property(input); if result.is_err() { // Note use of `input` rather than `rest` here. if let Ok((rest, rule)) = rule(input) { return Ok((rest, rule)); } } result } b"" => match rule_start(rest) { Ok((rest, selectors)) => { let (rest, body) = body_block2(rest)?; Ok((rest, Item::Rule(selectors, body))) } Err(_) => property_or_namespace_rule(rest), }, _ => unreachable!(), } } /// What follows the `@at-root` tag. fn at_root2(input: Span) -> PResult { preceded( opt_spacelike, map( pair( map(opt(selectors), |s| s.unwrap_or_else(Selectors::root)), body_block, ), |(selectors, body)| Item::AtRoot(selectors, body), ), ) .parse(input) } /// What follows the `@include` tag. fn mixin_call<'a>(start: Span, input: Span<'a>) -> PResult<'a, Item> { let (rest, n1) = terminated(name, opt_spacelike).parse(input)?; let (rest, n2) = opt(preceded(tag("."), name)).parse(rest)?; let name = n2.map(|n2| format!("{n1}.{n2}")).unwrap_or(n1); let (rest, _) = opt_spacelike(rest)?; let (rest0, args) = terminated(opt(call_args), ignore_comments).parse(rest)?; let (rest, t) = alt((tag("using"), tag("{"), tag(""))).parse(rest0)?; let (end, body) = match t.fragment() { b"using" => { let (end, args) = preceded(ignore_comments, formal_args).parse(rest)?; let (rest, body) = preceded(ignore_comments, body_block).parse(end)?; let decl = rest0.up_to(&end).to_owned(); (rest, Some(Callable::new(args, body, decl))) } b"{" => { let (rest, body) = body_block(rest0)?; let decl = rest0.up_to(&rest).to_owned(); (rest, Some(Callable::no_args(body, decl))) } _ => map(semi_or_end, |_| None).parse(rest)?, }; let pos = start.up_to(&rest).to_owned(); Ok(( end, Item::MixinCall(name, args.unwrap_or_default(), body, pos), )) } /// When we know that `input0` starts with an `@` sign. fn at_rule2(input0: Span) -> PResult { let (input, name) = delimited( tag("@"), context("Expected identifier.", sass_string), ignore_comments, ) .parse(input0)?; match name.single_raw().unwrap_or("") { "at-root" => at_root2(input), "charset" => charset2(input), "content" => content_stmt2(input), "debug" => map(expression_argument, Item::Debug).parse(input), "each" => each_loop2(input), "error" => { let (end, v) = value_expression(input)?; let (rest, _) = opt(tag(";")).parse(end)?; let pos = input0.up_to(&end).to_owned(); Ok((rest, Item::Error(v, pos))) } "extend" => map( delimited(opt_spacelike, selectors, semi_or_end), Item::Extend, ) .parse(input), "for" => for_loop2(input), "forward" => forward2(input0, input), "function" => function_declaration2(input), "if" => if_statement2(input), "import" => import2(input), "include" => mixin_call(input0, input), "media" => media::rule(input0, input), "mixin" => mixin_declaration2(input), "return" => return_stmt2(input0, input), "use" => use2(input0, input), "warn" => map(expression_argument, Item::Warn).parse(input), "while" => while_loop2(input), _ => unknown_atrule(name, input0, input), } } fn unknown_atrule<'a>( name: SassString, start: Span, input: Span<'a>, ) -> PResult<'a, Item> { let (input, args) = terminated(opt(unknown_rule_args), opt(ignore_space)).parse(input)?; fn x_args(value: Value) -> Value { match value { Value::Variable(name, _pos) => { Value::Literal(SassString::from(format!("${name}"))) } Value::Map(map) => Value::Map( map.into_iter() .map(|(k, v)| (x_args(k), x_args(v))) .collect(), ), value => value, } } let (rest, body) = if input.first() == Some(&b'{') { map(body_block, Some).parse(input)? } else { value(None, semi_or_end).parse(input)? }; Ok(( rest, Item::AtRule { name, args: args.map_or(Value::Null, x_args), body, pos: start.up_to(&input).to_owned(), }, )) } fn expression_argument(input: Span) -> PResult { terminated(value_expression, opt(tag(";"))).parse(input) } fn charset2(input: Span) -> PResult { use nom::combinator::map_opt; map_opt( terminated( alt((sass_string_dq, sass_string_sq, sass_string)), semi_or_end, ), |s| { s.single_raw().and_then(|s| { if s.eq_ignore_ascii_case("UTF-8") { Some(Item::None) } else { None } }) }, ) .parse(input) } /// Arguments to an unkown at rule. fn unknown_rule_args(input: Span) -> PResult { let (input, args) = separated_list0( preceded(tag(","), opt_spacelike), map( many0(preceded( opt_spacelike, alt(( terminated( alt(( function_call_or_string_rulearg, dictionary, map( delimited(tag("("), media::args, tag(")")), |v| Value::Paren(Box::new(v), true), ), map(sass_string_dq, Value::Literal), map(sass_string_sq, Value::Literal), )), terminated( alt(( value((), all_consuming(tag(""))), value((), peek(one_of(") \r\n\t{,;/"))), )), opt_spacelike, ), ), map(map_res(is_not("\"'{};#"), input_to_str), |s| { Value::Literal(s.trim_end().into()) }), )), )), |args| list_or_single(args, ListSeparator::Space), ), ) .parse(input)?; Ok((input, list_or_single(args, ListSeparator::Comma))) } #[cfg(test)] pub(crate) fn check_parse( parser: impl Fn(Span) -> PResult, value: &[u8], ) -> Result { ParseError::check(parser(code_span(value).borrow())) } fn if_statement_inner(input: Span) -> PResult { preceded( terminated(verify(name, |n: &String| n == "if"), opt_spacelike), if_statement2, ) .parse(input) } fn if_statement2(input: Span) -> PResult { let (input, cond) = terminated(value_expression, opt_spacelike).parse(input)?; let (input, body) = body_block(input)?; let (input2, word) = opt(delimited( preceded(opt_spacelike, tag("@")), name, opt_spacelike, )) .parse(input)?; match word.as_ref().map(AsRef::as_ref) { Some("else") => { let (input2, else_body) = alt((map(if_statement_inner, |s| vec![s]), body_block)) .parse(input2)?; Ok((input2, Item::IfStatement(cond, body, else_body))) } Some("elseif") => { let (input2, else_body) = if_statement2(input2)?; Ok((input2, Item::IfStatement(cond, body, vec![else_body]))) } _ => Ok((input, Item::IfStatement(cond, body, vec![]))), } } /// The part of an each look that follows the `@each`. fn each_loop2(input: Span) -> PResult { let (input, names) = separated_list1( delimited(opt_spacelike, tag(","), opt_spacelike), map(preceded(tag("$"), name), Name::from), ) .parse(input)?; let (input, values) = delimited( delimited(spacelike, tag("in"), spacelike), value_expression, opt_spacelike, ) .parse(input)?; let (input, body) = body_block(input)?; Ok((input, Item::Each(names, values, body))) } /// A for loop after the initial `@for`. fn for_loop2(input: Span) -> PResult { let (input, name) = delimited(tag("$"), name, ignore_comments).parse(input)?; let (input, range) = src_range(input)?; let (input, body) = body_block(input)?; Ok((input, Item::For(name.into(), range, body))) } /// A single `SrcValue`. /// /// That is, a single sass value with source position. pub fn single_value_p(input: Span) -> PResult { let (rest, value) = single_value(input)?; let pos = input.up_to(&rest).to_owned(); Ok((rest, SrcValue::new(value, pos))) } fn while_loop2(input: Span) -> PResult { let (input, cond) = terminated(value_expression, opt_spacelike).parse(input)?; let (input, body) = body_block(input)?; Ok((input, Item::While(cond, body))) } fn mixin_declaration2(input: Span) -> PResult { let (rest, (name, args)) = pair( terminated(name, ignore_comments), alt((value(None, peek(not(char('(')))), map(formal_args, Some))), ) .parse(input)?; let (end, body) = preceded(ignore_comments, body_block).parse(rest)?; let args = args.unwrap_or_else(FormalArgs::none); let decl = input.up_to(&rest).to_owned(); Ok(( end, Item::MixinDeclaration(name, Callable { args, body, decl }), )) } fn function_declaration2(input: Span) -> PResult { let (end, name) = terminated(name, ignore_comments).parse(input)?; let (end, args) = formal_args(end)?; let (rest, body) = preceded(ignore_comments, body_block).parse(end)?; let decl = input.up_to(&end).to_owned(); Ok(( rest, Item::FunctionDeclaration(name, Callable { args, body, decl }), )) } fn return_stmt2<'a>(start: Span, input: Span<'a>) -> PResult<'a, Item> { let (input, v) = terminated(value_expression, ignore_comments).parse(input)?; let pos = start.up_to(&input).to_owned(); let (input, _) = opt(tag(";")).parse(input)?; Ok((input, Item::Return(v, pos))) } fn content_stmt2(input: Span) -> PResult { let (rest, args) = terminated(opt(call_args), opt(tag(";"))).parse(input)?; let pos = input.up_to(&rest).to_owned(); Ok((rest, Item::Content(args.unwrap_or_default(), pos))) } fn custom_property(input: Span) -> PResult { let (rest, name) = terminated(sass_string, char(':')).parse(input)?; let (rest, value) = terminated(custom_value, semi_or_end).parse(rest)?; Ok((rest, Item::CustomProperty(name, value))) } fn property_or_namespace_rule(input: Span) -> PResult { let (start_val, name) = terminated( alt(( map(preceded(tag("*"), sass_string), |mut s| { s.prepend("*"); s }), sass_string, )), delimited(ignore_comments, char(':'), ignore_comments), ) .parse(input)?; let (input, val) = alt(( map(peek(char('{')), |_| None), map(context("Expected expression.", value_expression), Some), )) .parse(start_val)?; let pos = start_val.up_to(&input); let (input, body) = preceded( ignore_comments, alt((map(semi_or_end, |_| None), map(body_block, Some))), ) .parse(input)?; Ok((input, ns_or_prop_item(name, val, body, pos.to_owned()))) } use crate::sass::SassString; fn ns_or_prop_item( name: SassString, value: Option, body: Option>, pos: SourcePos, ) -> Item { if let Some(body) = body { Item::NamespaceRule(name, value.unwrap_or(Value::Null), body) } else if let Some(value) = value { Item::Property(name, value, pos) } else { unreachable!() } } fn body_block(input: Span) -> PResult> { preceded(char('{'), body_block2).parse(input) } fn body_block2(input: Span) -> PResult> { let (input, (v, _end)) = preceded( opt_spacelike, many_till( terminated(body_item, opt_spacelike), terminated(terminated(tag("}"), opt_spacelike), opt(tag(";"))), ), ) .parse(input)?; Ok((input, v)) } pub(crate) fn input_to_str(s: Span) -> Result<&str, Utf8Error> { from_utf8(s.fragment()) } fn input_to_string(s: Span) -> Result { from_utf8(s.fragment()).map(String::from) } fn list_or_single(list: Vec, sep: ListSeparator) -> Value { if list.len() == 1 { list.into_iter().next().unwrap() } else { Value::List(list, Some(sep), false) } } rsass-0.29.0/rsass/src/parser/selectors.rs000066400000000000000000000161201474765622100205420ustar00rootroot00000000000000use super::strings::{ sass_string, sass_string_allow_dash, sass_string_dq, sass_string_sq, }; use super::util::{ignore_comments, opt_spacelike, spacelike2}; use super::{input_to_string, PResult, Span}; use crate::sass::{Selector, SelectorPart, Selectors}; use nom::branch::alt; use nom::bytes::complete::tag; use nom::character::complete::one_of; use nom::combinator::{map, map_opt, map_res, opt, value}; use nom::multi::{many1, separated_list1}; use nom::sequence::{delimited, pair, preceded, terminated}; use nom::Parser as _; pub fn selectors(input: Span) -> PResult { map_opt( separated_list1(terminated(tag(","), ignore_comments), opt(selector)), |v| { let v = v.into_iter().flatten().collect::>(); if v.is_empty() { None } else { Some(Selectors::new(v)) } }, ) .parse(input) } pub fn selector(input: Span) -> PResult { let (input, mut s) = many1(selector_part).parse(input)?; if s.last() == Some(&SelectorPart::Descendant) { s.pop(); } Ok((input, Selector::new(s))) } fn selector_part(input: Span) -> PResult { alt(( map( // A single dash is allowed as a selector, because the parsing // of psedudo-element attributes don't handle expressions yet. (opt(tag("%")), sass_string_allow_dash, opt(tag("%"))), |(pre, mut s, post)| { if pre.is_some() { s.prepend("%"); } if post.is_some() { s.append_str("%"); } SelectorPart::Simple(s) }, ), value(SelectorPart::Simple("*".into()), tag("*")), map( preceded( tag("::"), pair( sass_string, opt(delimited(tag("("), selectors, tag(")"))), ), ), |(name, arg)| SelectorPart::PseudoElement { name, arg }, ), map( preceded( tag(":"), pair( sass_string, opt(delimited(tag("("), selectors, tag(")"))), ), ), |(name, arg)| SelectorPart::Pseudo { name, arg }, ), map( delimited( terminated(tag("["), opt_spacelike), ( terminated(sass_string, opt_spacelike), terminated( map_res( alt(( tag("*="), tag("|="), tag("="), tag("$="), tag("~="), tag("^="), )), input_to_string, ), opt_spacelike, ), terminated( alt((sass_string_dq, sass_string_sq, sass_string)), opt_spacelike, ), opt(terminated( one_of( "ABCDEFGHIJKLMNOPQRSTUVWXYZ\ abcdefghijklmnopqrstuvwxyz", ), opt_spacelike, )), ), tag("]"), ), |(name, op, val, modifier)| SelectorPart::Attribute { name, op, val, modifier, }, ), map( delimited( terminated(tag("["), opt_spacelike), sass_string, preceded(opt_spacelike, tag("]")), ), |name| SelectorPart::Attribute { name, op: "".to_string(), val: "".into(), modifier: None, }, ), value(SelectorPart::BackRef, tag("&")), delimited( opt_spacelike, alt(( value(SelectorPart::RelOp(b'>'), tag(">")), value(SelectorPart::RelOp(b'+'), tag("+")), value(SelectorPart::RelOp(b'~'), tag("~")), value(SelectorPart::RelOp(b'\\'), tag("\\")), )), opt_spacelike, ), value(SelectorPart::Descendant, spacelike2), )) .parse(input) } #[cfg(test)] mod test { use super::super::check_parse; use super::*; use crate::sass::{SassString, StringPart}; use crate::value::Quotes; #[test] fn simple_selector() { assert_eq!( check_parse(selector, b"foo "), Ok(Selector::new(vec![SelectorPart::Simple("foo".into())])), ) } #[test] fn escaped_simple_selector() { assert_eq!( check_parse(selector, b"\\E9m "), Ok(Selector::new(vec![SelectorPart::Simple("ém".into())])), ) } #[test] fn selector2() { assert_eq!( check_parse(selector, b"foo bar "), Ok(Selector::new(vec![ SelectorPart::Simple("foo".into()), SelectorPart::Descendant, SelectorPart::Simple("bar".into()), ])), ) } #[test] fn child_selector() { assert_eq!( check_parse(selector, b"foo > bar "), Ok(Selector::new(vec![ SelectorPart::Simple("foo".into()), SelectorPart::RelOp(b'>'), SelectorPart::Simple("bar".into()), ])), ) } #[test] fn foo1_selector() { assert_eq!( check_parse(selector, b"[data-icon='test-1'] "), Ok(Selector::new(vec![SelectorPart::Attribute { name: "data-icon".into(), op: "=".into(), val: SassString::new( vec![StringPart::Raw("test-1".into())], Quotes::Single, ), modifier: None, }])), ) } #[test] fn pseudo_selector() { assert_eq!( check_parse(selector, b":before "), Ok(Selector::new(vec![SelectorPart::Pseudo { name: "before".into(), arg: None, }])), ) } #[test] fn pseudo_on_simple_selector() { assert_eq!( check_parse(selector, b"figure:before "), Ok(Selector::new(vec![ SelectorPart::Simple("figure".into()), SelectorPart::Pseudo { name: "before".into(), arg: None, }, ])), ) } #[test] fn selectors_simple() { assert_eq!( check_parse(selectors, b"foo, bar "), Ok(Selectors::new(vec![ Selector::new(vec![SelectorPart::Simple("foo".into())]), Selector::new(vec![SelectorPart::Simple("bar".into())]), ])), ) } } rsass-0.29.0/rsass/src/parser/span.rs000066400000000000000000000130241474765622100175000ustar00rootroot00000000000000use crate::input::{SourceFile, SourcePos}; use nom::{Compare, CompareResult, Input, Needed, Offset}; use std::fmt::Write; use std::ops::{Deref, Range}; /// A specific piece of input data. #[derive(Clone, Copy)] pub struct Span<'a> { start: usize, end: usize, pub(crate) source: &'a SourceFile, } impl<'a> Span<'a> { pub(crate) fn new(source: &'a SourceFile) -> Self { Span { start: 0, end: source.data().len(), source, } } pub(crate) fn new_range( source: &'a SourceFile, range: Range, ) -> Self { // precondition: 0 <= range.start <= range.end <= source.data().len() // only the last part is not guaranteed by the range type, so check it: assert!(range.end <= source.data().len()); Span { start: range.start, end: range.end, source, } } pub(crate) fn is_at_end(&self) -> bool { self.start == self.source.data().len() } fn range(&self) -> Range { self.start..self.end } /// This span of input as actual bytes. pub fn fragment(&self) -> &'a [u8] { &self.source.data()[self.range()] } /// How far into the source does this span start? pub fn location_offset(&self) -> usize { self.start } /// Should find a line number pub fn location_line(&self) -> u32 { self.source.data()[0..self.start] .iter() .filter(|c| c == &&b'\n') .count() as u32 + 1 } /// Should find a position in line pub fn get_utf8_column(&self) -> usize { (0..self.start) .rev() .find(|i| self.source.data().get(*i) == Some(&b'\n')) .map_or(self.start + 1, |s| self.start - s) } pub fn to_owned(self) -> SourcePos { SourcePos::new_range(self.source.clone(), self.range()) } pub(crate) fn up_to(self, other: &Self) -> Self { self.take(self.offset(other)) } /// If `self` goes on the end of input, return just the starting point. /// Otherwise preserve `self` as is. pub(crate) fn sanitize_end(self) -> Self { if self.end < self.source.data().len() { self } else { self.up_to(&self) } } } impl<'a, T> Compare for Span<'a> where &'a [u8]: Compare, { fn compare(&self, t: T) -> CompareResult { self.fragment().compare(t) } fn compare_no_case(&self, t: T) -> CompareResult { self.fragment().compare_no_case(t) } } impl<'a> Input for Span<'a> { type Item = u8; type Iter = <&'a [u8] as Input>::Iter; type IterIndices = <&'a [u8] as Input>::IterIndices; fn input_len(&self) -> usize { self.end - self.start } fn take(&self, index: usize) -> Self { let end = self.start + index; assert!(end <= self.end, "Tried to take {index} from {self:?}"); Span { start: self.start, end, source: self.source, } } fn take_from(&self, index: usize) -> Self { let mid = self.start + index; assert!(mid <= self.end, "Tried to take_from {index} from {self:?}"); Span { start: mid, end: self.end, source: self.source, } } fn take_split(&self, index: usize) -> (Self, Self) { let mid = self.start + index; assert!(mid <= self.end, "Tried to take_split {index} from {self:?}"); ( Span { start: mid, end: self.end, source: self.source, }, Span { start: self.start, end: mid, source: self.source, }, ) } fn position

(&self, predicate: P) -> Option where P: Fn(Self::Item) -> bool, { self.fragment().position(predicate) } fn iter_elements(&self) -> Self::Iter { self.fragment().iter_elements() } fn iter_indices(&self) -> Self::IterIndices { self.fragment().iter_indices() } fn slice_index(&self, count: usize) -> Result { self.fragment().slice_index(count) } } impl<'a> Deref for Span<'a> { type Target = [u8]; fn deref(&self) -> &'a [u8] { self.fragment() } } impl Offset for Span<'_> { fn offset(&self, second: &Self) -> usize { assert!(std::ptr::eq(self.source, second.source)); second.start - self.start } } /// Capture the position of the current fragment pub fn position(s: Span) -> super::PResult { Ok((s, s)) } impl std::fmt::Debug for Span<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { f.debug_struct("Span") .field("range", &self.range()) .field("data", &DebugBytes(self.fragment())) .finish() } } pub(crate) struct DebugBytes<'a>(pub(crate) &'a [u8]); impl std::fmt::Debug for DebugBytes<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { f.write_char('"')?; for b in self.0 { match b { b'\n' => f.write_str("\\n"), b'\t' => f.write_str("\\t"), b'\'' | b'\"' | b'\\' => { write!(f, "\\{b}") } b if b.is_ascii_graphic() || *b == b' ' => { f.write_char(*b as char) } b => write!(f, "\\{b:02x}"), }?; } f.write_char('"') } } rsass-0.29.0/rsass/src/parser/strings.rs000066400000000000000000000414561474765622100202420ustar00rootroot00000000000000use super::value::value_expression; use super::{input_to_str, input_to_string, PResult, Span}; use crate::sass::{SassString, StringPart}; use crate::value::Quotes; use nom::branch::alt; use nom::bytes::complete::{is_a, is_not, tag, take}; use nom::character::complete::{alphanumeric1, char, one_of}; use nom::combinator::{ cut, map, map_opt, map_res, not, opt, peek, recognize, value, verify, }; use nom::error::context; use nom::multi::{fold_many0, fold_many1, many0, many1, many_m_n}; use nom::sequence::{delimited, pair, preceded, terminated}; use nom::Parser as _; use std::str::from_utf8; pub fn sass_string(input: Span) -> PResult { verify(sass_string_allow_dash, |s| s.single_raw() != Some("-")) .parse(input) } pub fn sass_string_allow_dash(input: Span) -> PResult { let (input, first) = alt(( string_part_interpolation, map(unquoted_first_part, StringPart::Raw), )) .parse(input)?; let (input, parts) = fold_many0( alt(( string_part_interpolation, map(unquoted_part, StringPart::Raw), )), || vec![first.clone()], |mut acc, item| { acc.push(item); acc }, ) .parse(input)?; Ok((input, SassString::new(parts, Quotes::None))) } pub fn custom_value(input: Span) -> PResult { map( context("Expected token.", custom_value_inner), |mut parts| { if let Some(StringPart::Raw(last)) = parts.last_mut() { if last.ends_with('\n') { last.pop(); last.push(' '); } } SassString::new(parts, Quotes::None) }, ) .parse(input) } pub fn custom_value_inner(input: Span) -> PResult> { fold_many1( alt(( |input| custom_value_paren('[', ']', input), |input| custom_value_paren('{', '}', input), |input| custom_value_paren('(', ')', input), map(sass_string_dq, |mut s| { s.prepend("\""); s.append_str("\""); s.parts() }), map(sass_string_sq, |mut s| { s.prepend("'"); s.append_str("'"); s.parts() }), map(string_part_interpolation, |s| vec![s]), map(unquoted_part, |s| vec![StringPart::Raw(s)]), map_opt(is_not("\"'#\\;{}()[]"), |s: Span| { if s.is_empty() { None } else { Some(vec![StringPart::from(input_to_str(s).ok()?)]) } }), )), Vec::new, |mut acc, items: Vec| { acc.extend(items); acc }, ) .parse(input) } fn custom_value_paren( start: char, end: char, input: Span, ) -> PResult> { map( delimited( char(start), fold_many0( alt(( map(tag(";"), |_| vec![StringPart::from(";")]), custom_value_inner, )), || vec![StringPart::Raw(start.into())], |mut acc, items: Vec| { acc.extend(items); acc }, ), cut(char(end)), ), |mut parts| { parts.push(StringPart::Raw(end.into())); parts }, ) .parse(input) } pub fn sass_string_ext(input: Span) -> PResult { let (input, parts) = many1(alt((string_part_interpolation, extended_part))) .parse(input)?; Ok((input, SassString::new(parts, Quotes::None))) } fn unquoted_first_part(input: Span) -> PResult { let (input, first) = alt(( map(str_plain_part, String::from), normalized_first_escaped_char, map(hash_no_interpolation, String::from), )) .parse(input)?; fold_many0( // Note: This could probably be a whole lot more efficient, // but try to get stuff correct before caring too much about that. alt(( map(str_plain_part, String::from), normalized_escaped_char, map(hash_no_interpolation, String::from), )), move || first.clone(), |mut acc: String, item: String| { acc.push_str(&item); acc }, ) .parse(input) } fn unquoted_part(input: Span) -> PResult { fold_many1( // Note: This could probably be a whole lot more efficient, // but try to get stuff correct before caring too much about that. alt(( map(str_plain_part, String::from), normalized_escaped_char, map(hash_no_interpolation, String::from), )), String::new, |mut acc: String, item: String| { acc.push_str(&item); acc }, ) .parse(input) } fn normalized_first_escaped_char(input: Span) -> PResult { let (rest, c) = escaped_char(input)?; let result = if c.is_alphabetic() || u32::from(c) >= 0xa1 { format!("{c}") } else if !c.is_control() && !c.is_numeric() && c != '\n' && c != '\t' { format!("\\{c}") } else { format!("\\{:x} ", u32::from(c)) }; Ok((rest, result)) } fn normalized_escaped_char(input: Span) -> PResult { let (rest, c) = escaped_char(input)?; let result = if c.is_alphanumeric() || c == '-' || u32::from(c) >= 0xa1 { format!("{c}") } else if !c.is_control() && c != '\n' && c != '\t' { format!("\\{c}") } else { format!("\\{:x} ", u32::from(c)) }; Ok((rest, result)) } /// Some special css functions are parsed as plain strings. /// /// For the `calc` function, it is parsed as a string if the arguments /// contain a string interpolation, otherwise it is refused by this parser, /// so that it can end up beeing parsed as a normal function call. pub fn special_function_misc(input: Span) -> PResult { let (input, (start, mut args, end)) = verify( ( recognize(terminated( alt(( map( ( opt(delimited(tag("-"), alphanumeric1, tag("-"))), alt(( tag("calc"), tag("element"), tag("env"), tag("expression"), )), ), |_| (), ), map( preceded( tag("progid:"), many1(alt(( map(tag("."), |_| ()), map(selector_string, |_| ()), ))), ), |_| (), ), )), tag("("), )), special_args, alt((tag(")"), tag(""))), ), |(start, args, _end)| { start.fragment() != b"calc(" || args.is_interpolated() }, ) .parse(input)?; args.prepend(from_utf8(start.fragment()).unwrap()); args.append_str(from_utf8(end.fragment()).unwrap()); Ok((input, args)) } fn special_args(input: Span) -> PResult { let (input, parts) = special_arg_parts(input)?; Ok((input, SassString::new(parts, Quotes::None))) } pub fn special_arg_parts(input: Span) -> PResult> { let (input, parts) = many0(alt(( map(string_part_interpolation, |part| vec![part]), map(hash_no_interpolation, |s| vec![StringPart::from(s)]), map(dq_parts, |mut v| { v.insert(0, StringPart::from("\"")); v.push(StringPart::from("\"")); v }), map(delimited(tag("("), special_arg_parts, tag(")")), |mut v| { v.insert(0, StringPart::from("(")); v.push(StringPart::from(")")); v }), map(tag("\\)"), |_| vec![StringPart::from("\\)")]), value(vec![StringPart::from(" ")], is_a("\n ")), map(map_res(is_not("#()\"\\;\n "), input_to_str), |s| { vec![StringPart::from(s)] }), ))) .parse(input)?; Ok((input, parts.into_iter().flatten().collect())) } pub fn special_url(input: Span) -> PResult { let (input, _start) = tag("url(").parse(input)?; let (input, _trim) = many0(is_a(" ")).parse(input)?; let (input, mut parts) = many1(alt(( string_part_interpolation, map(unquoted_part, StringPart::Raw), map( map_res(is_a("\":.;,!+/="), input_to_string), StringPart::Raw, ), ))) .parse(input)?; let (input, _trim) = many0(is_a(" ")).parse(input)?; let (input, _end) = tag(")").parse(input)?; parts.insert(0, "url(".into()); parts.push(")".into()); Ok((input, SassString::new(parts, Quotes::None))) } pub fn sass_string_dq(input: Span) -> PResult { let (input, mut parts) = dq_parts(input)?; cleanup_escape_ws(&mut parts); Ok((input, SassString::new(parts, Quotes::Double))) } fn dq_parts(input: Span) -> PResult> { delimited( tag("\""), many0(alt(( simple_qstring_part, string_part_interpolation, map(hash_no_interpolation, StringPart::from), value(StringPart::Raw("\"".to_string()), tag("\\\"")), value(StringPart::Raw("'".to_string()), tag("'")), map(normalized_escaped_char_q, StringPart::Raw), ))), char('"'), ) .parse(input) } pub fn sass_string_sq(input: Span) -> PResult { let (input, mut parts) = delimited( tag("'"), many0(alt(( simple_qstring_part, string_part_interpolation, map(hash_no_interpolation, StringPart::from), value(StringPart::from("'"), tag("\\'")), value(StringPart::from("\""), tag("\"")), value(StringPart::from(""), tag("\\\n")), map(normalized_escaped_char_q, StringPart::Raw), ))), char('\''), ) .parse(input)?; cleanup_escape_ws(&mut parts); Ok((input, SassString::new(parts, Quotes::Single))) } fn cleanup_escape_ws(parts: &mut [StringPart]) { let mut t_iter = parts.iter_mut().peekable(); while let Some(ref mut item) = t_iter.next() { if let StringPart::Raw(ref mut s) = item { if s.starts_with('\\') && s.ends_with(' ') { match t_iter.peek() { None => { s.pop(); } Some(StringPart::Raw(next)) => { if let Some(next) = next.chars().next() { if !next.is_ascii_hexdigit() && next != '\t' { s.pop(); } } } _ => (), } } } } } fn normalized_escaped_char_q(input: Span) -> PResult { let (rest, c) = escaped_char(input)?; let result = if c == '\0' { char::REPLACEMENT_CHARACTER.to_string() } else if c.is_control() && c != '\t' { format!("\\{:x} ", u32::from(c)) } else if c == '-' || c == '\\' || c == ' ' { format!("\\{c}") } else { c.to_string() }; Ok((rest, result)) } pub fn string_part_interpolation(input: Span) -> PResult { let (input, expr) = delimited(tag("#{"), value_expression, tag("}")).parse(input)?; Ok((input, StringPart::Interpolation(expr))) } fn simple_qstring_part(input: Span) -> PResult { let (input, part) = map_res(is_not("\\#'\"\n\r\u{c}"), input_to_string).parse(input)?; Ok((input, StringPart::Raw(part))) } fn selector_string(input: Span) -> PResult { fold_many1( // Note: This could probably be a whole lot more efficient, // but try to get stuff correct before caring too much about that. alt(( selector_plain_part, map(tag("\\ "), |_| "\\ ".to_string()), map(tag("\\\""), |_| "\\\"".to_string()), map(tag("\\\'"), |_| "\\\'".to_string()), map(tag("\\\\"), |_| "\\\\".to_string()), map(escaped_char, |c| format!("{c}")), map(hash_no_interpolation, String::from), )), String::new, |mut acc: String, item: String| { acc.push_str(&item); acc }, ) .parse(input) } fn selector_plain_part(input: Span) -> PResult { fold_many1( verify(take_char, |ch| { ch.is_alphanumeric() || *ch == '-' || *ch == '_' }), String::new, |mut acc, chr: char| { acc.push(chr); acc }, ) .parse(input) } fn str_plain_part(input: Span) -> PResult<&str> { // TODO: This should probably be based on unicode alphanumeric. map_res(is_not("\r\n\t %<>$\"'\\#+*/()[]{}:;,=!&@~"), input_to_str) .parse(input) } fn hash_no_interpolation(input: Span) -> PResult<&str> { map_res(terminated(tag("#"), peek(not(tag("{")))), input_to_str) .parse(input) } pub fn extended_part(input: Span) -> PResult { let (input, part) = map_res( recognize(pair( verify(take_char, is_ext_str_start_char), many0(verify(take_char, is_ext_str_char)), )), input_to_string, ) .parse(input)?; Ok((input, StringPart::Raw(part))) } fn is_ext_str_start_char(c: &char) -> bool { is_name_char(c) || *c == '*' || *c == '+' || *c == '.' || *c == '/' || *c == ':' || *c == '=' || *c == '?' || *c == '|' || *c == '<' || *c == '>' } fn is_ext_str_char(c: &char) -> bool { is_name_char(c) || *c == '*' || *c == '+' || *c == ',' || *c == '.' || *c == '/' || *c == ':' || *c == '=' || *c == '?' || *c == '|' || *c == '<' || *c == '>' || *c == '\\' } pub fn name(input: Span) -> PResult { let (input, first) = verify(alt((escaped_char, take_char)), is_name_start_char) .parse(input)?; verify( fold_many0( alt((escaped_char, name_char)), move || String::from(first), |mut s, c| { s.push(c); s }, ), |s: &str| !s.is_empty() && s != "-", ) .parse(input) } pub fn unitname(input: Span) -> PResult { let (input, first) = verify(alt((escaped_char, name_char)), |c| c.is_alphabetic()) .parse(input)?; fold_many0( verify(alt((escaped_char, name_char)), |c| c.is_alphanumeric()), move || first.to_string(), |mut s, c| { s.push(c); s }, ) .parse(input) } pub fn name_char(input: Span) -> PResult { verify(take_char, is_name_char).parse(input) } fn escaped_char(input: Span) -> PResult { preceded( tag("\\"), alt(( value('\\', tag("\\")), map_opt( pair( recognize(many_m_n( 1, 6, one_of("0123456789ABCDEFabcdef"), )), alt(( value(true, tag(" ")), value( true, peek(not(one_of("0123456789ABCDEFabcdef"))), ), value(false, tag("")), )), ), |(code, term): (Span, bool)| { if term || code.len() == 6 { std::char::from_u32( u32::from_str_radix(input_to_str(code).ok()?, 16) .ok()?, ) } else { None } }, ), take_char, )), ) .parse(input) } fn take_char(input: Span) -> PResult { alt(( map_opt(take(1usize), single_char), map_opt(take(2usize), single_char), map_opt(take(3usize), single_char), map_opt(take(4usize), single_char), map_opt(take(5usize), single_char), )) .parse(input) } fn single_char(data: Span) -> Option { from_utf8(data.fragment()) .ok() .and_then(|s| s.chars().next()) } fn is_name_char(c: &char) -> bool { c.is_alphanumeric() || *c == '_' || *c == '-' } fn is_name_start_char(c: &char) -> bool { c.is_alphabetic() || *c == '_' || *c == '-' } rsass-0.29.0/rsass/src/parser/unit.rs000066400000000000000000000027341474765622100175240ustar00rootroot00000000000000use super::strings::unitname; use super::{PResult, Span}; use crate::value::Unit; use nom::combinator::{map, value}; use nom::Parser as _; use nom::{branch::alt, bytes::complete::tag}; pub fn unit(input: Span) -> PResult { alt(( value(Unit::Percent, tag("%")), map(unitname, |name| match name.as_ref() { // Distance units, type "em" => Unit::Em, "ex" => Unit::Ex, "ch" => Unit::Ch, "rem" => Unit::Rem, "vw" => Unit::Vw, "vh" => Unit::Vh, "vmin" => Unit::Vmin, "vmax" => Unit::Vmax, "cm" => Unit::Cm, "mm" => Unit::Mm, "Q" | "q" => Unit::Q, "in" => Unit::In, "pt" => Unit::Pt, "pc" => Unit::Pc, "px" => Unit::Px, // type "deg" => Unit::Deg, "grad" => Unit::Grad, "rad" => Unit::Rad, "turn" => Unit::Turn, //

\ \n */\n"), "/*\ \n *
\ \n */\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1127.rs000066400000000000000000000071041474765622100247400ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1127.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1127") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:string\";\ \n$a: string.to-upper-case(\'abcd\');\ \n$b: string.to-upper-case(\"abcd\");\ \n$c: string.to-upper-case(abcd);\n\ \nfoo {\ \n content: #{$a};\ \n content: #{$b};\ \n content: #{$c};\ \n content: \'#{$a}\';\ \n content: \'#{$b}\';\ \n content: \'#{$c}\';\ \n content: \"#{$a}\";\ \n content: \"#{$b}\";\ \n content: \"#{$c}\";\n\ \n content: #{string.unquote($a)};\ \n content: #{string.unquote($b)};\ \n content: #{string.unquote($c)};\ \n content: \'#{string.unquote($a)}\';\ \n content: \'#{string.unquote($b)}\';\ \n content: \'#{string.unquote($c)}\';\ \n content: \"#{string.unquote($a)}\";\ \n content: \"#{string.unquote($b)}\";\ \n content: \"#{string.unquote($c)}\";\n\ \n content: #{$a + string.unquote(\"efg\")};\ \n content: #{$b + string.unquote(\"efg\")};\ \n content: #{$c + string.unquote(\"efg\")};\ \n content: \'#{$a + string.unquote(\"efg\")}\';\ \n content: \'#{$b + string.unquote(\"efg\")}\';\ \n content: \'#{$c + string.unquote(\"efg\")}\';\ \n content: \"#{$a + string.unquote(\"efg\")}\";\ \n content: \"#{$b + string.unquote(\"efg\")}\";\ \n content: \"#{$c + string.unquote(\"efg\")}\";\n\ \n content: #{$a + string.unquote(\"\")};\ \n content: #{$b + string.unquote(\"\")};\ \n content: #{$c + string.unquote(\"\")};\ \n content: \'#{$a + string.unquote(\"\")}\';\ \n content: \'#{$b + string.unquote(\"\")}\';\ \n content: \'#{$c + string.unquote(\"\")}\';\ \n content: \"#{$a + string.unquote(\"\")}\";\ \n content: \"#{$b + string.unquote(\"\")}\";\ \n content: \"#{$c + string.unquote(\"\")}\";\ \n}\n"), "foo {\ \n content: ABCD;\ \n content: ABCD;\ \n content: ABCD;\ \n content: \"ABCD\";\ \n content: \"ABCD\";\ \n content: \"ABCD\";\ \n content: \"ABCD\";\ \n content: \"ABCD\";\ \n content: \"ABCD\";\ \n content: ABCD;\ \n content: ABCD;\ \n content: ABCD;\ \n content: \"ABCD\";\ \n content: \"ABCD\";\ \n content: \"ABCD\";\ \n content: \"ABCD\";\ \n content: \"ABCD\";\ \n content: \"ABCD\";\ \n content: ABCDefg;\ \n content: ABCDefg;\ \n content: ABCDefg;\ \n content: \"ABCDefg\";\ \n content: \"ABCDefg\";\ \n content: \"ABCDefg\";\ \n content: \"ABCDefg\";\ \n content: \"ABCDefg\";\ \n content: \"ABCDefg\";\ \n content: ABCD;\ \n content: ABCD;\ \n content: ABCD;\ \n content: \"ABCD\";\ \n content: \"ABCD\";\ \n content: \"ABCD\";\ \n content: \"ABCD\";\ \n content: \"ABCD\";\ \n content: \"ABCD\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_113.rs000066400000000000000000000006611474765622100246530ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_113.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_113") } #[test] fn test() { assert_eq!( runner().ok("// Input\ \nsection {\ \n $w: null, 10px;\ \n width: $w;\ \n}"), "section {\ \n width: 10px;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1130.rs000066400000000000000000000010651474765622100247320ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1130.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1130") } #[test] fn test() { assert_eq!( runner().ok("@function foo($args...) {\ \n @return bar($args...);\ \n}\n\ \n@function bar() {\ \n @return \"hi\";\ \n}\n\ \n.foo {\ \n result: foo();\ \n}\n"), ".foo {\ \n result: \"hi\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1132.rs000066400000000000000000000241661474765622100247430ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1132.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1132") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:color\";\ \nfoo {\ \n @for $i from 0 through 360 {\ \n i#{$i}: color.hue(hsl($i, 10%, 20%));\ \n }\ \n}\n"), "foo {\ \n i0: 0deg;\ \n i1: 1deg;\ \n i2: 2deg;\ \n i3: 3deg;\ \n i4: 4deg;\ \n i5: 5deg;\ \n i6: 6deg;\ \n i7: 7deg;\ \n i8: 8deg;\ \n i9: 9deg;\ \n i10: 10deg;\ \n i11: 11deg;\ \n i12: 12deg;\ \n i13: 13deg;\ \n i14: 14deg;\ \n i15: 15deg;\ \n i16: 16deg;\ \n i17: 17deg;\ \n i18: 18deg;\ \n i19: 19deg;\ \n i20: 20deg;\ \n i21: 21deg;\ \n i22: 22deg;\ \n i23: 23deg;\ \n i24: 24deg;\ \n i25: 25deg;\ \n i26: 26deg;\ \n i27: 27deg;\ \n i28: 28deg;\ \n i29: 29deg;\ \n i30: 30deg;\ \n i31: 31deg;\ \n i32: 32deg;\ \n i33: 33deg;\ \n i34: 34deg;\ \n i35: 35deg;\ \n i36: 36deg;\ \n i37: 37deg;\ \n i38: 38deg;\ \n i39: 39deg;\ \n i40: 40deg;\ \n i41: 41deg;\ \n i42: 42deg;\ \n i43: 43deg;\ \n i44: 44deg;\ \n i45: 45deg;\ \n i46: 46deg;\ \n i47: 47deg;\ \n i48: 48deg;\ \n i49: 49deg;\ \n i50: 50deg;\ \n i51: 51deg;\ \n i52: 52deg;\ \n i53: 53deg;\ \n i54: 54deg;\ \n i55: 55deg;\ \n i56: 56deg;\ \n i57: 57deg;\ \n i58: 58deg;\ \n i59: 59deg;\ \n i60: 60deg;\ \n i61: 61deg;\ \n i62: 62deg;\ \n i63: 63deg;\ \n i64: 64deg;\ \n i65: 65deg;\ \n i66: 66deg;\ \n i67: 67deg;\ \n i68: 68deg;\ \n i69: 69deg;\ \n i70: 70deg;\ \n i71: 71deg;\ \n i72: 72deg;\ \n i73: 73deg;\ \n i74: 74deg;\ \n i75: 75deg;\ \n i76: 76deg;\ \n i77: 77deg;\ \n i78: 78deg;\ \n i79: 79deg;\ \n i80: 80deg;\ \n i81: 81deg;\ \n i82: 82deg;\ \n i83: 83deg;\ \n i84: 84deg;\ \n i85: 85deg;\ \n i86: 86deg;\ \n i87: 87deg;\ \n i88: 88deg;\ \n i89: 89deg;\ \n i90: 90deg;\ \n i91: 91deg;\ \n i92: 92deg;\ \n i93: 93deg;\ \n i94: 94deg;\ \n i95: 95deg;\ \n i96: 96deg;\ \n i97: 97deg;\ \n i98: 98deg;\ \n i99: 99deg;\ \n i100: 100deg;\ \n i101: 101deg;\ \n i102: 102deg;\ \n i103: 103deg;\ \n i104: 104deg;\ \n i105: 105deg;\ \n i106: 106deg;\ \n i107: 107deg;\ \n i108: 108deg;\ \n i109: 109deg;\ \n i110: 110deg;\ \n i111: 111deg;\ \n i112: 112deg;\ \n i113: 113deg;\ \n i114: 114deg;\ \n i115: 115deg;\ \n i116: 116deg;\ \n i117: 117deg;\ \n i118: 118deg;\ \n i119: 119deg;\ \n i120: 120deg;\ \n i121: 121deg;\ \n i122: 122deg;\ \n i123: 123deg;\ \n i124: 124deg;\ \n i125: 125deg;\ \n i126: 126deg;\ \n i127: 127deg;\ \n i128: 128deg;\ \n i129: 129deg;\ \n i130: 130deg;\ \n i131: 131deg;\ \n i132: 132deg;\ \n i133: 133deg;\ \n i134: 134deg;\ \n i135: 135deg;\ \n i136: 136deg;\ \n i137: 137deg;\ \n i138: 138deg;\ \n i139: 139deg;\ \n i140: 140deg;\ \n i141: 141deg;\ \n i142: 142deg;\ \n i143: 143deg;\ \n i144: 144deg;\ \n i145: 145deg;\ \n i146: 146deg;\ \n i147: 147deg;\ \n i148: 148deg;\ \n i149: 149deg;\ \n i150: 150deg;\ \n i151: 151deg;\ \n i152: 152deg;\ \n i153: 153deg;\ \n i154: 154deg;\ \n i155: 155deg;\ \n i156: 156deg;\ \n i157: 157deg;\ \n i158: 158deg;\ \n i159: 159deg;\ \n i160: 160deg;\ \n i161: 161deg;\ \n i162: 162deg;\ \n i163: 163deg;\ \n i164: 164deg;\ \n i165: 165deg;\ \n i166: 166deg;\ \n i167: 167deg;\ \n i168: 168deg;\ \n i169: 169deg;\ \n i170: 170deg;\ \n i171: 171deg;\ \n i172: 172deg;\ \n i173: 173deg;\ \n i174: 174deg;\ \n i175: 175deg;\ \n i176: 176deg;\ \n i177: 177deg;\ \n i178: 178deg;\ \n i179: 179deg;\ \n i180: 180deg;\ \n i181: 181deg;\ \n i182: 182deg;\ \n i183: 183deg;\ \n i184: 184deg;\ \n i185: 185deg;\ \n i186: 186deg;\ \n i187: 187deg;\ \n i188: 188deg;\ \n i189: 189deg;\ \n i190: 190deg;\ \n i191: 191deg;\ \n i192: 192deg;\ \n i193: 193deg;\ \n i194: 194deg;\ \n i195: 195deg;\ \n i196: 196deg;\ \n i197: 197deg;\ \n i198: 198deg;\ \n i199: 199deg;\ \n i200: 200deg;\ \n i201: 201deg;\ \n i202: 202deg;\ \n i203: 203deg;\ \n i204: 204deg;\ \n i205: 205deg;\ \n i206: 206deg;\ \n i207: 207deg;\ \n i208: 208deg;\ \n i209: 209deg;\ \n i210: 210deg;\ \n i211: 211deg;\ \n i212: 212deg;\ \n i213: 213deg;\ \n i214: 214deg;\ \n i215: 215deg;\ \n i216: 216deg;\ \n i217: 217deg;\ \n i218: 218deg;\ \n i219: 219deg;\ \n i220: 220deg;\ \n i221: 221deg;\ \n i222: 222deg;\ \n i223: 223deg;\ \n i224: 224deg;\ \n i225: 225deg;\ \n i226: 226deg;\ \n i227: 227deg;\ \n i228: 228deg;\ \n i229: 229deg;\ \n i230: 230deg;\ \n i231: 231deg;\ \n i232: 232deg;\ \n i233: 233deg;\ \n i234: 234deg;\ \n i235: 235deg;\ \n i236: 236deg;\ \n i237: 237deg;\ \n i238: 238deg;\ \n i239: 239deg;\ \n i240: 240deg;\ \n i241: 241deg;\ \n i242: 242deg;\ \n i243: 243deg;\ \n i244: 244deg;\ \n i245: 245deg;\ \n i246: 246deg;\ \n i247: 247deg;\ \n i248: 248deg;\ \n i249: 249deg;\ \n i250: 250deg;\ \n i251: 251deg;\ \n i252: 252deg;\ \n i253: 253deg;\ \n i254: 254deg;\ \n i255: 255deg;\ \n i256: 256deg;\ \n i257: 257deg;\ \n i258: 258deg;\ \n i259: 259deg;\ \n i260: 260deg;\ \n i261: 261deg;\ \n i262: 262deg;\ \n i263: 263deg;\ \n i264: 264deg;\ \n i265: 265deg;\ \n i266: 266deg;\ \n i267: 267deg;\ \n i268: 268deg;\ \n i269: 269deg;\ \n i270: 270deg;\ \n i271: 271deg;\ \n i272: 272deg;\ \n i273: 273deg;\ \n i274: 274deg;\ \n i275: 275deg;\ \n i276: 276deg;\ \n i277: 277deg;\ \n i278: 278deg;\ \n i279: 279deg;\ \n i280: 280deg;\ \n i281: 281deg;\ \n i282: 282deg;\ \n i283: 283deg;\ \n i284: 284deg;\ \n i285: 285deg;\ \n i286: 286deg;\ \n i287: 287deg;\ \n i288: 288deg;\ \n i289: 289deg;\ \n i290: 290deg;\ \n i291: 291deg;\ \n i292: 292deg;\ \n i293: 293deg;\ \n i294: 294deg;\ \n i295: 295deg;\ \n i296: 296deg;\ \n i297: 297deg;\ \n i298: 298deg;\ \n i299: 299deg;\ \n i300: 300deg;\ \n i301: 301deg;\ \n i302: 302deg;\ \n i303: 303deg;\ \n i304: 304deg;\ \n i305: 305deg;\ \n i306: 306deg;\ \n i307: 307deg;\ \n i308: 308deg;\ \n i309: 309deg;\ \n i310: 310deg;\ \n i311: 311deg;\ \n i312: 312deg;\ \n i313: 313deg;\ \n i314: 314deg;\ \n i315: 315deg;\ \n i316: 316deg;\ \n i317: 317deg;\ \n i318: 318deg;\ \n i319: 319deg;\ \n i320: 320deg;\ \n i321: 321deg;\ \n i322: 322deg;\ \n i323: 323deg;\ \n i324: 324deg;\ \n i325: 325deg;\ \n i326: 326deg;\ \n i327: 327deg;\ \n i328: 328deg;\ \n i329: 329deg;\ \n i330: 330deg;\ \n i331: 331deg;\ \n i332: 332deg;\ \n i333: 333deg;\ \n i334: 334deg;\ \n i335: 335deg;\ \n i336: 336deg;\ \n i337: 337deg;\ \n i338: 338deg;\ \n i339: 339deg;\ \n i340: 340deg;\ \n i341: 341deg;\ \n i342: 342deg;\ \n i343: 343deg;\ \n i344: 344deg;\ \n i345: 345deg;\ \n i346: 346deg;\ \n i347: 347deg;\ \n i348: 348deg;\ \n i349: 349deg;\ \n i350: 350deg;\ \n i351: 351deg;\ \n i352: 352deg;\ \n i353: 353deg;\ \n i354: 354deg;\ \n i355: 355deg;\ \n i356: 356deg;\ \n i357: 357deg;\ \n i358: 358deg;\ \n i359: 359deg;\ \n i360: 0deg;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1133/000077500000000000000000000000001474765622100243655ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1133/mod.rs000066400000000000000000000003141474765622100255100ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1133" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1133") } mod normal; mod vararg; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1133/normal.rs000066400000000000000000000016301474765622100262230ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1133/normal.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("normal") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:meta\";\ \n@function foo($map) {\ \n @return $map;\ \n}\n\ \na {\ \n $map: foo((this: is, my: map));\ \n @each $k, $v in $map {\ \n #{$k}: $v;\ \n }\ \n}\n\ \nb {\ \n $map: meta.call(\"foo\", (this: is, my: map));\ \n @each $k, $v in $map {\ \n #{$k}: $v;\ \n }\ \n}\n"), "a {\ \n this: is;\ \n my: map;\ \n}\ \nb {\ \n this: is;\ \n my: map;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1133/vararg.rs000066400000000000000000000016401474765622100262160ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1133/vararg.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("vararg") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:meta\";\ \n@function foo($this, $my) {\ \n @return (this: $this, my: $my);\ \n}\n\ \na {\ \n $map: foo((this: is, my: map)...);\ \n @each $k, $v in $map {\ \n #{$k}: $v;\ \n }\ \n}\n\ \nb {\ \n $map: meta.call(\"foo\", (this: is, my: map)...);\ \n @each $k, $v in $map {\ \n #{$k}: $v;\ \n }\ \n}\n"), "a {\ \n this: is;\ \n my: map;\ \n}\ \nb {\ \n this: is;\ \n my: map;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1153.rs000066400000000000000000000007121474765622100247350ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1153.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1153") } #[test] fn test() { assert_eq!( runner().ok("/* precision: 0 */\ \n$foo: 123px;\ \nfoo {\ \n bar: $foo;\ \n}"), "/* precision: 0 */\ \nfoo {\ \n bar: 123px;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1162.rs000066400000000000000000000005671474765622100247450ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1162.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1162") } #[test] fn test() { assert_eq!( runner().ok("div {\ \n content: #{0/0} a;\ \n}"), "div {\ \n content: 0/0 a;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1163.rs000066400000000000000000000006351474765622100247420ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1163.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1163") } #[test] fn test() { assert_eq!( runner().ok("div {\ \n content: (((92px * 12) / 13px) * 1em) + 22em;\ \n}"), "div {\ \n content: 106.9230769231em;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1167.rs000066400000000000000000000005521474765622100247440ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1167.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1167") } #[test] fn test() { assert_eq!( runner().ok("a {\ \n b: 3s + 101ms;\ \n}"), "a {\ \n b: 3.101s;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1168.rs000066400000000000000000000007631474765622100247510ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1168.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1168") } #[test] fn test() { assert_eq!( runner().ok("$namespace: \'test-\';\ \n$column: 1;\n\ \n.#{$namespace}#{$column}\\/#{$column} {\ \n width: 100% !important;\ \n}"), ".test-1\\/1 {\ \n width: 100% !important;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1169/000077500000000000000000000000001474765622100243765ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1169/error/000077500000000000000000000000001474765622100255275ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1169/error/color.rs000066400000000000000000000013771474765622100272230ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1169/error/color.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("color") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "@use \"sass:meta\";\n\ \n$map: (\ \n red: \'foo\',\ \n red: \'bar\',\ \n);\n\ \n.foo {\ \n content: meta.inspect($map);\ \n}" ), "Error: Duplicate key.\ \n ,\ \n4 | red: \'foo\',\ \n | === first key\ \n5 | red: \'bar\',\ \n | ^^^ second key\ \n \'\ \n input.scss 5:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1169/error/functioncall.rs000066400000000000000000000016361474765622100305640ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1169/error/functioncall.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("functioncall") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "@use \"sass:meta\";\n\ \n@function fncall($void) {\ \n @return \"key\";\ \n}\n\ \n$map: (\ \n fncall(1+2): \'foo\',\ \n fncall(1+2): \'bar\',\ \n);\n\ \n.foo {\ \n content: meta.inspect($map);\ \n}" ), "Error: Duplicate key.\ \n ,\ \n8 | fncall(1+2): \'foo\',\ \n | =========== first key\ \n9 | fncall(1+2): \'bar\',\ \n | ^^^^^^^^^^^ second key\ \n \'\ \n input.scss 9:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1169/error/interpolate.rs000066400000000000000000000014611474765622100304250ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1169/error/interpolate.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("interpolate") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "@use \"sass:meta\";\n\ \n$map: (\ \n \'red\': \'bar\',\ \n #{re}#{\'d\'}: \'baz\',\ \n);\n\ \n.foo {\ \n content: meta.inspect($map);\ \n}" ), "Error: Duplicate key.\ \n ,\ \n4 | \'red\': \'bar\',\ \n | ===== first key\ \n5 | #{re}#{\'d\'}: \'baz\',\ \n | ^^^^^^^^^^^ second key\ \n \'\ \n input.scss 5:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1169/error/mod.rs000066400000000000000000000003611474765622100266540ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1169/error" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("error") } mod color; mod functioncall; mod interpolate; mod simple; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1169/error/simple.rs000066400000000000000000000010711474765622100273650ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1169/error/simple.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("simple") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:meta\";\n\ \n$map: (\ \n red: \'bar\',\ \n #{red}: \'baz\',\ \n);\n\ \n.foo {\ \n content: meta.inspect($map);\ \n}"), ".foo {\ \n content: (red: \"bar\", red: \"baz\");\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1169/functioncall.rs000066400000000000000000000013531474765622100274270ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1169/functioncall.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("functioncall") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:meta\";\n\ \n$count: 0;\n\ \n@function counter() {\ \n $count: $count + 1 !global;\ \n @return $count;\ \n}\n\ \n$map: (\ \n counter(): \'bar\',\ \n counter(): \'foo\',\ \n);\n\ \n.foo {\ \n content: meta.inspect($map);\ \n}"), ".foo {\ \n content: (1: \"bar\", 2: \"foo\");\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1169/interpolated.rs000066400000000000000000000032341474765622100274400ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1169/interpolated.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("interpolated") } #[test] fn test() { assert_eq!( runner().ok( "@use \"sass:map\";\ \n@use \"sass:meta\";\n\ \n$map1: ( red: \'literal\', transparent: \'literal\' );\ \n$map2: ( \'red\': \'quoted\', transparent: \'quoted\' );\ \n$map3: ( #{re}#{d}: \'interpolated\', #{trans}#{parent}: \'quoted\' );\n\ \nfoo {\ \n content: meta.inspect($map1);\ \n content: meta.inspect($map2);\ \n content: meta.inspect($map3);\ \n}\n\ \n$merge1: map.merge($map1, $map2);\ \n$merge2: map.merge($map1, $map3);\ \n$merge3: map.merge($map2, $map3);\n\ \nbar {\ \n content: meta.inspect($merge1);\ \n content: meta.inspect($merge2);\ \n content: meta.inspect($merge3);\ \n}" ), "foo {\ \n content: (red: \"literal\", transparent: \"literal\");\ \n content: (\"red\": \"quoted\", transparent: \"quoted\");\ \n content: (red: \"interpolated\", transparent: \"quoted\");\ \n}\ \nbar {\ \n content: (red: \"literal\", transparent: \"quoted\", \"red\": \"quoted\");\ \n content: (red: \"literal\", transparent: \"literal\", red: \"interpolated\", transparent: \"quoted\");\ \n content: (\"red\": \"interpolated\", transparent: \"quoted\", transparent: \"quoted\");\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1169/mod.rs000066400000000000000000000003611474765622100255230ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1169" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1169") } mod error; mod functioncall; mod interpolated; mod simple; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1169/simple.rs000066400000000000000000000014221474765622100262340ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1169/simple.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("simple") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:meta\";\n\ \n$map1: (\ \n red: \'bar\',\ \n \'red\': \'foo\',\ \n);\n\ \n$map2: (\ \n red: \'bar\',\ \n \'red\': #{red},\ \n);\n\ \n.foo {\ \n content: meta.inspect($map1);\ \n content: meta.inspect($map2);\ \n}"), ".foo {\ \n content: (red: \"bar\", \"red\": \"foo\");\ \n content: (red: \"bar\", \"red\": red);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1170/000077500000000000000000000000001474765622100243665ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1170/eval.rs000066400000000000000000000007061474765622100256660ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1170/eval.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("eval") } #[test] fn test() { assert_eq!( runner().ok("el {\ \n @if ((& + \'\') == \'el\') {\ \n content: \"It works!\";\ \n }\ \n}"), "el {\ \n content: \"It works!\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1170/mod.rs000066400000000000000000000003111474765622100255060ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1170" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1170") } mod eval; mod parse; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1170/parse.rs000066400000000000000000000007061474765622100260510ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1170/parse.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("parse") } #[test] fn test() { assert_eq!( runner().ok("el {\ \n @if (& + \'\' == \'el\') {\ \n content: \"It works!\";\ \n }\ \n}"), "el {\ \n content: \"It works!\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1171.rs000066400000000000000000000016151474765622100247400ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1171.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1171") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:list\";\ \n@function foo($initial, $args...) {\ \n $args: list.append($args, 3);\n\ \n @return bar($initial, $args...);\ \n}\n\ \n@function bar($args...) {\ \n @return list.length($args);\ \n}\n\ \n@function baz($initial, $args...) {\ \n $args: list.append($args, 3);\n\ \n @return list.nth($args, 1);\ \n}\n\ \n.test {\ \n foo: foo(1, 2);\ \n baz: baz(1, 2);\ \n}"), ".test {\ \n foo: 3;\ \n baz: 2;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1178.rs000066400000000000000000000012621474765622100247450ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1178.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1178") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:meta\";\n\ \n$foo: ((4, 5), 6, (7 8) 9);\n\ \nbar {\ \n a: $foo;\ \n f: 1 2 3 + $foo;\ \n b: 1, 2, 3 + (2 ($foo));\ \n x: meta.inspect($foo);\ \n}\n"), "bar {\ \n a: 4, 5, 6, 7 8 9;\ \n f: 1 2 34, 5, 6, 7 8 9;\ \n b: 1, 2, 32 4, 5, 6, 7 8 9;\ \n x: (4, 5), 6, (7 8) 9;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1187.rs000066400000000000000000000014671474765622100247540ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1187.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1187") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "@use \"sass:meta\";\n\ \n$a: \'foo\';\ \n$b: \'foo\';\ \n$map: (\ \n $a: 1,\ \n $b: 2\ \n);\n\ \n.foo {\ \n content: $a == $b;\ \n content: meta.inspect($map);\ \n}" ), "Error: Duplicate key.\ \n ,\ \n6 | $a: 1,\ \n | == first key\ \n7 | $b: 2\ \n | ^^ second key\ \n \'\ \n input.scss 7:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1188.rs000066400000000000000000000015301474765622100247440ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1188.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1188") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok( "$columns: 4;\ \n$context: 120px;\ \n$name-multiplicator: 2;\ \nfoo {\ \n *width: expression((this.parentNode.clientWidth/#{$context}*#{($columns / $name-multiplicator)} - parseInt(this.currentStyle[\'paddingLeft\']) - parseInt(this.currentStyle[\'paddingRight\'])) + \'px\');\ \n}" ), "foo {\ \n *width: expression((this.parentNode.clientWidth/120px*2 - parseInt(this.currentStyle[\"paddingLeft\"]) - parseInt(this.currentStyle[\"paddingRight\"])) + \"px\");\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1192.rs000066400000000000000000000025541474765622100247460ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1192.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1192") } #[test] fn test() { assert_eq!( runner().ok( "@use \"sass:meta\";\n\ \n$keyword: foobar;\n\ \n@mixin test($arglist...){\ \n $map: meta.keywords($arglist);\ \n /*#{meta.inspect($map)}*/\ \n /*#{meta.inspect($arglist)}*/\ \n}\n\ \n// Works\ \n@include test(foo, bar, baz);\ \n// Ruby Sass: /*foo, bar, baz*/\ \n// LibSass : /*foo, bar, baz*/\n\ \n// LibSass does not inspect as ()\ \n@include test;\ \n// Ruby Sass: /*()*/\ \n// LibSass : /**/\n\ \n// Ruby Sass throws error – LibSass shows keywords in arglist\ \n// (keywords should not show in arglist – see below)\ \n@include test(foo, bar, baz, $keyword: keyword);\ \n// Ruby Sass: \"Mixin test1 doesn\'t have an argument named $keyword.\"\ \n// LibSass : /*foo, bar, baz, $keyword: keyword*/" ), "/*()*/\ \n/*foo, bar, baz*/\ \n/*()*/\ \n/*()*/\ \n/*(keyword: keyword)*/\ \n/*foo, bar, baz*/\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1206.rs000066400000000000000000000007331474765622100247370ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1206.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1206") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n bar: #{0/0};\ \n bar: #{0/1};\ \n bar: #{1/2};\ \n}\n"), "foo {\ \n bar: 0/0;\ \n bar: 0/1;\ \n bar: 1/2;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1207.rs000066400000000000000000000012161474765622100247350ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1207.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1207") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:string\";\ \n@function test($pos) {\ \n @return test-#{$pos};\ \n}\n\ \n.foo {\ \n content: test(string.slice(\'scale-0\', 7)); // Nope\ \n content: test-#{string.slice(\'scale-0\', 7)}; // Yep\ \n}"), ".foo {\ \n content: test-0;\ \n content: test-0;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1208.rs000066400000000000000000000007121474765622100247360ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1208.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1208") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n &.bar, /* */\ \n &.baz {\ \n color: red;\ \n }\ \n}\n"), "foo.bar, foo.baz {\ \n color: red;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1210/000077500000000000000000000000001474765622100243615ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1210/ampersand.rs000066400000000000000000000040041474765622100266770ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1210/ampersand.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("ampersand") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n @at-root {\ \n & {\ \n color: blue;\ \n }\n\ \n &--modifier {\ \n color: red;\ \n }\ \n }\ \n}\n\ \nfoo {\ \n color: blue;\n\ \n @at-root {\ \n & bar {\ \n color: red;\ \n }\ \n }\ \n}\n\ \nfoo {\ \n color: blue;\n\ \n @at-root {\ \n bar & {\ \n color: red;\ \n }\ \n }\ \n}\n\ \nfoo {\ \n color: blue;\n\ \n @at-root {\ \n bar {\ \n & baz {\ \n color: red;\ \n }\ \n }\ \n }\ \n}\n\ \nfoo {\ \n @at-root bar & {\ \n color: red;\n\ \n & baz {\ \n color: blue;\ \n }\ \n }\ \n}\n"), "foo {\ \n color: blue;\ \n}\ \nfoo--modifier {\ \n color: red;\ \n}\ \nfoo {\ \n color: blue;\ \n}\ \nfoo bar {\ \n color: red;\ \n}\ \nfoo {\ \n color: blue;\ \n}\ \nbar foo {\ \n color: red;\ \n}\ \nfoo {\ \n color: blue;\ \n}\ \nbar baz {\ \n color: red;\ \n}\ \nbar foo {\ \n color: red;\ \n}\ \nbar foo baz {\ \n color: blue;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1210/basic.rs000066400000000000000000000030171474765622100260110ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1210/basic.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("basic") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n color: blue;\n\ \n @at-root {\ \n bar {\ \n color: red;\ \n }\ \n }\ \n}\n\ \nfoo {\ \n color: blue;\n\ \n @at-root bar {\ \n color: red;\ \n }\ \n}\n\ \nfoo {\ \n color: blue;\n\ \n @at-root bar {\ \n baz {\ \n color: red;\ \n }\ \n }\ \n}\n\ \nfoo {\ \n color: blue;\n\ \n @at-root {\ \n bar {\ \n baz {\ \n color: red;\ \n }\ \n }\ \n }\ \n}\n\n"), "foo {\ \n color: blue;\ \n}\ \nbar {\ \n color: red;\ \n}\ \nfoo {\ \n color: blue;\ \n}\ \nbar {\ \n color: red;\ \n}\ \nfoo {\ \n color: blue;\ \n}\ \nbar baz {\ \n color: red;\ \n}\ \nfoo {\ \n color: blue;\ \n}\ \nbar baz {\ \n color: red;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1210/extend.rs000066400000000000000000000025211474765622100262160ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1210/extend.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("extend") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("foo {\ \n @at-root {\ \n %placeholder {\ \n color: red;\ \n }\ \n }\n\ \n baz {\ \n @at-root {\ \n %other-placeholder {\ \n color: blue;\ \n }\ \n }\ \n }\n\ \n %ampersand-placeholder & {\ \n color: green;\ \n }\n\ \n @at-root {\ \n qux {\ \n @extend %ampersand-placeholder;\ \n }\ \n }\ \n}\n\ \nbar {\ \n @extend %placeholder;\ \n}\n\ \nbaz {\ \n @extend %other-placeholder;\ \n}\n\ \nbam {\ \n @extend %ampersand-placeholder;\ \n}\n"), "bar {\ \n color: red;\ \n}\ \nbaz {\ \n color: blue;\ \n}\ \nbam foo, qux foo {\ \n color: green;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1210/keyframes.rs000066400000000000000000000020671474765622100267220ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1210/keyframes.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("keyframes") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n color: red;\n\ \n @at-root {\ \n @keyframes animation {\ \n to { color: red; }\ \n }\ \n }\n\ \n bar {\ \n color: blue;\n\ \n @at-root {\ \n @keyframes other-animation {\ \n to { color: blue; }\ \n }\ \n }\ \n }\ \n}\n"), "foo {\ \n color: red;\ \n}\ \n@keyframes animation {\ \n to {\ \n color: red;\ \n }\ \n}\ \nfoo bar {\ \n color: blue;\ \n}\ \n@keyframes other-animation {\ \n to {\ \n color: blue;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1210/media.rs000066400000000000000000000015021474765622100260040ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1210/media.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("media") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n @at-root {\ \n @media print {\ \n bar {\ \n color: red;\ \n }\ \n }\n\ \n baz {\ \n @media speech {\ \n color: blue;\ \n }\ \n }\ \n }\ \n}\n"), "@media print {\ \n bar {\ \n color: red;\ \n }\ \n}\ \n@media speech {\ \n baz {\ \n color: blue;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1210/mod.rs000066400000000000000000000004271474765622100255110ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1210" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1210") } mod ampersand; mod basic; mod extend; mod keyframes; mod media; mod nested; mod with_without; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1210/nested.rs000066400000000000000000000021731474765622100262140ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1210/nested.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("nested") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n color: blue;\n\ \n baz {\ \n color: purple;\n\ \n @at-root {\ \n bar {\ \n color: red;\ \n }\ \n }\ \n }\ \n}\n\ \nfoo {\ \n color: blue;\n\ \n baz {\ \n color: purple;\n\ \n @at-root bar {\ \n color: red;\ \n }\ \n }\ \n}\n"), "foo {\ \n color: blue;\ \n}\ \nfoo baz {\ \n color: purple;\ \n}\ \nbar {\ \n color: red;\ \n}\ \nfoo {\ \n color: blue;\ \n}\ \nfoo baz {\ \n color: purple;\ \n}\ \nbar {\ \n color: red;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1210/with_without.rs000066400000000000000000000321021474765622100274630ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1210/with_without.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("with_without") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("// Unquoted\n\ \n@media (min-width: 1337px) {\ \n .foo {\ \n content: baz;\ \n }\n\ \n @at-root (without: media) {\ \n .foo {\ \n content: bar;\ \n }\ \n }\ \n}\n\ \n@media (min-width: 1337px) {\ \n .foo {\ \n content: baz;\ \n }\n\ \n @at-root (without: all) {\ \n .foo {\ \n content: bar;\ \n }\ \n }\ \n}\n\ \n@supports (color: red) {\ \n .foo {\ \n content: baz;\ \n }\n\ \n @at-root (without: supports) {\ \n .foo {\ \n content: bar;\ \n }\ \n }\ \n}\n\ \n@supports (color: red) {\ \n .foo {\ \n content: baz;\ \n }\n\ \n @at-root (without: all) {\ \n .foo {\ \n content: bar;\ \n }\ \n }\ \n}\n\ \n@media (min-width: 1337px) {\ \n @supports (color: red) {\ \n @at-root {\ \n .foo {\ \n content: bar;\ \n }\ \n }\ \n }\ \n}\n\ \n@media (min-width: 1337px) {\ \n @supports (color: red) {\ \n @at-root (without: all) {\ \n .foo {\ \n content: bar;\ \n }\ \n }\ \n }\ \n}\n\ \n@media (min-width: 1337px) {\ \n @supports (color: red) {\ \n @at-root (without: media supports) {\ \n .foo {\ \n content: bar;\ \n }\ \n }\ \n }\ \n}\n\ \n@media (min-width: 1337px) {\ \n @supports (color: red) {\ \n @at-root (without: media) {\ \n .foo {\ \n content: bar;\ \n }\ \n }\ \n }\ \n}\n\ \n@media (min-width: 1337px) {\ \n @supports (color: red) {\ \n @at-root (without: supports) {\ \n .foo {\ \n content: bar;\ \n }\ \n }\ \n }\ \n}\n\ \n@media (min-width: 1337px) {\ \n @supports (color: red) {\ \n @at-root {\ \n .foo {\ \n content: bar;\ \n }\ \n }\ \n }\ \n}\n\ \n@media (min-width: 1337px) {\ \n @supports (color: red) {\ \n @at-root (with: all) {\ \n .foo {\ \n content: bar;\ \n }\ \n }\ \n }\ \n}\n\ \n@media (min-width: 1337px) {\ \n @supports (color: red) {\ \n @at-root (with: media supports) {\ \n .foo {\ \n content: bar;\ \n }\ \n }\ \n }\ \n}\n\ \n@media (min-width: 1337px) {\ \n @supports (color: red) {\ \n @at-root (with: media) {\ \n .foo {\ \n content: bar;\ \n }\ \n }\ \n }\ \n}\n\ \n@media (min-width: 1337px) {\ \n @supports (color: red) {\ \n @at-root (with: supports) {\ \n .foo {\ \n content: bar;\ \n }\ \n }\ \n }\ \n}\n\ \n// Quoted\n\ \n@media (min-width: 1337px) {\ \n .foo {\ \n content: baz;\ \n }\n\ \n @at-root (without: \"media\") {\ \n .foo {\ \n content: bar;\ \n }\ \n }\ \n}\n\ \n@media (min-width: 1337px) {\ \n .foo {\ \n content: baz;\ \n }\n\ \n @at-root (without: \"all\") {\ \n .foo {\ \n content: bar;\ \n }\ \n }\ \n}\n\ \n@supports (color: red) {\ \n .foo {\ \n content: baz;\ \n }\n\ \n @at-root (without: \"supports\") {\ \n .foo {\ \n content: bar;\ \n }\ \n }\ \n}\n\ \n@supports (color: red) {\ \n .foo {\ \n content: baz;\ \n }\n\ \n @at-root (without: \"all\") {\ \n .foo {\ \n content: bar;\ \n }\ \n }\ \n}\n\ \n@media (min-width: 1337px) {\ \n @supports (color: red) {\ \n @at-root (without: \"all\") {\ \n .foo {\ \n content: bar;\ \n }\ \n }\ \n }\ \n}\n\ \n@media (min-width: 1337px) {\ \n @supports (color: red) {\ \n @at-root (without: \"media\" \"supports\") {\ \n .foo {\ \n content: bar;\ \n }\ \n }\ \n }\ \n}\n\ \n@media (min-width: 1337px) {\ \n @supports (color: red) {\ \n @at-root (without: \"media\" supports) {\ \n .foo {\ \n content: bar;\ \n }\ \n }\ \n }\ \n}\n\ \n@media (min-width: 1337px) {\ \n @supports (color: red) {\ \n @at-root (without: media \"supports\") {\ \n .foo {\ \n content: bar;\ \n }\ \n }\ \n }\ \n}\n\ \n@media (min-width: 1337px) {\ \n @supports (color: red) {\ \n @at-root (without: \"media\") {\ \n .foo {\ \n content: bar;\ \n }\ \n }\ \n }\ \n}\n\ \n@media (min-width: 1337px) {\ \n @supports (color: red) {\ \n @at-root (without: \"supports\") {\ \n .foo {\ \n content: bar;\ \n }\ \n }\ \n }\ \n}\n\ \n@media (min-width: 1337px) {\ \n @supports (color: red) {\ \n @at-root (with: \"all\") {\ \n .foo {\ \n content: bar;\ \n }\ \n }\ \n }\ \n}\n\ \n@media (min-width: 1337px) {\ \n @supports (color: red) {\ \n @at-root (with: \"media\" \"supports\") {\ \n .foo {\ \n content: bar;\ \n }\ \n }\ \n }\ \n}\n\ \n@media (min-width: 1337px) {\ \n @supports (color: red) {\ \n @at-root (with: \"media\" supports) {\ \n .foo {\ \n content: bar;\ \n }\ \n }\ \n }\ \n}\n\ \n@media (min-width: 1337px) {\ \n @supports (color: red) {\ \n @at-root (with: media \"supports\") {\ \n .foo {\ \n content: bar;\ \n }\ \n }\ \n }\ \n}\n\ \n@media (min-width: 1337px) {\ \n @supports (color: red) {\ \n @at-root (with: \"media\") {\ \n .foo {\ \n content: bar;\ \n }\ \n }\ \n }\ \n}\n\ \n@media (min-width: 1337px) {\ \n @supports (color: red) {\ \n @at-root (with: \"supports\") {\ \n .foo {\ \n content: bar;\ \n }\ \n }\ \n }\ \n}\n"), "@media (min-width: 1337px) {\ \n .foo {\ \n content: baz;\ \n }\ \n}\ \n.foo {\ \n content: bar;\ \n}\ \n@media (min-width: 1337px) {\ \n .foo {\ \n content: baz;\ \n }\ \n}\ \n.foo {\ \n content: bar;\ \n}\ \n@supports (color: red) {\ \n .foo {\ \n content: baz;\ \n }\ \n}\ \n.foo {\ \n content: bar;\ \n}\ \n@supports (color: red) {\ \n .foo {\ \n content: baz;\ \n }\ \n}\ \n.foo {\ \n content: bar;\ \n}\ \n@media (min-width: 1337px) {\ \n @supports (color: red) {\ \n .foo {\ \n content: bar;\ \n }\ \n }\ \n}\ \n.foo {\ \n content: bar;\ \n}\ \n.foo {\ \n content: bar;\ \n}\ \n@supports (color: red) {\ \n .foo {\ \n content: bar;\ \n }\ \n}\ \n@media (min-width: 1337px) {\ \n .foo {\ \n content: bar;\ \n }\ \n}\ \n@media (min-width: 1337px) {\ \n @supports (color: red) {\ \n .foo {\ \n content: bar;\ \n }\ \n }\ \n}\ \n@media (min-width: 1337px) {\ \n @supports (color: red) {\ \n .foo {\ \n content: bar;\ \n }\ \n }\ \n}\ \n@media (min-width: 1337px) {\ \n @supports (color: red) {\ \n .foo {\ \n content: bar;\ \n }\ \n }\ \n}\ \n@media (min-width: 1337px) {\ \n .foo {\ \n content: bar;\ \n }\ \n}\ \n@supports (color: red) {\ \n .foo {\ \n content: bar;\ \n }\ \n}\ \n@media (min-width: 1337px) {\ \n .foo {\ \n content: baz;\ \n }\ \n}\ \n.foo {\ \n content: bar;\ \n}\ \n@media (min-width: 1337px) {\ \n .foo {\ \n content: baz;\ \n }\ \n}\ \n.foo {\ \n content: bar;\ \n}\ \n@supports (color: red) {\ \n .foo {\ \n content: baz;\ \n }\ \n}\ \n.foo {\ \n content: bar;\ \n}\ \n@supports (color: red) {\ \n .foo {\ \n content: baz;\ \n }\ \n}\ \n.foo {\ \n content: bar;\ \n}\ \n.foo {\ \n content: bar;\ \n}\ \n.foo {\ \n content: bar;\ \n}\ \n.foo {\ \n content: bar;\ \n}\ \n.foo {\ \n content: bar;\ \n}\ \n@supports (color: red) {\ \n .foo {\ \n content: bar;\ \n }\ \n}\ \n@media (min-width: 1337px) {\ \n .foo {\ \n content: bar;\ \n }\ \n}\ \n@media (min-width: 1337px) {\ \n @supports (color: red) {\ \n .foo {\ \n content: bar;\ \n }\ \n }\ \n}\ \n@media (min-width: 1337px) {\ \n @supports (color: red) {\ \n .foo {\ \n content: bar;\ \n }\ \n }\ \n}\ \n@media (min-width: 1337px) {\ \n @supports (color: red) {\ \n .foo {\ \n content: bar;\ \n }\ \n }\ \n}\ \n@media (min-width: 1337px) {\ \n @supports (color: red) {\ \n .foo {\ \n content: bar;\ \n }\ \n }\ \n}\ \n@media (min-width: 1337px) {\ \n .foo {\ \n content: bar;\ \n }\ \n}\ \n@supports (color: red) {\ \n .foo {\ \n content: bar;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1215.rs000066400000000000000000000022201474765622100247300ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1215.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1215") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n -quotes: \'this-string\' == \'this-string\';\ \n -quotes: this-string == \'this-string\';\ \n -quotes: \'this-string\' == \"this-string\";\ \n -quotes: \'this-string\' == \'\"this-string\"\';\ \n -quotes: \'\"this-string\"\' == \"\'this-string\'\";\ \n foo: this-string;\ \n foo: \'this-string\';\ \n foo: \"this-string\";\ \n foo: \'\"this-string\"\';\ \n foo: \"\'this-string\'\";\ \n}\n"), "foo {\ \n -quotes: true;\ \n -quotes: true;\ \n -quotes: true;\ \n -quotes: false;\ \n -quotes: false;\ \n foo: this-string;\ \n foo: \"this-string\";\ \n foo: \"this-string\";\ \n foo: \'\"this-string\"\';\ \n foo: \"\'this-string\'\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1216.rs000066400000000000000000000007431474765622100247410ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1216.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1216") } #[test] fn test() { assert_eq!( runner().ok("a {\ \n width: 4.0px;\ \n height: 3.00px;\ \n opacity: 1.0;\ \n}\n"), "a {\ \n width: 4px;\ \n height: 3px;\ \n opacity: 1;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1218.rs000066400000000000000000000015521474765622100247420ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1218.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1218") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("$foo: 20px;\ \n@media screen and (\"min-width:#{$foo}\") {\ \n .bar {\ \n width: 12px;\ \n }\ \n}\ \n@media screen and (\"min-width:0\") {\ \n .bar {\ \n width: 12px;\ \n }\ \n}\n"), "@media screen and (min-width:20px) {\ \n .bar {\ \n width: 12px;\ \n }\ \n}\ \n@media screen and (min-width:0) {\ \n .bar {\ \n width: 12px;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1224.rs000066400000000000000000000010471474765622100247360ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1224.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1224") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok("@media all and (max-width: 768px) {\ \n @media only screen {\ \n a { b: c; }\ \n }\ \n}\n"), "@media only screen and (max-width: 768px) {\ \n a {\ \n b: c;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1230.rs000066400000000000000000000007741474765622100247410ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1230.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1230") } #[test] fn test() { assert_eq!( runner().ok("div {\ \n transition-property:\ \n border-color,\ \n box-shadow,\ \n color;\ \n}"), "div {\ \n transition-property: border-color, box-shadow, color;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1231.rs000066400000000000000000000006371474765622100247400ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1231.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1231") } #[test] fn test() { assert_eq!( runner().ok("div::before {\ \n content: #{\"\\\"\"+\\e600+\"\\\"\"};\ \n}"), "div::before {\ \n content: \"\\e600\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1233.rs000066400000000000000000000011461474765622100247360ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1233.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1233") } #[test] fn test() { assert_eq!( runner().ok("@-moz-keyframes animatetoptop /* Firefox */ line 429\ \n{\ \nfrom {width:0%}\ \nto {width:100%}\ \n}"), "@-moz-keyframes animatetoptop /* Firefox */ line 429 {\ \n from {\ \n width: 0%;\ \n }\ \n to {\ \n width: 100%;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1240.rs000066400000000000000000000015061474765622100247340ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1240.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1240") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:list\";\ \n$var: 1;\ \n$list: 2, 3;\ \n$new-list: list.append($var, $list);\ \n$nested-list: $var $list;\ \n@debug($var);\ \n@debug($list);\ \n@debug($new-list);\ \n@debug($nested-list);\ \ndiv {\ \n a: $var;\ \n a: $list;\ \n a: $new-list;\ \n a: $nested-list;\ \n}"), "div {\ \n a: 1;\ \n a: 2, 3;\ \n a: 1 2, 3;\ \n a: 1 2, 3;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1243/000077500000000000000000000000001474765622100243675ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1243/at_rule.rs000066400000000000000000000004141474765622100263670ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1243/at-rule.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("at-rule") } #[test] fn test() { assert_eq!(runner().ok("@foo bar\n"), "@foo bar;\n"); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1243/comma_list.rs000066400000000000000000000004071474765622100270650ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1243/comma-list.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("comma-list") } #[test] fn test() { assert_eq!(runner().ok("$a: 1, 2\n"), ""); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1243/debug.rs000066400000000000000000000004041474765622100260210ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1243/debug.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("debug") } #[test] fn test() { assert_eq!(runner().ok("@debug(\"foo\")\n"), ""); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1243/import.rs000066400000000000000000000004741474765622100262540ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1243/import.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("import") } #[test] fn test() { assert_eq!( runner().ok("@import \"http://foo\"\n"), "@import \"http://foo\";\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1243/include.rs000066400000000000000000000006211474765622100263570ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1243/include.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("include") } #[test] fn test() { assert_eq!( runner().ok("@mixin foo() {\ \n a { b: c; }\ \n}\ \n@include foo\n"), "a {\ \n b: c;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1243/mod.rs000066400000000000000000000004271474765622100255170ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1243" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1243") } mod at_rule; mod comma_list; mod debug; mod import; mod include; mod space_list; mod warning; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1243/space_list.rs000066400000000000000000000004061474765622100270630ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1243/space-list.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("space-list") } #[test] fn test() { assert_eq!(runner().ok("$a: 1 2\n"), ""); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1243/warning.rs000066400000000000000000000004341474765622100264030ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1243/warning.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("warning") } #[test] fn test() { assert_eq!(runner().ok("@warning \"foo\"\n"), "@warning \"foo\";\n"); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1248.rs000066400000000000000000000010501474765622100247360ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1248.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1248") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".a.b .c {\ \n top: 0;\ \n}\ \n.a {\ \n @extend .b;\ \n}\ \n.a .d {\ \n @extend .c;\ \n}\n"), ".a.b .c, .a .c, .a .d {\ \n top: 0;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1251.rs000066400000000000000000000012471474765622100247400ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1251.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1251") } #[test] fn test() { assert_eq!( runner().ok(".foo {\ \n yellow: yellow;\ \n red: red;\ \n blue: blue;\ \n white: white;\ \n black: black;\ \n eval: if(red, yellow, null);\ \n}\n"), ".foo {\ \n yellow: yellow;\ \n red: red;\ \n blue: blue;\ \n white: white;\ \n black: black;\ \n eval: yellow;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1255.rs000066400000000000000000000015141474765622100247410ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1255.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1255") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok( "@use \"sass:list\";\ \n@function double($value) {\ \n @return $value * 2;\ \n}\n\ \n@mixin dummy-bug($args...) {\ \n @for $i from 1 through list.length($args) {\ \n $args: list.set-nth($args, $i, double(list.nth($args, $i)));\ \n }\n\ \n content: $args;\ \n}\n\ \n.foo {\ \n @include dummy-bug(1, 2, 3, 4);\ \n}" ), ".foo {\ \n content: 2, 4, 6, 8;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1257.rs000066400000000000000000000007041474765622100247430ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1257.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1257") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("@use \"sass:color\";\ \n.foo {\ \n color: color.invert(red...);\ \n}"), ".foo {\ \n color: aqua;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1259.rs000066400000000000000000000011121474765622100247370ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1259.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1259") } #[test] fn test() { assert_eq!( runner().ok( "@mixin dummy($a, $b, $c, $d, $e: true) {\ \n content: $a $b $c $d $e;\ \n}\n\ \n.foo {\ \n @include dummy( (\'a\', \'b\', \'c\', \'e\')..., $e: false );\ \n}" ), ".foo {\ \n content: \"a\" \"b\" \"c\" \"e\" false;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1260.rs000066400000000000000000000011631474765622100247350ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1260.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1260") } #[test] fn test() { assert_eq!( runner().ok( "@use \"sass:list\";\ \n$EQ-Selectors: ();\n\ \n.el {\ \n $EQ-Selectors: list.append($EQ-Selectors, &, \'comma\') !global;\ \n}\n\ \nhtml:before {\ \n content: \"#{$EQ-Selectors}\";\ \n}" ), "html:before {\ \n content: \".el\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1263.rs000066400000000000000000000011451474765622100247400ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1263.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1263") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok("foo {\ \n @ap#{pl}y;\ \n @apply(--bar);\ \n @apply ( --bar );\ \n @ap#{pl}y ( --bar , --foo ) ;\ \n}"), "foo {\ \n @apply;\ \n @apply (--bar);\ \n @apply ( --bar );\ \n @apply ( --bar , --foo );\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1266/000077500000000000000000000000001474765622100243745ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1266/max.rs000066400000000000000000000026431474765622100255340ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1266/max.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("max") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "@use \"sass:meta\";\ \n$foo: 1 2 3 blah 4;\ \nfoo {\ \n bar: meta.call(max, $foo...);\ \n}\n" ), "DEPRECATION WARNING [call-string]: Passing a string to call() is deprecated and will be illegal in Dart Sass 2.0.0.\n\ \nRecommendation: call(get-function(max))\n\ \n ,\ \n4 | bar: meta.call(max, $foo...);\ \n | ^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 4:8 root stylesheet\n\ \nDEPRECATION WARNING [global-builtin]: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ \nUse math.max instead.\n\ \nMore info and automated migrator: https://sass-lang.com/d/import\n\ \n ,\ \n4 | bar: meta.call(max, $foo...);\ \n | ^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 4:8 root stylesheet\n\ \nError: blah is not a number.\ \n ,\ \n4 | bar: meta.call(max, $foo...);\ \n | ^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 4:8 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1266/min.rs000066400000000000000000000026431474765622100255320ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1266/min.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("min") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "@use \"sass:meta\";\ \n$foo: 1 2 3 blah 4;\ \nfoo {\ \n bar: meta.call(min, $foo...);\ \n}\n" ), "DEPRECATION WARNING [call-string]: Passing a string to call() is deprecated and will be illegal in Dart Sass 2.0.0.\n\ \nRecommendation: call(get-function(min))\n\ \n ,\ \n4 | bar: meta.call(min, $foo...);\ \n | ^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 4:8 root stylesheet\n\ \nDEPRECATION WARNING [global-builtin]: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ \nUse math.min instead.\n\ \nMore info and automated migrator: https://sass-lang.com/d/import\n\ \n ,\ \n4 | bar: meta.call(min, $foo...);\ \n | ^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 4:8 root stylesheet\n\ \nError: blah is not a number.\ \n ,\ \n4 | bar: meta.call(min, $foo...);\ \n | ^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 4:8 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1266/mod.rs000066400000000000000000000003061474765622100255200ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1266" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1266") } mod max; mod min; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1269.rs000066400000000000000000000013141474765622100247440ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1269.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1269") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:list\";\ \n@use \"sass:meta\";\n\ \n@function push($list, $items...) {\ \n @return list.join($list, $items, $separator: auto);\ \n}\n\ \n.test {\ \n $list: push(1 2 3, 4, 5);\ \n list: meta.inspect($list);\ \n value: list.nth($list, 4);\ \n}"), ".test {\ \n list: 1 2 3 4 5;\ \n value: 4;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1271.rs000066400000000000000000000015231474765622100247370ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1271.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1271") } #[test] fn test() { assert_eq!( runner().ok( "@use \"sass:string\";\ \n$character-code: f102;\n\ \ntest {\n\ \n /* Expected: \"\\f102\" */\n\ \n /* Sass 3.4 */\ \n content: string.unquote(\"\\\"\\\\#{$character-code}\\\"\");\n\ \n /* Sass 3.3 */\ \n content: string.slice(\"\\x\", 1, 1) + $character-code;\n\ \n}" ), "test {\ \n /* Expected: \"\\f102\" */\ \n /* Sass 3.4 */\ \n content: \"\\f102\";\ \n /* Sass 3.3 */\ \n content: \"xf102\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1273.rs000066400000000000000000000006361474765622100247450ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1273.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1273") } #[test] fn test() { assert_eq!( runner().ok("test {\ \n src: url(test.eot#{if(true, \'?#{42}\', \'\')});\ \n}"), "test {\ \n src: url(test.eot?42);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1277.rs000066400000000000000000000007061474765622100247470ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1277.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1277") } #[test] fn test() { assert_eq!( runner().ok("$foo: foo;\ \n$bar: bar;\n\ \n.foo {\ \n foo: foo #{$foo}, bar #{$bar};\ \n}\n"), ".foo {\ \n foo: foo foo, bar bar;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1279.rs000066400000000000000000000016151474765622100247510ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1279.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1279") } #[test] fn test() { assert_eq!( runner().ok( "@use \"sass:string\";\ \n@function noop($string) {\ \n @return $string;\ \n}\n\ \n.foo {\ \n upper: string.to-upper-case(\'f\') + string.slice(\'foo\', 2);\ \n lower: string.to-lower-case(\'f\') + string.slice(\'foo\', 2);\ \n user-upper: string.to-upper-case(\'f\') + noop(\'oo\');\ \n user-lower: string.to-lower-case(\'f\') + noop(\'oo\');\ \n}\n" ), ".foo {\ \n upper: \"Foo\";\ \n lower: \"foo\";\ \n user-upper: \"Foo\";\ \n user-lower: \"foo\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1281.rs000066400000000000000000000013361474765622100247420ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1281.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1281") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:meta\";\ \n$quoted: \"green\";\ \n$unquoted: green;\n\ \n.test {\ \n string: meta.type-of($quoted);\ \n color: meta.type-of($unquoted);\ \n string: meta.type-of(\"green\");\ \n color: meta.type-of(green);\ \n}\n"), ".test {\ \n string: string;\ \n color: color;\ \n string: string;\ \n color: color;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1283.rs000066400000000000000000000010141474765622100247350ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1283.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1283") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:map\";\ \n@use \"sass:meta\";\n\ \n$map: map.merge((1 2: 3), (2 1: 3));\n\ \n.test {\ \n test: meta.inspect($map);\ \n}\n"), ".test {\ \n test: (1 2: 3, 2 1: 3);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1285.rs000066400000000000000000000016701474765622100247470ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1285.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1285") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:color\";\ \n.container {\ \n @for $i from 1 through 3 {\ \n @at-root .box-#{$i} {\ \n color: color.adjust(red,$lightness: -($i * 5%));\ \n }\ \n }\n\ \n // Control\ \n @at-root .outside-child {\ \n background-color: blue;\ \n }\ \n}\n"), ".box-1 {\ \n color: rgb(229.5, 0, 0);\ \n}\ \n.box-2 {\ \n color: #cc0000;\ \n}\ \n.box-3 {\ \n color: rgb(178.5, 0, 0);\ \n}\ \n.outside-child {\ \n background-color: blue;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1294.rs000066400000000000000000000013061474765622100247430ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1294.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1294") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok("/*------------------------------------*\\\ \n #BUTTONS\ \n\\*------------------------------------*/\n\ \nfoo {\ \n display: inline-block; /* [1] */\ \n}\n"), "/*------------------------------------*\\\ \n #BUTTONS\ \n\\*------------------------------------*/\ \nfoo {\ \n display: inline-block; /* [1] */\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1295.rs000066400000000000000000000006661474765622100247540ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1295.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1295") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n $nothing: null;\ \n foo: \"#{$nothing}\' %\' \'#{$nothing}\";\ \n}\n"), "foo {\ \n foo: \"\' %\' \'\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1297.rs000066400000000000000000000007761474765622100247600ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1297.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1297") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".test .testa {\ \n @at-root #{\"%foo\"} {\ \n color: red;\ \n }\ \n @extend %foo;\ \n}\n"), ".test .testa {\ \n color: red;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1298.rs000066400000000000000000000012121474765622100247430ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1298.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1298") } #[test] fn test() { assert_eq!( runner().ok( "@import url(//fonts.googleapis.com/css?family=Roboto:400,500,700,400italic);\ \nhtml {\ \n font-family: roboto, arial, helvetica, sans-serif;\ \n}\n" ), "@import url(//fonts.googleapis.com/css?family=Roboto:400,500,700,400italic);\ \nhtml {\ \n font-family: roboto, arial, helvetica, sans-serif;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1301.rs000066400000000000000000000006611474765622100247330ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1301.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1301") } #[test] fn test() { assert_eq!( runner().ok("$name: \"my-class\";\n\ \n.-#{$name} {\ \n content: \"test\";\ \n}\n"), ".-my-class {\ \n content: \"test\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1303.rs000066400000000000000000000007201474765622100247310ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1303.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1303") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:selector\";\ \n.simple {\ \n a: selector.replace(\'foo.bar\', \'foo\', \'foo[baz]\');\ \n}\n"), ".simple {\ \n a: foo.bar[baz];\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1304.rs000066400000000000000000000012371474765622100247360ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1304.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1304") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n a:&;\ \n > bar {\ \n b:&;\ \n > baz {\ \n c:&;\ \n }\ \n }\ \n}\n"), "foo {\ \n a: foo;\ \n}\ \nfoo > bar {\ \n b: foo > bar;\ \n}\ \nfoo > bar > baz {\ \n c: foo > bar > baz;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1305.rs000066400000000000000000000006751474765622100247440ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1305.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1305") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:meta\";\ \n.foo {\ \n content: meta.call(\'unquote\', \'foo\', ()...);\ \n}\n"), ".foo {\ \n content: foo;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_131.rs000066400000000000000000000006671474765622100246610ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_131.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_131") } #[test] fn test() { assert_eq!( runner().ok("$foo: bar;\r\ \n\r\ \ndiv {\r\ \n content: \"foo #{$foo}\"\r\ \n}"), "div {\ \n content: \"foo bar\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1322.rs000066400000000000000000000015351474765622100247370ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1322.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1322") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok("$foo: 400px;\ \n$bar: \"min-width:400px\";\ \n@import url(foo.css) (min-width:400px);\ \n@import url(foo.css) (min-width:$foo);\ \n@import url(foo.css) (min-width:#{$foo});\ \n@import url(foo.css) ($bar);\ \n@import url(foo.css) (#{$bar});\n"), "@import url(foo.css) (min-width: 400px);\ \n@import url(foo.css) (min-width: 400px);\ \n@import url(foo.css) (min-width: 400px);\ \n@import url(foo.css) (min-width:400px);\ \n@import url(foo.css) (min-width:400px);\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1323.rs000066400000000000000000000011531474765622100247340ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1323.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1323") } #[test] fn test() { assert_eq!( runner().ok( "@import url(foo.css) only screen;\ \n@import url(foo.css) (min-width:400px);\ \n@import url(foo.css) (min-width:400px) and (max-width:599px);\n" ), "@import url(foo.css) only screen;\ \n@import url(foo.css) (min-width: 400px);\ \n@import url(foo.css) (min-width: 400px) and (max-width: 599px);\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1328.rs000066400000000000000000000010131474765622100247340ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1328.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1328") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok("#{bar},\ \n[foo=\"#{bar}\"],\ \n[foo=\"#{bar}\"] {\ \n content: \"foo\";\ \n}\n"), "bar,\ \n[foo=bar],\ \n[foo=bar] {\ \n content: \"foo\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1331.rs000066400000000000000000000010431474765622100247310ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1331.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1331") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:map\";\ \n$m: (foo: 1px, null: 2px, false: 3px, true: 4px);\n\ \n@debug $m;\ \n@debug map.get($m, foo);\ \n@debug map.get($m, null);\ \n@debug map.get($m, false);\ \n@debug map.get($m, true);\n"), "" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1332.rs000066400000000000000000000013321474765622100247330ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1332.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1332") } #[test] fn test() { assert_eq!( runner().ok(".box1 {\ \n color: rgb(20%, 20%, 20%);\ \n}\ \n.box2 {\ \n color: rgb(32, 32, 32);\ \n}\ \n.box3 {\ \n color: rgba(20%, 20%, 20%, 0.7);\ \n}\n"), ".box1 {\ \n color: rgb(51, 51, 51);\ \n}\ \n.box2 {\ \n color: rgb(32, 32, 32);\ \n}\ \n.box3 {\ \n color: rgba(51, 51, 51, 0.7);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1333.rs000066400000000000000000000011101474765622100247260ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1333.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1333") } #[test] fn test() { assert_eq!( runner().ok("@function baz() {\ \n @return \'baz\';\ \n}\n\ \nfoo {\ \n bar: baz()#{\' !important\'};\ \n bar: baz() #{\' !important\'};\ \n}\n\n"), "foo {\ \n bar: \"baz\" !important;\ \n bar: \"baz\" !important;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1336.rs000066400000000000000000000004001474765622100247320ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1336.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1336") } #[test] fn test() { assert_eq!(runner().ok("@debug null;\n"), ""); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1355.rs000066400000000000000000000011511474765622100247370ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1355.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1355") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "@function test() {\ \n @return;\ \n}\n\ \ndiv {\ \n x: type-of(test());\ \n}" ), "Error: Expected expression.\ \n ,\ \n2 | @return;\ \n | ^\ \n \'\ \n input.scss 2:10 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_137.rs000066400000000000000000000012071474765622100246560ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_137.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_137") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".foo {\ \n background-color: lime;\ \n a {\ \n color: white;\ \n }\ \n}\n\ \n.baz {\ \n @extend .foo;\ \n}"), ".foo, .baz {\ \n background-color: lime;\ \n}\ \n.foo a, .baz a {\ \n color: white;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1370.rs000066400000000000000000000020031474765622100247310ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1370.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1370") } #[test] fn test() { assert_eq!( runner().ok("@mixin ico-common($imgUrl){\r\ \n display: inline-block;\r\ \n background: url(i/$imgUrl);\r\ \n background-repeat: no-repeat;\r\ \n}\r\ \n\r\ \n@mixin ico-size($width,$height){\r\ \n width: $width;\r\ \n height: $height;\r\ \n}\r\ \n\r\ \n.test{\r\ \n @include ico-common(\"icon.png\");\r\ \n\r\ \n @include ico-size(100px, 100px);\r\ \n}"), ".test {\ \n display: inline-block;\ \n background: url(i/\"icon.png\");\ \n background-repeat: no-repeat;\ \n width: 100px;\ \n height: 100px;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1376.rs000066400000000000000000000006601474765622100247460ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1376.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1376") } #[test] fn test() { assert_eq!( runner().ok(".div{\ \n $foo: 1, null, 2, null, 3;\n\ \n content: \"#{$foo}\";\ \n}"), ".div {\ \n content: \"1, 2, 3\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1393.rs000066400000000000000000000010251474765622100247410ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1393.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1393") } #[test] fn test() { assert_eq!( runner().ok("div {\ \n back#{ground}: {\ \n imag#{e}: url(foo.png);\ \n pos#{it}ion: 50%;\ \n }\ \n}\n"), "div {\ \n background-image: url(foo.png);\ \n background-position: 50%;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1394.rs000066400000000000000000000006021474765622100247420ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1394.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1394") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n width: \\10 + \\20 \\ ;\ \n}\n"), "foo {\ \n width: \\10 \\ \\ ;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1396.rs000066400000000000000000000007151474765622100247510ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1396.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1396") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n foo: foo\"bar\"#{baz};\ \n foo: foo\"bar\"baz;\ \n}\n"), "foo {\ \n foo: foo \"bar\" baz;\ \n foo: foo \"bar\" baz;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1398.rs000066400000000000000000000007601474765622100247530ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1398.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1398") } #[test] fn test() { assert_eq!( runner().ok("@media screen and (hux: 3/4) {\ \n foo {\ \n bar: baz;\ \n }\ \n}\n"), "@media screen and (hux: 3/4) {\ \n foo {\ \n bar: baz;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1399.rs000066400000000000000000000011021474765622100247430ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1399.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1399") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n foo: 3 - \"bar\";\ \n foo: (3 - \"bar\");\ \n foo: 3 / \"bar\";\ \n foo: (3 / \"bar\");\ \n}\n"), "foo {\ \n foo: 3-\"bar\";\ \n foo: 3-\"bar\";\ \n foo: 3/\"bar\";\ \n foo: 3/\"bar\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1404.rs000066400000000000000000000011751474765622100247400ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1404.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1404") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("@use \"sass:meta\";\ \n.test {\r\ \n color: #aaabbb--1-2-a;\r\ \n color: meta.type-of(#aaabbb--1-2-a);\r\ \n color: meta.type-of(#aaabbb--1-2);\r\ \n}"), ".test {\ \n color: #aaabbb--1-2-a;\ \n color: string;\ \n color: string;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1405.rs000066400000000000000000000055741474765622100247500ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1405.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1405") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok("@use \"sass:list\";\ \n@use \"sass:math\";\ \n@use \"sass:meta\";\ \ndiv {\r\ \n foo: (1a2b3c);\r\ \n\r\ \n length-1: list.length(1a2b3c);\r\ \n\r\ \n unit-1: math.unit(1a2b3c);\r\ \n\r\ \n result-1: 1em-.75em;\r\ \n result-2: 2em-1em;\r\ \n result-3: 2em-0.75em;\r\ \n result-4: 1.5em-1em;\r\ \n result-5: 2em-1.5em;\r\ \n\r\ \n type-1: meta.type-of(1em-.75em);\r\ \n type-2: meta.type-of(2em-1em);\r\ \n type-3: meta.type-of(2em-0.75em);\r\ \n type-4: meta.type-of(1.5em-1em);\r\ \n type-5: meta.type-of(2em-1.5em);\r\ \n type-6: meta.type-of(1a2b3c);\r\ \n\r\ \n test-1: (1-em-2-em);\r\ \n test-1: (1-em - 2-em);\r\ \n\r\ \n test-2: (1-0-em-2-0-em);\r\ \n test-2: (1-0-em - 2-0-em);\r\ \n\r\ \n test-3: (1-A-em-2-A-em);\r\ \n test-3: (1-A-em - 2-A-em);\r\ \n\r\ \n test-4: (1_em--_--e-2_em--_--e);\r\ \n test-4: (1_em--_--e - 2_em--_--e);\r\ \n\r\ \n test-5: (1_em--_--e0-2_em--_--e0);\r\ \n test-5: (1_em--_--e0 - 2_em--_--e0);\r\ \n\r\ \n test-6: (1_em--_--e0__-2_em--_--e0__);\r\ \n test-6: (1_em--_--e0__ - 2_em--_--e0__);\r\ \n\r\ \n test-7: (1\\65 _em--_--e0-2\\65 _em--_--e0);\r\ \n test-7: (1\\65 _em--_--e0 - 2\\65 _em--_--e0);\r\ \n}\r\n"), "div {\ \n foo: 1a2b3c;\ \n length-1: 1;\ \n unit-1: \"a2b3c\";\ \n result-1: 0.25em;\ \n result-2: 1em;\ \n result-3: 1.25em;\ \n result-4: 0.5em;\ \n result-5: 0.5em;\ \n type-1: number;\ \n type-2: number;\ \n type-3: number;\ \n type-4: number;\ \n type-5: number;\ \n type-6: number;\ \n test-1: -1-em;\ \n test-1: -1-em;\ \n test-2: -1-em;\ \n test-2: -1-em;\ \n test-3: -1-A-em;\ \n test-3: -1-A-em;\ \n test-4: -1_em--_--e;\ \n test-4: -1_em--_--e;\ \n test-5: -1_em--_--e0;\ \n test-5: -1_em--_--e0;\ \n test-6: -1_em--_--e0__;\ \n test-6: -1_em--_--e0__;\ \n test-7: -1e_em--_--e0;\ \n test-7: -1e_em--_--e0;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1413.rs000066400000000000000000000060661474765622100247440ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1413.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1413") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:list\";\ \n@use \"sass:meta\";\ \ndiv {\r\ \n foo: \'A\'#{B};\r\ \n foo: #{A}\'B\';\r\ \n foo: \'A\'#{B}\'C\';\r\ \n foo: #{A}\'B\'#{C};\r\ \n foo: A#{B}\'C\';\r\ \n foo: \'A\'#{B}C;\r\ \n foo: #{A}B\'C\';\r\ \n foo: \'A\'#{B}C\'D\';\r\ \n foo: \'A\'B#{C}D\'E\';\r\ \n foo: A\'B\'#{C}D\'E\';\r\ \n foo: #{A}\'B\'C\'D\'\'E\';\r\ \n}\r\ \n\r\ \ndiv {\r\ \n foo: meta.type-of(\'A\'#{B});\r\ \n foo: meta.type-of(#{A}\'B\');\r\ \n foo: meta.type-of(\'A\'#{B}\'C\');\r\ \n foo: meta.type-of(#{A}\'B\'#{C});\r\ \n foo: meta.type-of(A#{B}\'C\');\r\ \n foo: meta.type-of(\'A\'#{B}C);\r\ \n foo: meta.type-of(#{A}B\'C\');\r\ \n foo: meta.type-of(\'A\'#{B}C\'D\');\r\ \n foo: meta.type-of(\'A\'B#{C}D\'E\');\r\ \n foo: meta.type-of(A\'B\'#{C}D\'E\');\r\ \n foo: meta.type-of(#{A}\'B\'C\'D\'\'E\');\r\ \n}\r\ \n\r\ \ndiv {\r\ \n foo: list.length(\'A\'#{B});\r\ \n foo: list.length(#{A}\'B\');\r\ \n foo: list.length(\'A\'#{B}\'C\');\r\ \n foo: list.length(#{A}\'B\'#{C});\r\ \n foo: list.length(A#{B}\'C\');\r\ \n foo: list.length(\'A\'#{B}C);\r\ \n foo: list.length(#{A}B\'C\');\r\ \n foo: list.length(\'A\'#{B}C\'D\');\r\ \n foo: list.length(\'A\'B#{C}D\'E\');\r\ \n foo: list.length(A\'B\'#{C}D\'E\');\r\ \n foo: list.length(#{A}\'B\'C\'D\'\'E\');\r\ \n}"), "div {\ \n foo: \"A\" B;\ \n foo: A \"B\";\ \n foo: \"A\" B \"C\";\ \n foo: A \"B\" C;\ \n foo: AB \"C\";\ \n foo: \"A\" BC;\ \n foo: AB \"C\";\ \n foo: \"A\" BC \"D\";\ \n foo: \"A\" BCD \"E\";\ \n foo: A \"B\" CD \"E\";\ \n foo: A \"B\" C \"D\" \"E\";\ \n}\ \ndiv {\ \n foo: list;\ \n foo: list;\ \n foo: list;\ \n foo: list;\ \n foo: list;\ \n foo: list;\ \n foo: list;\ \n foo: list;\ \n foo: list;\ \n foo: list;\ \n foo: list;\ \n}\ \ndiv {\ \n foo: 2;\ \n foo: 2;\ \n foo: 3;\ \n foo: 3;\ \n foo: 2;\ \n foo: 2;\ \n foo: 2;\ \n foo: 3;\ \n foo: 3;\ \n foo: 4;\ \n foo: 5;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1415/000077500000000000000000000000001474765622100243705ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1415/direct.rs000066400000000000000000000005601474765622100262110ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1415/direct.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("direct") } #[test] fn test() { assert_eq!( runner().ok("@if & {\ \n foo {\ \n foo: bar;\ \n }\ \n}\n"), "" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1415/mixin.rs000066400000000000000000000017741474765622100260730ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1415/mixin.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("mixin") } #[test] fn test() { assert_eq!( runner().ok("@mixin prepend-foo {\ \n $parent: &;\n\ \n @if $parent {\ \n .foo & {\ \n @content;\ \n }\ \n } @else {\ \n .foo {\ \n @content;\ \n }\ \n }\ \n}\n\ \n@include prepend-foo {\ \n bar {\ \n color: red;\ \n }\ \n}\n\ \nbar {\ \n @include prepend-foo {\ \n baz {\ \n color: red;\ \n }\ \n }\ \n}\n"), ".foo bar {\ \n color: red;\ \n}\ \n.foo bar baz {\ \n color: red;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1415/mod.rs000066400000000000000000000003321474765622100255130ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1415" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1415") } mod direct; mod mixin; mod variable; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1415/variable.rs000066400000000000000000000006301474765622100265220ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1415/variable.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("variable") } #[test] fn test() { assert_eq!( runner().ok("$parent: &;\n\ \n@if $parent {\ \n foo {\ \n foo: bar;\ \n }\ \n}\n"), "" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1417.rs000066400000000000000000000016741474765622100247500ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1417.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1417") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok("@use \"sass:math\";\ \n@use \"sass:meta\";\ \n@function foo($a, $b) {\ \n @return ($a $b);\ \n}\n\ \nfoo {\ \n foo: 1px / 2px;\ \n foo: 1px / math.round(1.5);\ \n foo: foo(1px / 2px, 1px / math.round(1.5));\ \n foo: missing(1px / 2px, 1px / math.round(1.5));\ \n foo: meta.call(missing, 1px / 2px, 1px / math.round(1.5));\ \n}\n"), "foo {\ \n foo: 1px/2px;\ \n foo: 0.5px;\ \n foo: 0.5 0.5px;\ \n foo: missing(1px/2px, 0.5px);\ \n foo: missing(0.5, 0.5px);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1418/000077500000000000000000000000001474765622100243735ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1418/dynamic.rs000066400000000000000000000020451474765622100263660ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1418/dynamic.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("dynamic") } #[test] #[ignore] // missing error fn test() { assert_eq!( runner().err( "@use \"sass:meta\";\ \nfoo {\ \n color: meta.call(missing, $a: b);\ \n}\n" ), "DEPRECATION WARNING [call-string]: Passing a string to call() is deprecated and will be illegal in Dart Sass 2.0.0.\n\ \nRecommendation: call(get-function(missing))\n\ \n ,\ \n3 | color: meta.call(missing, $a: b);\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 3:12 root stylesheet\n\ \nError: Plain CSS functions don\'t support keyword arguments.\ \n ,\ \n3 | color: meta.call(missing, $a: b);\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 3:12 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1418/mod.rs000066400000000000000000000003221474765622100255150ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1418" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1418") } mod dynamic; mod test_static; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1418/test_static.rs000066400000000000000000000011431474765622100272660ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1418/static.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("static") } #[test] #[ignore] // missing error fn test() { assert_eq!( runner().err( "foo {\ \n color: missing($a: b);\ \n}\n" ), "Error: Plain CSS functions don\'t support keyword arguments.\ \n ,\ \n2 | color: missing($a: b);\ \n | ^^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:12 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1419/000077500000000000000000000000001474765622100243745ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1419/mod.rs000066400000000000000000000003161474765622100255210ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1419" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1419") } mod quoted; mod unquoted; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1419/quoted.rs000066400000000000000000000006671474765622100262540ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1419/quoted.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("quoted") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:string\";\ \nfoo {\ \n foo: string.to-upper-case(\"ab\\63 d\");\ \n}\n"), "foo {\ \n foo: \"ABCD\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1419/unquoted.rs000066400000000000000000000006631474765622100266130ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1419/unquoted.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("unquoted") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:string\";\ \nfoo {\ \n foo: string.to-upper-case(ab\\63 d);\ \n}\n"), "foo {\ \n foo: ABCD;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1422.rs000066400000000000000000000010521474765622100247320ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1422.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1422") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok(".foo {\ \n /*foo*/foo/*foo*/: /*foo*/bar/*foo*/;\ \n /*foo*/ foo /*foo*/ : /*foo*/ bar /*foo*/;\ \n}\n"), ".foo {\ \n /*foo*/\ \n foo/*foo*/: bar;\ \n /*foo*/\ \n foo: bar;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_143.rs000066400000000000000000000014331474765622100246540ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_143.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_143") } #[test] fn test() { assert_eq!( runner().ok("$path: \"images\";\ \n$file: \"kittens.jpg\";\ \n$image: \"\";\ \n$other: file_join(\"images\", \"kittens.jpg\");\n\ \n@if $image != none {\ \n\t$image: url(file_join($path, $file));\ \n}\ \nbody {\ \n\tbackground: $image;\ \n\tcolor: $other;\ \n}\n"), "body {\ \n background: url(file_join(\"images\", \"kittens.jpg\"));\ \n color: file_join(\"images\", \"kittens.jpg\");\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1432/000077500000000000000000000000001474765622100243675ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1432/mod.rs000066400000000000000000000004371474765622100255200ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1432" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1432") } mod selector_extend; mod selector_nest; mod selector_replace; mod selector_unify; mod simple_selectors; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1432/selector_extend.rs000066400000000000000000000013371474765622100301300ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1432/selector-extend.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("selector-extend") } #[test] fn test() { assert_eq!( runner().err( "@use \"sass:selector\";\ \n@debug(selector.extend(\".a .b\", \".b\", null));\n" ), "Error: $extender: null is not a valid selector: it must be a string,\ \na list of strings, or a list of lists of strings.\ \n ,\ \n2 | @debug(selector.extend(\".a .b\", \".b\", null));\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:8 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1432/selector_nest.rs000066400000000000000000000012561474765622100276120ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1432/selector-nest.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("selector-nest") } #[test] fn test() { assert_eq!( runner().err( "@use \"sass:selector\";\ \n@debug(selector.nest(\"foo\", null));\n" ), "Error: null is not a valid selector: it must be a string,\ \na list of strings, or a list of lists of strings.\ \n ,\ \n2 | @debug(selector.nest(\"foo\", null));\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:8 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1432/selector_replace.rs000066400000000000000000000013441474765622100302520ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1432/selector-replace.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("selector-replace") } #[test] fn test() { assert_eq!( runner().err( "@use \"sass:selector\";\ \n@debug(selector.replace(\"foo\", \"bar\", null));\n" ), "Error: $replacement: null is not a valid selector: it must be a string,\ \na list of strings, or a list of lists of strings.\ \n ,\ \n2 | @debug(selector.replace(\"foo\", \"bar\", null));\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:8 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1432/selector_unify.rs000066400000000000000000000012771474765622100277760ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1432/selector-unify.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("selector-unify") } #[test] fn test() { assert_eq!( runner().err( "@use \"sass:selector\";\ \n@debug(selector.unify(\"foo\", null));\n" ), "Error: $selector2: null is not a valid selector: it must be a string,\ \na list of strings, or a list of lists of strings.\ \n ,\ \n2 | @debug(selector.unify(\"foo\", null));\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:8 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1432/simple_selectors.rs000066400000000000000000000013121474765622100303060ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1432/simple-selectors.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("simple-selectors") } #[test] fn test() { assert_eq!( runner().err( "@use \"sass:selector\";\ \n@debug(selector.simple-selectors(null));\n" ), "Error: $selector: null is not a valid selector: it must be a string,\ \na list of strings, or a list of lists of strings.\ \n ,\ \n2 | @debug(selector.simple-selectors(null));\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:8 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1434.rs000066400000000000000000000016701474765622100247430ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1434.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1434") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:selector\";\ \n.foo {\ \n a: selector.nest(\'.foo\', \'.bar > .baz\');\ \n b: selector.nest(\'.foo\', \'.bar ~ .baz\');\ \n c: selector.nest(\'.foo\', \'.bar + .baz\');\ \n d: selector.nest(\'.foo > .bar\', \'.baz\');\ \n e: selector.nest(\'.foo ~ .bar\', \'.baz\');\ \n f: selector.nest(\'.foo + .bar\', \'.baz\');\ \n}\n"), ".foo {\ \n a: .foo .bar > .baz;\ \n b: .foo .bar ~ .baz;\ \n c: .foo .bar + .baz;\ \n d: .foo > .bar .baz;\ \n e: .foo ~ .bar .baz;\ \n f: .foo + .bar .baz;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1437.rs000066400000000000000000000014461474765622100247470ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1437.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1437") } #[test] fn test() { assert_eq!( runner().ok("div {\r\ \n\r\ \n @media screen and (min-width: 37.5em) {\r\ \n /* asd */\r\ \n }\r\ \n\r\ \n @media screen and (min-width: 48em) {\r\ \n display: none;\r\ \n }\r\ \n}"), "@media screen and (min-width: 37.5em) {\ \n div {\ \n /* asd */\ \n }\ \n}\ \n@media screen and (min-width: 48em) {\ \n div {\ \n display: none;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1438.rs000066400000000000000000000021261474765622100247440ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1438.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1438") } #[test] fn test() { assert_eq!( runner().ok("@function foo() {\ \n @return 20150812;\ \n}\n\ \nfoo {\ \n background-image: url(../test.png);\ \n}\n\ \nbar {\ \n background-image: url(../test.png?v=20150812);\ \n}\n\ \nbaz {\ \n background-image: url(../test.png?v=#{test()});\ \n}\n\ \nbam {\ \n background-image: url(\"../test.png?v=#{test()}\");\ \n}\n"), "foo {\ \n background-image: url(../test.png);\ \n}\ \nbar {\ \n background-image: url(../test.png?v=20150812);\ \n}\ \nbaz {\ \n background-image: url(../test.png?v=test());\ \n}\ \nbam {\ \n background-image: url(\"../test.png?v=test()\");\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1440.rs000066400000000000000000000041631474765622100247400ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1440.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1440") } #[test] fn test() { assert_eq!( runner().ok( "// works fine with plain @each directive\r\ \n$i: 1;\r\ \n$prop1: width;\r\ \n$prop2: background-position;\r\ \n$values: 132px,\r\ \n 100px \"-100px -25px\",\r\ \n 200px \"-500px -100px\";\r\ \n\r\ \n@each $value1, $value2 in $values{\r\ \n .okay#{$i} {\r\ \n #{$prop1}: #{$value1};\r\ \n #{$prop2}: #{$value2};\r\ \n }\r\ \n $i: ($i + 1);\r\ \n}\r\ \n\r\ \n// when using @each inside @mixin with variable arguments($values...),\r\ \n// $value2 is missing and no errors while compiling\r\ \n@mixin eachProp($prop1, $prop2, $values...){\r\ \n $i: 1;\r\ \n @each $value1, $value2 in $values{\r\ \n .error#{$i} {\r\ \n #{$prop1}: #{$value1};\r\ \n #{$prop2}: #{$value2};\r\ \n }\r\ \n $i: ($i + 1);\r\ \n }\r\ \n}\r\ \n\r\ \n@include eachProp($prop1, $prop2,\r\ \n 132px,\r\ \n 100px \"-100px -25px\",\r\ \n 200px \"-500px -100px\"\r\ \n);" ), ".okay1 {\ \n width: 132px;\ \n}\ \n.okay2 {\ \n width: 100px;\ \n background-position: -100px -25px;\ \n}\ \n.okay3 {\ \n width: 200px;\ \n background-position: -500px -100px;\ \n}\ \n.error1 {\ \n width: 132px;\ \n}\ \n.error2 {\ \n width: 100px;\ \n background-position: -100px -25px;\ \n}\ \n.error3 {\ \n width: 200px;\ \n background-position: -500px -100px;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1441/000077500000000000000000000000001474765622100243675ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1441/adjacent.rs000066400000000000000000000007011474765622100265040ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1441/adjacent.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("adjacent") } #[test] fn test() { assert_eq!( runner().ok(".adjacent {\ \n & + & {\ \n foo: bar;\ \n }\ \n}\n"), ".adjacent + .adjacent {\ \n foo: bar;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1441/child.rs000066400000000000000000000006621474765622100260240ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1441/child.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("child") } #[test] fn test() { assert_eq!( runner().ok(".child {\ \n & > & {\ \n foo: bar;\ \n }\ \n}\n"), ".child > .child {\ \n foo: bar;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1441/mod.rs000066400000000000000000000003331474765622100255130ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1441" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1441") } mod adjacent; mod child; mod sibling; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1441/sibling.rs000066400000000000000000000006741474765622100263730ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1441/sibling.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("sibling") } #[test] fn test() { assert_eq!( runner().ok(".sibling {\ \n & ~ & {\ \n foo: bar;\ \n }\ \n}\n"), ".sibling ~ .sibling {\ \n foo: bar;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1448.rs000066400000000000000000000015261474765622100247500ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1448.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1448") } #[test] fn test() { assert_eq!( runner().ok(".md-card\r\ \n{\r\ \n .md-info-card-highlight\r\ \n {\r\ \n background: red;\r\ \n color: blue;\r\ \n\r\ \n .ng-md-icon\r\ \n {\r\ \n color: green;\r\ \n }\r\ \n }\r\ \n}"), ".md-card .md-info-card-highlight {\ \n background: red;\ \n color: blue;\ \n}\ \n.md-card .md-info-card-highlight .ng-md-icon {\ \n color: green;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1452.rs000066400000000000000000000011561474765622100247420ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1452.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1452") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "foo {\ \n foo: foo(());\ \n}\n" ), "Error: () isn\'t a valid CSS value.\ \n ,\ \n2 | foo: foo(());\ \n | ^^ value\ \n | ======= unknown function treated as plain CSS\ \n \'\ \n input.scss 2:12 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1459.rs000066400000000000000000000010761474765622100247520ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1459.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1459") } #[test] fn test() { assert_eq!( runner().ok("@font-face {\r\ \n font-family: \"Font Name\";\r\ \n src: local(\"Arial\");\r\ \n unicode-range: U+270C;\r\ \n}"), "@font-face {\ \n font-family: \"Font Name\";\ \n src: local(\"Arial\");\ \n unicode-range: U+270C;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1482.rs000066400000000000000000000012651474765622100247460ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1482.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1482") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".mango {\ \n color: red;\ \n}\n\ \ntype {\ \n &__else {\ \n @extend .mango;\ \n }\ \n}\n\ \n.qualified {\ \n &__else {\ \n @extend .mango;\ \n }\ \n}\n"), ".mango, .qualified__else, type__else {\ \n color: red;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1484.rs000066400000000000000000000006741474765622100247530ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1484.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1484") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err("div {\n"), "Error: expected \"}\".\ \n ,\ \n1 | div {\ \n | ^\ \n \'\ \n input.scss 1:6 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1486.rs000066400000000000000000000055201474765622100247500ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1486.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1486") } #[test] fn test() { assert_eq!( runner().ok("$a: 41px;\n\ \n@function a() {\ \n @return 42px;\ \n}\n\ \nfoo {\ \n foo: $a -121px;\ \n foo: ($a -122px);\ \n foo: $a*3-123px;\ \n foo: ($a*3-124px);\ \n foo: $a*3 -123px;\ \n foo: ($a*3 -124px);\ \n foo: $a*3 - 123px;\ \n foo: ($a*3 - 124px);\ \n foo: $a*3- 123px;\ \n foo: ($a*3- 124px);\ \n foo: $a*3- 123px;\ \n foo: ($a*3- 124px);\ \n}\n\ \nbar {\ \n bar: a() -121px;\ \n bar: (a() -122px);\ \n bar: a()*3-123px;\ \n bar: (a()*3-124px);\ \n bar: a()*3 -123px;\ \n bar: (a()*3 -124px);\ \n bar: a()*3 - 123px;\ \n bar: (a()*3 - 124px);\ \n bar: a()*3- 123px;\ \n bar: (a()*3- 124px);\ \n bar: a()*3- 123px;\ \n bar: (a()*3- 124px);\ \n}\n\ \nbaz {\ \n baz: 43px -121px;\ \n baz: (43px -122px);\ \n baz: 43px*3-123px;\ \n baz: (43px*3-124px);\ \n baz: 43px*3 -123px;\ \n baz: (43px*3 -124px);\ \n baz: 43px*3 - 123px;\ \n baz: (43px*3 - 124px);\ \n baz: 43px*3- 123px;\ \n baz: (43px*3- 124px);\ \n baz: 43px*3- 123px;\ \n baz: (43px*3- 124px);\ \n}\n"), "foo {\ \n foo: 41px -121px;\ \n foo: 41px -122px;\ \n foo: 0px;\ \n foo: -1px;\ \n foo: 123px -123px;\ \n foo: 123px -124px;\ \n foo: 0px;\ \n foo: -1px;\ \n foo: 0px;\ \n foo: -1px;\ \n foo: 0px;\ \n foo: -1px;\ \n}\ \nbar {\ \n bar: 42px -121px;\ \n bar: 42px -122px;\ \n bar: 3px;\ \n bar: 2px;\ \n bar: 126px -123px;\ \n bar: 126px -124px;\ \n bar: 3px;\ \n bar: 2px;\ \n bar: 3px;\ \n bar: 2px;\ \n bar: 3px;\ \n bar: 2px;\ \n}\ \nbaz {\ \n baz: 43px -121px;\ \n baz: 43px -122px;\ \n baz: 6px;\ \n baz: 5px;\ \n baz: 129px -123px;\ \n baz: 129px -124px;\ \n baz: 6px;\ \n baz: 5px;\ \n baz: 6px;\ \n baz: 5px;\ \n baz: 6px;\ \n baz: 5px;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1487.rs000066400000000000000000000014071474765622100247510ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1487.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1487") } #[test] #[ignore] // missing error fn test() { assert_eq!( runner().err( "@mixin foo() {\ \n foo: &;\ \n}\n\ \nfoo {\ \n @include foo { bar: baz }\ \n}\n" ), "Error: Mixin doesn\'t accept a content block.\ \n ,\ \n1 | @mixin foo() {\ \n | ===== declaration\ \n... |\ \n6 | @include foo { bar: baz }\ \n | ^^^^^^^^^^^^ invocation\ \n \'\ \n input.scss 6:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1488.rs000066400000000000000000000041461474765622100247550ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1488.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1488") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:meta\";\ \n@function foo($arg2) {\ \n @return meta.type-of($arg2);\ \n}\n\ \n@function foo_($arg2...) {\ \n @return meta.type-of($arg2);\ \n}\n\ \n@function bar($arg1, $arg2) {\ \n @return meta.type-of($arg1) + \"::\" + meta.type-of($arg2);\ \n}\n\ \n@function bar_($arg1, $arg2...) {\ \n @return meta.type-of($arg1) + \"::\" + meta.type-of($arg2);\ \n}\n\ \nfoo {\ \n foo: foo(one);\ \n foo: foo(one...);\ \n bar: bar(one, two);\ \n bar: bar(one, two...);\ \n foo: meta.call(\'foo\', one);\ \n foo: meta.call(\'foo\', one...);\ \n bar: meta.call(\'bar\', one, two);\ \n bar: meta.call(\'bar\', one, two...);\ \n}\n\ \nbar {\ \n foo: foo_(one);\ \n foo: foo_(one...);\ \n bar: bar_(one, two);\ \n bar: bar_(one, two...);\ \n foo: meta.call(\'foo_\', one);\ \n foo: meta.call(\'foo_\', one...);\ \n bar: meta.call(\'bar_\', one, two);\ \n bar: meta.call(\'bar_\', one, two...);\ \n}"), "foo {\ \n foo: string;\ \n foo: string;\ \n bar: string::string;\ \n bar: string::string;\ \n foo: string;\ \n foo: string;\ \n bar: string::string;\ \n bar: string::string;\ \n}\ \nbar {\ \n foo: arglist;\ \n foo: arglist;\ \n bar: string::arglist;\ \n bar: string::arglist;\ \n foo: arglist;\ \n foo: arglist;\ \n bar: string::arglist;\ \n bar: string::arglist;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_151.rs000066400000000000000000000024411474765622100246530ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_151.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_151") } #[test] fn test() { assert_eq!( runner().err( "@use \"sass:color\";\ \ndiv.colors {\ \n background: color.grayscale(red);\ \n background: saturate(red);\ \n background: color.invert(red);\ \n background: color.alpha(red);\ \n color: color.grayscale(#369);\ \n color: saturate(#369);\ \n color: color.adjust(#369, $saturation: 20%);\ \n color: color.invert(#369);\ \n color: color.alpha(#369);\ \n}\n\ \ndiv.numbers {\ \n filter: grayscale(30%);\ \n filter: saturate(30%);\ \n filter: invert(30%);\ \n -webkit-filter: grayscale(0.3);\ \n -webkit-filter: saturate(0.3);\ \n -webkit-filter: invert(0.3);\ \n}\n" ), "Error: $amount: red is not a number.\ \n ,\ \n4 | background: saturate(red);\ \n | ^^^^^^^^^^^^^\ \n \'\ \n input.scss 4:15 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_152.rs000066400000000000000000000017151474765622100246570ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_152.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_152") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "$foo: 10;\ \n$bar: 10%;\n\ \nfoo {\ \n a: #{10}% 100%;\ \n a: #{10} % 100%;\ \n a: #{10} %100%;\ \n a: 10% 100%;\ \n a: 10 % 100%;\ \n a: 10 %100%;\ \n a: $foo 100%;\ \n a: $foo % 100%;\ \n a: $foo %100%;\ \n a: $bar 100%;\ \n a: $bar % 100%;\ \n a: $bar %100%;\ \n}\n" ), "Error: Undefined operation \"10 % 100%\".\ \n ,\ \n5 | a: #{10}% 100%;\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 5:6 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1526.rs000066400000000000000000000007411474765622100247430ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1526.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1526") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok("foo {\ \n bar: (1--em-2--em);\ \n baz: (1--em - 2--em);\ \n}\n"), "foo {\ \n bar: 1 --em-2--em;\ \n baz: 1 --em-2 --em;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1527/000077500000000000000000000000001474765622100243745ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1527/extend.rs000066400000000000000000000010501474765622100262250ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1527/extend.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("extend") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "foo {\ \n @extend &;\ \n}\n" ), "Error: Parent selectors aren\'t allowed here.\ \n ,\ \n2 | @extend &;\ \n | ^\ \n \'\ \n input.scss 2:11 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1527/mod.rs000066400000000000000000000003161474765622100255210ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1527" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1527") } mod extend; mod selector; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1527/selector/000077500000000000000000000000001474765622100262145ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1527/selector/first.rs000066400000000000000000000010721474765622100277110ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1527/selector/first.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("first") } #[test] #[ignore] // missing error fn test() { assert_eq!( runner().err( "& foo {\ \n bar: baz;\ \n}\n" ), "Error: Top-level selectors may not contain the parent selector \"&\".\ \n ,\ \n1 | & foo {\ \n | ^\ \n \'\ \n input.scss 1:1 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1527/selector/last.rs000066400000000000000000000010741474765622100275270ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1527/selector/last.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("last") } #[test] #[ignore] // missing error fn test() { assert_eq!( runner().err( "foo & {\ \n bar: baz;\ \n}\n" ), "Error: Top-level selectors may not contain the parent selector \"&\".\ \n ,\ \n1 | foo & {\ \n | ^\ \n \'\ \n input.scss 1:5 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1527/selector/mod.rs000066400000000000000000000003331474765622100273400ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1527/selector" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("selector") } mod first; mod last; mod only; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1527/selector/only.rs000066400000000000000000000010041474765622100275360ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1527/selector/only.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("only") } #[test] #[ignore] // missing error fn test() { assert_eq!( runner().err( "& {}\n" ), "Error: Top-level selectors may not contain the parent selector \"&\".\ \n ,\ \n1 | & {}\ \n | ^\ \n \'\ \n input.scss 1:1 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1535.rs000066400000000000000000000012441474765622100247420ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1535.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1535") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok("@use \"sass:meta\";\ \nfoo {\ \n test: meta.type-of(1--em);\ \n test: (1--em-2--em);\ \n test: (1--em- 2--em);\ \n test: (1--em -2--em);\ \n}\n"), "foo {\ \n test: list;\ \n test: 1 --em-2--em;\ \n test: 1 --em- 2 --em;\ \n test: 1 --em -2 --em;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1537.rs000066400000000000000000000014171474765622100247460ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1537.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1537") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "$map: (\ \n a: 1, two, 3,\ \n foo: \'bar\'\ \n);\n\ \ntest {\ \n a: map-get($map, a);\ \n type: type-of(map-get($map, a));\ \n keys: map-keys($map);\ \n try: map-get($map, two);\ \n}\n" ), "Error: expected \":\".\ \n ,\ \n2 | a: 1, two, 3,\ \n | ^\ \n \'\ \n input.scss 2:12 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_154.rs000066400000000000000000000006151474765622100246570ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_154.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_154") } #[test] fn test() { assert_eq!( runner().ok("test {\r\ \n filter:alpha(opacity=75);\r\ \n}"), "test {\ \n filter: alpha(opacity=75);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1546.rs000066400000000000000000000002661474765622100247470ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1546.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1546") } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1550/000077500000000000000000000000001474765622100243705ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1550/each_embedded.rs000066400000000000000000000012031474765622100274430ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1550/each_embedded.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("each_embedded") } #[test] fn test() { assert_eq!( runner().err( "@each $i in (1) {\ \n @function foo() {\ \n @return \'foo\';\ \n }\ \n}\n" ), "Error: Functions may not be declared in control directives.\ \n ,\ \n2 | @function foo() {\ \n | ^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1550/for_embedded.rs000066400000000000000000000012121474765622100273310ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1550/for_embedded.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("for_embedded") } #[test] fn test() { assert_eq!( runner().err( "@for $i from 1 through 2 {\ \n @function foo() {\ \n @return \'foo\';\ \n }\ \n}\n" ), "Error: Functions may not be declared in control directives.\ \n ,\ \n2 | @function foo() {\ \n | ^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1550/if_embedded.rs000066400000000000000000000011721474765622100271460ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1550/if_embedded.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("if_embedded") } #[test] fn test() { assert_eq!( runner().err( "@if (true) {\ \n @function foo() {\ \n @return \'foo\';\ \n }\ \n}\n" ), "Error: Functions may not be declared in control directives.\ \n ,\ \n2 | @function foo() {\ \n | ^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1550/mixin_embedded.rs000066400000000000000000000011731474765622100276750ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1550/mixin_embedded.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("mixin_embedded") } #[test] fn test() { assert_eq!( runner().err( "@mixin foo() {\ \n @function foo() {\ \n @return \'foo\';\ \n }\ \n}\n" ), "Error: Mixins may not contain function declarations.\ \n ,\ \n2 | @function foo() {\ \n | ^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1550/mod.rs000066400000000000000000000004251474765622100255160ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1550" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1550") } mod each_embedded; mod for_embedded; mod if_embedded; mod mixin_embedded; mod while_embedded; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1550/while_embedded.rs000066400000000000000000000012711474765622100276600ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1550/while_embedded.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("while_embedded") } #[test] fn test() { assert_eq!( runner().err( "$i: 1;\ \n@while $i == 1 {\ \n @function foo() {\ \n @return \'foo\';\ \n }\ \n $i: $i + 1;\ \n}\n" ), "Error: Functions may not be declared in control directives.\ \n ,\ \n3 | @function foo() {\ \n | ^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 3:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1557.rs000066400000000000000000000007471474765622100247550ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1557.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1557") } #[test] fn test() { assert_eq!( runner().ok( "$xs-break: 30em;@media ALL AND (max-width: $xs-break) {header {display: none;}}\n" ), "@media ALL and (max-width: 30em) {\ \n header {\ \n display: none;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1566.rs000066400000000000000000000012101474765622100247370ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1566.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1566") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:meta\";\ \n@function foo($predicate) {\ \n @return meta.call(\'bar\', $predicate);\ \n}\n\ \n@function bar($predicate) {\ \n @return meta.type-of($predicate);\ \n}\n\ \ntest {\ \n test: foo(1 2 3);\ \n}\n"), "test {\ \n test: list;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1567.rs000066400000000000000000000012431474765622100247460ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1567.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1567") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("/* any */@media/* first */\ \n/* screen */screen /*something */ , /* else */\ \n/* not */not/* print */print /* final */ { /* whatever */\ \n body { line-height: 1.2 }\ \n}\n"), "/* any */\ \n@media screen, not print { /* whatever */\ \n body {\ \n line-height: 1.2;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1568.rs000066400000000000000000000007231474765622100247510ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1568.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1568") } #[test] fn test() { assert_eq!( runner().ok("body {\ \n font-weight: bold; // test\ \n font-size: 10px // test\ \n}\n"), "body {\ \n font-weight: bold;\ \n font-size: 10px;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1569.rs000066400000000000000000000014421474765622100247510ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1569.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1569") } #[test] #[ignore] // missing error fn test() { assert_eq!( runner().err( "$common-border: \"foo\";\ \n.nihilo & {\ \n .dijitMenu {\ \n border: $common-border;\ \n .dijitMenuItem {\ \n color: getColor(\'text-dark-main\');\ \n }\ \n }\ \n}\n" ), "Error: Top-level selectors may not contain the parent selector \"&\".\ \n ,\ \n2 | .nihilo & {\ \n | ^\ \n \'\ \n input.scss 2:9 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1570.rs000066400000000000000000000010561474765622100247420ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1570.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1570") } #[test] fn test() { assert_eq!( runner().ok("a {\ \n font: 12px/normal serif;\ \n}\n\ \nb {\ \n font: normal 12px/normal serif;\ \n}\n"), "a {\ \n font: 12px/normal serif;\ \n}\ \nb {\ \n font: normal 12px/normal serif;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1574.rs000066400000000000000000000021301474765622100247400ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1574.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1574") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".foo {\ \n bar: baz;\ \n}\n\ \ninput[type=\"text\"],\ \ninput[type=\"search\"],\ \ninput[type=\"url\"],\ \ninput[type=\"email\"],\ \ninput[type=\"password\"],\ \ninput[type=\"number\"],\ \ninput[type=\"tel\"],\ \ninput[type=\"date\"],\ \ninput[type=\"range\"],\ \ntextarea {\ \n @extend .foo;\ \n}\n"), ".foo, input[type=text],\ \ninput[type=search],\ \ninput[type=url],\ \ninput[type=email],\ \ninput[type=password],\ \ninput[type=number],\ \ninput[type=tel],\ \ninput[type=date],\ \ninput[type=range],\ \ntextarea {\ \n bar: baz;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1577.rs000066400000000000000000000011501474765622100247440ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1577.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1577") } #[test] #[ignore] // missing error fn test() { assert_eq!( runner().err( "$foo: 10%; // line 1\ \n// line 2\ \n$error: $foo + 20px; // line 3\n" ), "Error: 10% and 20px have incompatible units.\ \n ,\ \n3 | $error: $foo + 20px; // line 3\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 3:9 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1578.rs000066400000000000000000000002661474765622100247540ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1578.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1578") } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1579.rs000066400000000000000000000011751474765622100247550ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1579.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1579") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:meta\";\ \n@function foo($a, $b: null, $c: false) {\ \n @return $c;\ \n}\n\ \n@function bar($args...) {\ \n @return meta.call(foo, $args...);\ \n}\n\ \ntest {\ \n test: bar(3, $c: true);\ \n}\n"), "test {\ \n test: true;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1583.rs000066400000000000000000000030331474765622100247430ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1583.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1583") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:list\";\ \n@use \"sass:meta\";\ \n@use \"sass:string\";\n\ \n$ls: ((foo,));\n\ \nfoo {\ \n baz: list.length($ls);\ \n baz: meta.type-of($ls);\ \n baz: meta.inspect($ls);\ \n}\n\ \nbar {\ \n baz: list.length(&);\ \n baz: meta.type-of(&);\ \n baz: meta.inspect(&);\ \n}\n\ \nfoo {\ \n string: meta.inspect(&);\ \n str-length: string.length(meta.inspect(&));\ \n list-length: list.length(&);\ \n}\n\ \nfoo, bar {\ \n string: meta.inspect(&);\ \n str-length: string.length(meta.inspect(&));\ \n list-length: list.length(&);\ \n}\n"), "foo {\ \n baz: 1;\ \n baz: list;\ \n baz: (foo,);\ \n}\ \nbar {\ \n baz: 1;\ \n baz: list;\ \n baz: (bar,);\ \n}\ \nfoo {\ \n string: (foo,);\ \n str-length: 6;\ \n list-length: 1;\ \n}\ \nfoo, bar {\ \n string: foo, bar;\ \n str-length: 8;\ \n list-length: 2;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1584.rs000066400000000000000000000025771474765622100247600ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1584.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1584") } #[test] fn test() { assert_eq!( runner().ok("@mixin foo($out: false) {\ \n @if $out {\ \n @at-root { @content; }\ \n }\ \n}\n\ \n@mixin bar() {\ \n @at-root { @content; }\ \n}\n\ \n@mixin baz($string) {\ \n @at-root .#{$string} { @content; }\ \n}\n\ \n.test {\ \n @include foo(true) {\ \n .nest1 {\ \n color: red;\ \n }\ \n }\ \n @include bar() {\ \n .nest2 {\ \n color: green;\ \n }\ \n }\ \n @include baz(\'nest3\') {\ \n color: blue;\ \n }\ \n @at-root {\ \n .nest4 {\ \n color: yellow;\ \n }\ \n }\ \n}\n"), ".nest1 {\ \n color: red;\ \n}\ \n.nest2 {\ \n color: green;\ \n}\ \n.nest3 {\ \n color: blue;\ \n}\ \n.nest4 {\ \n color: yellow;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1585.rs000066400000000000000000000015751474765622100247560ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1585.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1585") } #[test] #[ignore] // missing error fn test() { assert_eq!( runner().err( "@mixin bar() {\ \n @at-root { @content; }\ \n}\n\ \n.test {\ \n @include bar() {\ \n color: yellow;\ \n .nest2 {\ \n color: green;\ \n }\ \n }\ \n}\n" ), "Error: Declarations may only be used within style rules.\ \n ,\ \n7 | color: yellow;\ \n | ^^^^^^^^^^^^^\ \n \'\ \n input.scss 7:5 @content\ \n input.scss 2:14 bar()\ \n input.scss 6:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1590/000077500000000000000000000000001474765622100243745ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1590/ampersand_against_literal.rs000066400000000000000000000017221474765622100321400ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1590/ampersand-against-literal.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("ampersand-against-literal") } #[test] fn test() { assert_eq!( runner().ok("@mixin where($sel: null) {\ \n @if ( & == $sel ) {\ \n h1 { color: white; }\ \n } @else {\ \n h1 { color: blue; }\ \n }\ \n}\ \n.hive { @include where(); } \ \n.bee { @include where(\".bee\"); } \ \n.amp { @include where(&); } \ \n.quotedamp { @include where(\"&\"); } \n"), ".hive h1 {\ \n color: blue;\ \n}\ \n.bee h1 {\ \n color: blue;\ \n}\ \n.amp h1 {\ \n color: white;\ \n}\ \n.quotedamp h1 {\ \n color: blue;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1590/ampersand_as_expression.rs000066400000000000000000000015231474765622100316570ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1590/ampersand-as-expression.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("ampersand-as-expression") } #[test] fn test() { assert_eq!( runner().ok("@mixin where($sel: null) {\ \n @if ( & == $sel ) {\ \n h1 { color: white; }\ \n } @else {\ \n h1 { color: blue; }\ \n }\ \n}\ \n.hive { @include where(); } \ \n.bee { @include where(&); } \ \n.queen { @include where(\"&\"); } \n"), ".hive h1 {\ \n color: blue;\ \n}\ \n.bee h1 {\ \n color: white;\ \n}\ \n.queen h1 {\ \n color: blue;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1590/mod.rs000066400000000000000000000004271474765622100255240ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1590" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1590") } mod ampersand_against_literal; mod ampersand_as_expression; mod quoted_ampersand_does_not_select; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1590/quoted_ampersand_does_not_select.rs000066400000000000000000000017341474765622100335330ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1590/quoted-ampersand-does-not-select.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("quoted-ampersand-does-not-select") } #[test] fn test() { assert_eq!( runner().ok("@mixin where($sel: null) {\ \n @if ( \"&\" == $sel ) {\ \n h1 { color: white; }\ \n } @else {\ \n h1 { color: blue; }\ \n }\ \n}\ \n.hive { @include where(); } \ \n.bee { @include where(&); } \ \n.amp { @include where(\".amp\"); } \ \n.queen { @include where(\"&\"); } \n"), ".hive h1 {\ \n color: blue;\ \n}\ \n.bee h1 {\ \n color: blue;\ \n}\ \n.amp h1 {\ \n color: blue;\ \n}\ \n.queen h1 {\ \n color: white;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1596.rs000066400000000000000000000012721474765622100247520ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1596.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1596") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok("@document url(http://www.w3.org/),\ \n url-prefix(http://www.w3.org/Style/),\ \n domain(mozilla.org),\ \n regexp(\"https:.*\");\n"), "@document url(http://www.w3.org/),\ \n url-prefix(http://www.w3.org/Style/),\ \n domain(mozilla.org),\ \n regexp(\"https:.*\");\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1601.rs000066400000000000000000000013541474765622100247360ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1601.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1601") } #[test] #[ignore] // missing error fn test() { assert_eq!( runner().err( ".code.ruby > {\r\ \n &.ruby {\r\ \n color: green;\r\ \n }\r\ \n}" ), "Error: Selector \".code.ruby >\" can\'t be used as a parent in a compound selector.\ \n ,\ \n1 | .code.ruby > {\ \n | ^^^^^^^^^^^^ outer selector\ \n2 | &.ruby {\ \n | = parent selector\ \n \'\ \n input.scss 1:1 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1604.rs000066400000000000000000000015271474765622100247430ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1604.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1604") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:list\";\ \n@use \"sass:meta\";\n\ \n@function test($args...) {\ \n $all: ();\n\ \n @each $arg in $args {\ \n $all: list.append($all, $arg);\ \n }\n\ \n @return meta.inspect($all);\ \n}\n\ \ntest {\ \n args-1: test(1 2 3);\ \n args-2: test(1 2, 3 4);\ \n args-3: test(1, 2, 3);\ \n}\n"), "test {\ \n args-1: (1 2 3);\ \n args-2: (1 2) (3 4);\ \n args-3: 1 2 3;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1610.rs000066400000000000000000000030551474765622100247360ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1610.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1610") } #[test] fn test() { assert_eq!( runner().ok("@function foo() {\ \n @return \"bar\";\ \n}\n\ \n@function bar() {\ \n @return \"foo\" + \",\" + bar;\ \n}\n\ \na {\ \n b: foo(), \"bar\";\ \n b: foo(), \"bar\"\ \n}\n\ \nb {\ \n b: #{foo(), \"bar\"};\ \n b: #{foo(), \"bar\"}\ \n}\n\ \nc {\ \n b: \"foo\", bar;\ \n}\n\ \nd {\ \n b: #{\"foo\", bar};\ \n b: #{\"foo\", bar}\ \n}\n\ \ne {\ \n b: #{bar()};\ \n b: #{bar()}\ \n}\n\ \nf {\ \n b: \"foo\" + \",\" + bar;\ \n b: \"foo\" + \",\" + bar\ \n}\n"), "a {\ \n b: \"bar\", \"bar\";\ \n b: \"bar\", \"bar\";\ \n}\ \nb {\ \n b: bar, bar;\ \n b: bar, bar;\ \n}\ \nc {\ \n b: \"foo\", bar;\ \n}\ \nd {\ \n b: foo, bar;\ \n b: foo, bar;\ \n}\ \ne {\ \n b: foo,bar;\ \n b: foo,bar;\ \n}\ \nf {\ \n b: \"foo,bar\";\ \n b: \"foo,bar\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1612.rs000066400000000000000000000006651474765622100247440ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1612.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1612") } #[test] fn test() { assert_eq!( runner().ok("c {\ \n b: \"foo\", bar;\ \n b: \"foo\", bar\ \n}\n"), "c {\ \n b: \"foo\", bar;\ \n b: \"foo\", bar;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1622.rs000066400000000000000000000012361474765622100247400ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1622.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1622") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:list\";\ \n@use \"sass:meta\";\ \n@function foo($list) {\ \n @return meta.call(bar, $list);\ \n}\n\ \n@function bar($list, $args...) {\ \n @return list.length($list);\ \n}\n\ \ntest {\ \n test: foo(1 2 3);\ \n}\n"), "test {\ \n test: 3;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1624.rs000066400000000000000000000012021474765622100247330ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1624.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1624") } #[test] fn test() { assert_eq!( runner().ok("@function foo($foo) {\ \n @return $foo;\ \n}\n\ \n@function data($foo) {\ \n @return \'[data-\' + $foo + \']\';\ \n}\n\ \n#{foo(foo)} {\ \n #{data(\'bar\')} {\ \n baz: bam;\ \n }\ \n}\n"), "foo [data-bar] {\ \n baz: bam;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1629.rs000066400000000000000000000006541474765622100247520ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1629.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1629") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n background: url(...) 2rem 3rem / auto 2rem;\ \n}\n"), "foo {\ \n background: url(...) 2rem 3rem/auto 2rem;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1632.rs000066400000000000000000000005651474765622100247450ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1632.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1632") } #[test] fn test() { assert_eq!( runner().ok("$foo: \\/ !global;\ \n.foo#{$foo}bar { a: b; }\n"), ".foo\\/bar {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1634.rs000066400000000000000000000013011474765622100247340ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1634.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1634") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:list\";\ \n@use \"sass:meta\";\ \n$empty-list: ();\n\ \n@function foo($args...) {\ \n @return meta.call(bar, $args...);\ \n}\n\ \n@function bar($list) {\ \n @return list.length($list);\ \n}\n\ \ntest {\ \n test: foo($empty-list);\ \n}"), "test {\ \n test: 0;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1640.rs000066400000000000000000000011551474765622100247400ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1640.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1640") } #[test] fn test() { assert_eq!( runner().ok("@mixin foo() {\ \n @if false {\ \n a { b: c }\ \n } @else {\ \n @content;\ \n }\ \n}\n\ \n@include foo() {\ \n .foo {\ \n bar: baz;\ \n }\ \n}\n"), ".foo {\ \n bar: baz;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1644/000077500000000000000000000000001474765622100243745ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1644/complex.rs000066400000000000000000000044231474765622100264140ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1644/complex.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("complex") } #[test] #[ignore] // missing error fn test() { assert_eq!( runner().err( "@use \"sass:map\";\ \n$tablet-portrait: 768px;\ \n$tablet-landscape: 980px;\ \n$desk-normal: 1120px;\ \n$desk-big: 1280px;\ \n$grid-breakpoints-immobile: (\ \n \'tablet-portrait\': \'(min-width: \' + $tablet-portrait + \') and (max-width: \' + $tablet-landscape + \')\',\ \n \'tablet-landscape\': \'(min-width: \' + $tablet-landscape + \') and (max-width: \' + $desk-normal + \')\',\ \n \'desk-normal\': \'(min-width: \' + $desk-normal + \') and (max-width: \' + $desk-big + \')\',\ \n \'desk-big\': \'(min-width: \' + $desk-big + \')\'\ \n);\ \n@mixin grid-media-query($media-query, $breakpointDefinitions) {\ \n $breakpoint-found: false;\n\ \n @each $breakpoint, $breakpointvalue in $breakpointDefinitions{\ \n $name: $breakpoint;\ \n $declaration: $breakpointvalue;\n\ \n @if $media-query == $name and $declaration{\ \n $breakpoint-found: true;\n\ \n @media only screen and #{$declaration} {\ \n @content;\ \n }\ \n }\ \n }\ \n}\n\ \n@each $name in map.keys($grid-breakpoints-immobile) {\ \n @include grid-media-query($name, $grid-breakpoints-immobile) {\ \n body.immobile & {\ \n margin-bottom: 0;\ \n }\ \n }\ \n}\n" ), "Error: Top-level selectors may not contain the parent selector \"&\".\ \n ,\ \n31 | body.immobile & {\ \n | ^\ \n \'\ \n input.scss 31:19 @content\ \n input.scss 23:9 grid-media-query()\ \n input.scss 30:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1644/mixin_parent.rs000066400000000000000000000015121474765622100274360ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1644/mixin-parent.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("mixin-parent") } #[test] #[ignore] // missing error fn test() { assert_eq!( runner().err( "@mixin parent {\ \n @content;\ \n}\n\ \n@include parent() {\ \n body.immobile & {\ \n margin-bottom: 0;\ \n }\ \n}\n" ), "Error: Top-level selectors may not contain the parent selector \"&\".\ \n ,\ \n6 | body.immobile & {\ \n | ^\ \n \'\ \n input.scss 6:17 @content\ \n input.scss 2:3 parent()\ \n input.scss 5:1 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1644/mod.rs000066400000000000000000000003231474765622100255170ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1644" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1644") } mod complex; mod mixin_parent; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1645.rs000066400000000000000000000014651474765622100247510ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1645.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1645") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:list\";\ \n@use \"sass:meta\";\ \n@function foo($a, $should-be-empty...) {\ \n @return list.length($should-be-empty);\ \n}\n\ \n@function bar($args...) {\ \n @return meta.call(foo, $args...);\ \n}\n\ \n@function args($args...) {\ \n @return $args;\ \n}\n\ \n$a: args(1, 2, 3);\n\ \ntest {\ \n test: bar($a);\ \n}\n"), "test {\ \n test: 0;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1647/000077500000000000000000000000001474765622100243775ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1647/directives.rs000066400000000000000000000007511474765622100271110ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1647/directives.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("directives") } #[test] fn test() { assert_eq!( runner().ok("@foo #{\"directive\"} {\ \n .#{\"foo\"} { #{\"foo-prop\"}: #{\"foo-val\"}; }\ \n}\n"), "@foo directive {\ \n .foo {\ \n foo-prop: foo-val;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1647/mod.rs000066400000000000000000000003231474765622100255220ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1647" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1647") } mod directives; mod selectors; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1647/selectors.rs000066400000000000000000000020311474765622100267440ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1647/selectors.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("selectors") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:list\";\ \n@use \"sass:map\";\ \n$map: (foo: \'b\', bar: c);\ \n$list: (\'d\', e);\n\ \na {\ \n #{map.get($map, foo)} & {\ \n foo: bar;\ \n }\ \n #{map.get($map, bar)} & {\ \n foo: bar;\ \n }\n\ \n #{list.nth($list, 1)} & {\ \n foo: bar;\ \n }\n\ \n #{list.nth($list, 2)} & {\ \n foo: bar;\ \n }\ \n}\n"), "b a {\ \n foo: bar;\ \n}\ \nc a {\ \n foo: bar;\ \n}\ \nd a {\ \n foo: bar;\ \n}\ \ne a {\ \n foo: bar;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1648.rs000066400000000000000000000016671474765622100247600ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1648.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1648") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok("$x: 3px;\ \n/* comment 1 */\ \n@if/* pre 1 */$x == 3px/* post 1 */{\ \n /* if 1 */\ \n}\ \n/* comment 2 */\ \n@elseif/* pre 2 */$x == 2px/* post 2 */{\ \n /* else if 2 */\ \n}\ \n/* comment 3 */\ \n@else/* middle 3 */if/* pre 3 */$x == 3px/* post 3 */{\ \n /* else if 3 */\ \n}\ \n/* comment 4 */\ \n@else/* post 4 */{\ \n /* else 4 */\ \n}\ \n/* comment 5 */"), "/* comment 1 */\ \n/* if 1 */\ \n/* comment 5 */\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1650/000077500000000000000000000000001474765622100243715ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1650/mod.rs000066400000000000000000000003201474765622100255110ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1650" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1650") } mod negative; mod positive; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1650/negative.rs000066400000000000000000000012771474765622100265500ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1650/negative.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("negative") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok(":nth-of-type(2n-1),\ \n:nth-of-type(2n- 1),\ \n:nth-of-type(2n -1),\ \n:nth-of-type(2n - 1),\ \n:nth-of-type( 2n - 1 )\ \n{ color: red; }\n"), ":nth-of-type(2n-1),\ \n:nth-of-type(2n- 1),\ \n:nth-of-type(2n -1),\ \n:nth-of-type(2n - 1),\ \n:nth-of-type(2n - 1) {\ \n color: red;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1650/positive.rs000066400000000000000000000012751474765622100266060ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1650/positive.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("positive") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok(":nth-of-type(2n+1),\ \n:nth-of-type(2n+ 1),\ \n:nth-of-type(2n +1),\ \n:nth-of-type(2n + 1),\ \n:nth-of-type( 2n + 1 )\ \n{ color: red; }"), ":nth-of-type(2n+1),\ \n:nth-of-type(2n+ 1),\ \n:nth-of-type(2n +1),\ \n:nth-of-type(2n + 1),\ \n:nth-of-type(2n + 1) {\ \n color: red;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1651/000077500000000000000000000000001474765622100243725ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1651/mod.rs000066400000000000000000000003131474765622100255140ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1651" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1651") } mod with; mod without; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1651/with.rs000066400000000000000000000012711474765622100257140ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1651/with.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("with") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "a {\ \n display: block;\ \n}\ \n.b {\ \n @at-root (with: media) {\ \n @extend .a;\ \n }\ \n} \n" ), "Error: @extend may only be used within style rules.\ \n ,\ \n6 | @extend .a;\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 6:5 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1651/without.rs000066400000000000000000000010501474765622100264370ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1651/without.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("without") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".a {\ \n display: block;\ \n}\n\ \n.b {\ \n @at-root (without: media) {\ \n @extend .a;\ \n }\ \n} \n"), ".a, .b {\ \n display: block;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1654/000077500000000000000000000000001474765622100243755ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1654/basic.rs000066400000000000000000000011421474765622100260220ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1654/basic.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("basic") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%foo {\ \n &bar {\ \n display: block;\ \n }\ \n &.bar {\ \n display: block;\ \n }\ \n}\ \nzoo {\ \n @extend %foo;\ \n}"), "zoo.bar {\ \n display: block;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1654/bem.rs000066400000000000000000000014001474765622100255010ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1654/bem.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("bem") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%foo,\ \n.foo {\ \n display:block;\n\ \n &--up {\ \n border: none;\ \n }\ \n}\n\ \n.zoo {\ \n @extend %foo;\n\ \n &--up {\ \n @extend %foo--up;\ \n }\ \n}"), ".zoo,\ \n.foo {\ \n display: block;\ \n}\ \n.zoo--up,\ \n.foo--up {\ \n border: none;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1654/mod.rs000066400000000000000000000003101474765622100255140ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1654" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1654") } mod basic; mod bem; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1658.rs000066400000000000000000000007231474765622100247510ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1658.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1658") } #[test] #[ignore] // missing error fn test() { assert_eq!( runner().err("@else{}\n"), "Error: This at-rule is not allowed here.\ \n ,\ \n1 | @else{}\ \n | ^^^^^\ \n \'\ \n input.scss 1:1 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1667.rs000066400000000000000000000064061474765622100247550ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1667.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1667") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:map\";\ \n$map: (\r\ \n 1: 1,\r\ \n 1px: 1px\r\ \n);\r\ \n\r\ \nfoo {\r\ \n a: map.get($map, 1);\r\ \n b: map.get($map, 1px);\r\ \n}\r\ \n\r\ \n$type-scale: (\r\ \n\t-15:0.066667rem,\r\ \n\t-10:0.186rem,\r\ \n\t-9:0.211rem,\r\ \n\t-8:0.26rem,\r\ \n\t-7:0.295rem,\r\ \n\t-6:0.364rem,\r\ \n\t-5:0.413rem,\r\ \n\t-4:0.51rem,\r\ \n\t-3:0.578rem,\r\ \n\t-2:0.714rem,\r\ \n\t-1:0.809rem,\r\ \n\t0:1rem,\r\ \n\t1:1.133rem,\r\ \n\t2:1.4rem,\r\ \n\t3:1.586rem,\r\ \n\t4:1.96rem,\r\ \n\t5:2.221rem,\r\ \n\t6:2.744rem,\r\ \n\t7:3.109rem,\r\ \n\t8:3.842rem,\r\ \n\t9:4.353rem,\r\ \n\t10:5.378rem,\r\ \n\t11:6.094rem,\r\ \n\t12:7.53rem,\r\ \n\t13:8.531rem,\r\ \n\t14:10.541rem,\r\ \n\t15:11.943rem,\r\ \n\t16:14.758rem\r\ \n);\r\ \n\r\ \n@function get-size($size) {\r\ \n\t@if map.has-key($type-scale, $size) {\r\ \n\t\t@return map.get($type-scale, $size);\r\ \n\t}\r\ \n\r\ \n\t@warn \"Not a valid size.\";\r\ \n\t@return null;\r\ \n}\r\ \n\r\ \n@function scale-size($rem-size, $steps) {\r\ \n\t$size-key: get-key-for-value($type-scale, $rem-size);\r\ \n\r\ \n\t@if $size-key {\r\ \n\t\t$new-size: $size-key + $steps;\r\ \n\t\t@return get-size($new-size);\r\ \n\t}\r\ \n\r\ \n\t@warn \"Not able to find size for \" + $rem-size;\r\ \n\t@return null;\r\ \n}\r\ \n\r\ \n@function get-key-for-value($map, $value) {\r\ \n\t@each $map-key, $map-value in $map {\r\ \n\t\t@if $map-value == $value {\r\ \n\t\t\t@return $map-key\r\ \n\t\t}\r\ \n\t}\r\ \n\r\ \n\t@warn $value + \" not found in \" + $map;\r\ \n\t@return null;\r\ \n}\r\ \n\r\ \n$h1-font-size: get-size(5);\r\ \n\r\ \n\r\ \nh1 {\r\ \n font-size: $h1-font-size;\r\ \n\r\ \n small {\r\ \n font-size: scale-size($h1-font-size, -2);\r\ \n color: red;\r\ \n }\r\ \n}\r\ \n\r\n"), "foo {\ \n a: 1;\ \n b: 1px;\ \n}\ \nh1 {\ \n font-size: 2.221rem;\ \n}\ \nh1 small {\ \n font-size: 1.586rem;\ \n color: red;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1669.rs000066400000000000000000000005641474765622100247560ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1669.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1669") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n bar: #{100%/3}\ \n}\n\n"), "foo {\ \n bar: 100%/3;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_167.rs000066400000000000000000000007171474765622100246660ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_167.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_167") } #[test] fn test() { assert_eq!( runner().ok("%l-cell, .l-cell {\r\ \n margin: 0 auto;\r\ \n max-width: 1000px;\r\ \n}"), ".l-cell {\ \n margin: 0 auto;\ \n max-width: 1000px;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1670.rs000066400000000000000000000013141474765622100247400ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1670.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1670") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( ".this-should-error {\ \n @extend %an-undefined-placeholder;\ \n}\n" ), "Error: The target selector was not found.\ \nUse \"@extend %an-undefined-placeholder !optional\" to avoid this error.\ \n ,\ \n2 | @extend %an-undefined-placeholder;\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1671.rs000066400000000000000000000022351474765622100247440ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1671.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1671") } #[test] fn test() { assert_eq!( runner().ok("$foo: 5px;\ \na {\ \n background: url(\'img.png\') no-repeat 6px 0 / #{$foo};\ \n background: url(\'img.png\') no-repeat 6px 1 / #{$foo};\ \n background: url(\'img.png\') no-repeat 6px 1px / #{$foo};\ \n background: url(\'img.png\') no-repeat 6px #{$foo} / 0;\ \n background: url(\'img.png\') no-repeat 6px #{$foo} / 1;\ \n background: url(\'img.png\') no-repeat 6px #{$foo} / 1px;\ \n}\n"), "a {\ \n background: url(\"img.png\") no-repeat 6px 0/5px;\ \n background: url(\"img.png\") no-repeat 6px 1/5px;\ \n background: url(\"img.png\") no-repeat 6px 1px/5px;\ \n background: url(\"img.png\") no-repeat 6px 5px/0;\ \n background: url(\"img.png\") no-repeat 6px 5px/1;\ \n background: url(\"img.png\") no-repeat 6px 5px/1px;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1672.rs000066400000000000000000000006531474765622100247470ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1672.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1672") } #[test] fn test() { assert_eq!( runner().ok("$breakpoint: \'tablet\';\n\ \n.-#{$breakpoint} {\ \n color: #FFF;\ \n}"), ".-tablet {\ \n color: #FFF;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1673.rs000066400000000000000000000012431474765622100247440ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1673.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1673") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%foo {\ \n test: outer;\n\ \n &-inner {\ \n test: inner;\ \n }\ \n}\n\ \n.foo {\ \n @extend %foo;\n\ \n &.inner { @extend %foo-inner; }\ \n}"), ".foo {\ \n test: outer;\ \n}\ \n.foo.inner {\ \n test: inner;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1681/000077500000000000000000000000001474765622100243755ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1681/calc.rs000066400000000000000000000010251474765622100256430ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1681/calc.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("calc") } #[test] fn test() { assert_eq!( runner().err( "@function calc() {\ \n @return null;\ \n}\n" ), "Error: Invalid function name.\ \n ,\ \n1 | @function calc() {\ \n | ^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:1 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1681/element.rs000066400000000000000000000010441474765622100263730ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1681/element.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("element") } #[test] fn test() { assert_eq!( runner().err( "@function element() {\ \n @return null;\ \n}\n" ), "Error: Invalid function name.\ \n ,\ \n1 | @function element() {\ \n | ^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:1 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1681/expression.rs000066400000000000000000000010631474765622100271420ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1681/expression.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("expression") } #[test] fn test() { assert_eq!( runner().err( "@function expression() {\ \n @return null;\ \n}\n" ), "Error: Invalid function name.\ \n ,\ \n1 | @function expression() {\ \n | ^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:1 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1681/mod.rs000066400000000000000000000003461474765622100255250ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1681" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1681") } mod calc; mod element; mod expression; mod url; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1681/url.rs000066400000000000000000000010201474765622100255360ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1681/url.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("url") } #[test] fn test() { assert_eq!( runner().err( "@function url() {\ \n @return null;\ \n}\n" ), "Error: Invalid function name.\ \n ,\ \n1 | @function url() {\ \n | ^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:1 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1683/000077500000000000000000000000001474765622100243775ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1683/function.rs000066400000000000000000000014301474765622100265700ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1683/function.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("function") } #[test] fn test() { assert_eq!( runner().err( "@function foo($x, $y) { @return null }\n\ \na {\ \n b: foo(1 2 3...);\ \n}" ), "Error: Only 2 arguments allowed, but 3 were passed.\ \n ,\ \n1 | @function foo($x, $y) { @return null }\ \n | =========== declaration\ \n... |\ \n4 | b: foo(1 2 3...);\ \n | ^^^^^^^^^^^^^ invocation\ \n \'\ \n input.scss 4:6 foo()\ \n input.scss 4:6 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1683/mixin.rs000066400000000000000000000014031474765622100260670ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1683/mixin.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("mixin") } #[test] fn test() { assert_eq!( runner().err( "@mixin foo($x, $y) { }\n\ \na {\ \n @include foo(1 2 3...);\ \n}\n" ), "Error: Only 2 arguments allowed, but 3 were passed.\ \n ,\ \n1 | @mixin foo($x, $y) { }\ \n | =========== declaration\ \n... |\ \n4 | @include foo(1 2 3...);\ \n | ^^^^^^^^^^^^^^^^^^^^^^ invocation\ \n \'\ \n input.scss 4:3 foo()\ \n input.scss 4:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1683/mod.rs000066400000000000000000000003151474765622100255230ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1683" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1683") } mod function; mod mixin; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1685.rs000066400000000000000000000005751474765622100247560ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1685.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1685") } #[test] fn test() { assert_eq!( runner().ok("@function foo($x, $y...) { @return null }\n\ \na {\ \n b: foo(1 2 3...);\ \n}"), "" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1706.rs000066400000000000000000000013661474765622100247470ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1706.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1706") } #[test] fn test() { assert_eq!( runner().err( "@function calc($e) { @return custom; }\ \n@function -foo-calc($e) { @return custom; }\n\ \n.test {\ \n a: calc(1px * 1%);\ \n b: -foo-calc(2px * 2%);\ \n c: call(calc, 3px * 3%);\ \n}\n" ), "Error: Invalid function name.\ \n ,\ \n1 | @function calc($e) { @return custom; }\ \n | ^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:1 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1709.rs000066400000000000000000000032561474765622100247520ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1709.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1709") } #[test] fn test() { assert_eq!( runner().ok( "@use \"sass:string\";\ \n@use \"sass:meta\";\n\ \n@mixin transition( $prefix_properties, $transitions... ) {\n\ \n @if not string.index( meta.inspect( $transitions ), \',\') {\ \n $transitions: ( $transitions );\ \n }\n\ \n @each $prefix in -webkit-, -moz-, -ms-, -o-, \'\' {\n\ \n $prefixed: \'\';\n\ \n @each $transition in $transitions {\n\ \n @if $prefix_properties and \'\' != $prefix {\ \n $prefixed: #{$prefix}$transition,$transition;\ \n } @else {\ \n $prefixed: $transition;\ \n }\n\n\ \n }\n\ \n #{$prefix}transition: $prefixed;\ \n }\ \n}\n\ \n.my-element {\ \n @include transition( true, transform 0.25s linear );\ \n}\n" ), ".my-element {\ \n -webkit-transition: -webkit- transform 0.25s linear, transform 0.25s linear;\ \n -moz-transition: -moz- transform 0.25s linear, transform 0.25s linear;\ \n -ms-transition: -ms- transform 0.25s linear, transform 0.25s linear;\ \n -o-transition: -o- transform 0.25s linear, transform 0.25s linear;\ \n transition: transform 0.25s linear;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1710.rs000066400000000000000000000007061474765622100247370ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1710.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1710") } #[test] fn test() { assert_eq!( runner().ok("ul, ol {\ \n & & {\ \n display: block;\ \n }\ \n }\n"), "ul ul, ul ol, ol ul, ol ol {\ \n display: block;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1715.rs000066400000000000000000000013361474765622100247440ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1715.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1715") } #[test] fn test() { assert_eq!( runner().err( "div {\ \n color: red(blue, purple);\ \n}" ), "Error: Only 1 argument allowed, but 2 were passed.\ \n ,--> input.scss\ \n2 | color: red(blue, purple);\ \n | ^^^^^^^^^^^^^^^^^ invocation\ \n \'\ \n ,--> sass:color\ \n1 | @function red($color) {\ \n | =========== declaration\ \n \'\ \n input.scss 2:10 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1720.rs000066400000000000000000000007771474765622100247500ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1720.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1720") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( ".test {\ \n a: a#{b//}c;\ \n}\n" ), "Error: expected \"}\".\ \n ,\ \n3 | }\ \n | ^\ \n \'\ \n input.scss 3:2 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1722.rs000066400000000000000000000010111474765622100247300ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1722.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1722") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:map\";\ \n$score: (item-height: 1.12em);\ \n.test {\ \n background-position: 0 -#{map.get($score, item-height)};\ \n}\n\n"), ".test {\ \n background-position: 0 -1.12em;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1723.rs000066400000000000000000000043031474765622100247400ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1723.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1723") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok("@use \"sass:list\";\ \n@use \"sass:meta\";\n\ \ntest-1 test-2 test-3 test-4 test-5,\ \ntest-6 test-7 test-8 test-9 test-10 {\ \n @each $set in & {\ \n set: meta.inspect($set);\n\ \n @each $selector in $set {\ \n selector: meta.inspect($selector);\ \n }\ \n }\ \n}\n\ \ntest-1 test-2 test-3 test-4 test-5,\ \ntest-6 test-7 test-8 test-9 test-10 {\ \n @for $i from 1 through list.length(&) {\ \n $set: list.nth(&, $i);\ \n set: meta.inspect($set);\n\ \n @each $selector in $set {\ \n selector: meta.inspect($selector);\ \n }\ \n }\ \n}"), "test-1 test-2 test-3 test-4 test-5,\ \ntest-6 test-7 test-8 test-9 test-10 {\ \n set: test-1 test-2 test-3 test-4 test-5;\ \n selector: test-1;\ \n selector: test-2;\ \n selector: test-3;\ \n selector: test-4;\ \n selector: test-5;\ \n set: test-6 test-7 test-8 test-9 test-10;\ \n selector: test-6;\ \n selector: test-7;\ \n selector: test-8;\ \n selector: test-9;\ \n selector: test-10;\ \n}\ \ntest-1 test-2 test-3 test-4 test-5,\ \ntest-6 test-7 test-8 test-9 test-10 {\ \n set: test-1 test-2 test-3 test-4 test-5;\ \n selector: test-1;\ \n selector: test-2;\ \n selector: test-3;\ \n selector: test-4;\ \n selector: test-5;\ \n set: test-6 test-7 test-8 test-9 test-10;\ \n selector: test-6;\ \n selector: test-7;\ \n selector: test-8;\ \n selector: test-9;\ \n selector: test-10;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1726.rs000066400000000000000000000006171474765622100247470ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1726.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1726") } #[test] fn test() { assert_eq!( runner().ok("item {\ \n background: #{2px} 2px /*red*/;\ \n}\n"), "item {\ \n background: 2px 2px;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1729.rs000066400000000000000000000031771474765622100247560ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1729.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1729") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok( "%place-to-go {\ \n font-size: 1em;\ \n}\n\ \na::foo(1){\ \n @extend %place-to-go;\ \n}\ \na::foo(2){\ \n @extend %place-to-go;\ \n}\ \nb::foo(1){\ \n @extend %place-to-go;\ \n}\ \nb::foo(2){\ \n @extend %place-to-go;\ \n}\n\ \n:bar(1){\ \n @extend %place-to-go;\ \n}\ \n:bar(2){\ \n @extend %place-to-go;\ \n}\ \n:bar(3){\ \n @extend %place-to-go;\ \n}\n\ \n[foo]{\ \n @extend %place-to-go;\ \n}\ \n[bar]{\ \n @extend %place-to-go;\ \n}\ \n[baz]{\ \n @extend %place-to-go;\ \n}\n\ \n[bar=\"1\"]{\ \n @extend %place-to-go;\ \n}\ \n[bar=\"2\"]{\ \n @extend %place-to-go;\ \n}\ \n[bar=\"3\"]{\ \n @extend %place-to-go;\ \n}\n" ), "[bar=\"3\"], [bar=\"2\"], [bar=\"1\"], [baz], [bar], [foo], :bar(3), :bar(2), :bar(1), b::foo(2), b::foo(1), a::foo(2), a::foo(1) {\ \n font-size: 1em;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1732/000077500000000000000000000000001474765622100243725ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1732/invalid/000077500000000000000000000000001474765622100260205ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1732/invalid/mixin_def.rs000066400000000000000000000011661474765622100303340ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1732/invalid/mixin-def.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("mixin-def") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "@mixin a {\ \n b: c;\ \n}\n\ \n@include a();" ), "Error: Declarations may only be used within style rules.\ \n ,\ \n2 | b: c;\ \n | ^^^^\ \n \'\ \n input.scss 2:3 a()\ \n input.scss 5:1 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1732/invalid/mod.rs000066400000000000000000000003071474765622100271450ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1732/invalid" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("invalid") } mod mixin_def; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1732/mod.rs000066400000000000000000000003141474765622100255150ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1732" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1732") } mod invalid; mod valid; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1732/valid/000077500000000000000000000000001474765622100254715ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1732/valid/directive.rs000066400000000000000000000007351474765622100300220ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1732/valid/directive.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("directive") } #[test] fn test() { assert_eq!( runner().ok("@media all {\ \n .foo {\ \n\tcolor: red;\ \n }\ \n}"), "@media all {\ \n .foo {\ \n color: red;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1732/valid/keyframe.rs000066400000000000000000000011471474765622100276450ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1732/valid/keyframe.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("keyframe") } #[test] fn test() { assert_eq!( runner().ok("@keyframes baz {\ \n 0% { top: 0; bottom: 100; }\ \n 100% { top: 100; bottom: 0; }\ \n}"), "@keyframes baz {\ \n 0% {\ \n top: 0;\ \n bottom: 100;\ \n }\ \n 100% {\ \n top: 100;\ \n bottom: 0;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1732/valid/mixin_call.rs000066400000000000000000000010051474765622100301520ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1732/valid/mixin-call.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("mixin-call") } #[test] fn test() { assert_eq!( runner().ok("@mixin bar() {\ \n @content;\ \n}\n\ \nfoo {\ \n @include bar {\ \n color: blue;\ \n }\ \n}"), "foo {\ \n color: blue;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1732/valid/mixin_def.rs000066400000000000000000000005151474765622100300020ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1732/valid/mixin-def.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("mixin-def") } #[test] fn test() { assert_eq!( runner().ok("@mixin a {\ \n b: c;\ \n}\n"), "" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1732/valid/mod.rs000066400000000000000000000004171474765622100266200ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1732/valid" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("valid") } mod directive; mod keyframe; mod mixin_call; mod mixin_def; mod propset; mod ruleset; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1732/valid/propset.rs000066400000000000000000000007661474765622100275440ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1732/valid/propset.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("propset") } #[test] fn test() { assert_eq!( runner().ok("foo { \ \n border: {\ \n width: 1px;\ \n color: green;\ \n }\ \n}"), "foo {\ \n border-width: 1px;\ \n border-color: green;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1732/valid/ruleset.rs000066400000000000000000000005741474765622100275300ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1732/valid/ruleset.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("ruleset") } #[test] fn test() { assert_eq!( runner().ok("foo { \ \n color: green;\ \n}"), "foo {\ \n color: green;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1733.rs000066400000000000000000000006451474765622100247460ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1733.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1733") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n a: #ff6600;\ \n b: #ff6600\ \n}\n"), "foo {\ \n a: #ff6600;\ \n b: #ff6600;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1739/000077500000000000000000000000001474765622100244015ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1739/basic.rs000066400000000000000000000033771474765622100260420ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1739/basic.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("basic") } #[test] fn test() { assert_eq!( runner().ok("div {\r\ \n baz: 2/3;\r\ \n baz: 2/ 3;\r\ \n baz: 2 /3;\r\ \n baz: 2 / 3;\r\ \n}\r\ \n\r\ \nadd {\r\ \n baz: 2+3;\r\ \n baz: 2+ 3;\r\ \n baz: 2 +3;\r\ \n baz: 2 + 3;\r\ \n}\r\ \n\r\ \nsub {\r\ \n baz: 2-3;\r\ \n baz: 2- 3;\r\ \n baz: 2 -3;\r\ \n baz: 2 - 3;\r\ \n}\r\ \n\r\ \nmul {\r\ \n baz: 2*3;\r\ \n baz: 2* 3;\r\ \n baz: 2 *3;\r\ \n baz: 2 * 3;\r\ \n}\r\ \n\r\ \nmod {\r\ \n baz: 2%3;\r\ \n baz: 2% 3;\r\ \n baz: 2 %3;\r\ \n baz: 2 % 3;\r\ \n}"), "div {\ \n baz: 2/3;\ \n baz: 2/3;\ \n baz: 2/3;\ \n baz: 2/3;\ \n}\ \nadd {\ \n baz: 5;\ \n baz: 5;\ \n baz: 5;\ \n baz: 5;\ \n}\ \nsub {\ \n baz: -1;\ \n baz: -1;\ \n baz: 2 -3;\ \n baz: -1;\ \n}\ \nmul {\ \n baz: 6;\ \n baz: 6;\ \n baz: 6;\ \n baz: 6;\ \n}\ \nmod {\ \n baz: 2% 3;\ \n baz: 2% 3;\ \n baz: 2;\ \n baz: 2;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1739/interpolate/000077500000000000000000000000001474765622100267275ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1739/interpolate/both.rs000066400000000000000000000071741474765622100302420ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1739/interpolate/both.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("both") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "div {\r\ \n baz: #{1/2}/#{1/2};\r\ \n baz: #{1/ 2}/ #{1/ 2};\r\ \n baz: #{1 /2} /#{1 /2};\r\ \n baz: #{1 / 2} / #{1 / 2};\r\ \n}\r\ \n\r\ \nadd {\r\ \n baz: #{1+2}+#{1+2};\r\ \n baz: #{1+ 2}+ #{1+ 2};\r\ \n baz: #{1 +2} +#{1 +2};\r\ \n baz: #{1 + 2} + #{1 + 2};\r\ \n}\r\ \n\r\ \nsub {\r\ \n baz: #{1-2}-#{1-2};\r\ \n baz: #{1- 2}- #{1- 2};\r\ \n baz: #{1 -2} -#{1 -2};\r\ \n baz: #{1 - 2} - #{1 - 2};\r\ \n}\r\ \n\r\ \nmul {\r\ \n baz: #{1*2}*#{1*2};\r\ \n baz: #{1* 2}* #{1* 2};\r\ \n baz: #{1 *2} *#{1 *2};\r\ \n baz: #{1 * 2} * #{1 * 2};\r\ \n}\r\ \n\r\ \nmod {\r\ \n baz: #{1%2}%#{1%2};\r\ \n baz: #{1% 2}% #{1% 2};\r\ \n baz: #{1 %2} %#{1 %2};\r\ \n baz: #{1 % 2} % #{1 % 2};\r\ \n}" ), "DEPRECATION WARNING [strict-unary]: This operation is parsed as:\n\ \n 1 + 2\n\ \nbut you may have intended it to mean:\n\ \n 1 (+2)\n\ \nAdd a space after + to clarify that it\'s meant to be a binary operation, or wrap\ \nit in parentheses to make it a unary operation. This will be an error in future\ \nversions of Sass.\n\ \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\n\ \n ,\ \n11 | baz: #{1 +2} +#{1 +2};\ \n | ^^^^^\ \n \'\ \n input.scss 11:10 root stylesheet\n\ \nDEPRECATION WARNING [strict-unary]: This operation is parsed as:\n\ \n 1 + 2\n\ \nbut you may have intended it to mean:\n\ \n 1 (+2)\n\ \nAdd a space after + to clarify that it\'s meant to be a binary operation, or wrap\ \nit in parentheses to make it a unary operation. This will be an error in future\ \nversions of Sass.\n\ \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\n\ \n ,\ \n11 | baz: #{1 +2} +#{1 +2};\ \n | ^^^^^\ \n \'\ \n input.scss 11:21 root stylesheet\n\ \nDEPRECATION WARNING [strict-unary]: This operation is parsed as:\n\ \n #{1 + 2} + #{1 + 2}\n\ \nbut you may have intended it to mean:\n\ \n #{1 + 2} (+#{1 + 2})\n\ \nAdd a space after + to clarify that it\'s meant to be a binary operation, or wrap\ \nit in parentheses to make it a unary operation. This will be an error in future\ \nversions of Sass.\n\ \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\n\ \n ,\ \n11 | baz: #{1 +2} +#{1 +2};\ \n | ^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 11:8 root stylesheet\n\ \nError: Undefined operation \"2 * 2\".\ \n ,\ \n23 | baz: #{1*2}*#{1*2};\ \n | ^^^^^^^^^^^^^\ \n \'\ \n input.scss 23:8 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1739/interpolate/left.rs000066400000000000000000000054611474765622100302350ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1739/interpolate/left.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("left") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "div {\r\ \n baz: #{1/2}/3;\r\ \n baz: #{1/ 2}/ 3;\r\ \n baz: #{1 /2} /3;\r\ \n baz: #{1 / 2} / 3;\r\ \n}\r\ \n\r\ \nadd {\r\ \n baz: #{1+2}+3;\r\ \n baz: #{1+ 2}+ 3;\r\ \n baz: #{1 +2} +3;\r\ \n baz: #{1 + 2} + 3;\r\ \n}\r\ \n\r\ \nsub {\r\ \n baz: #{1-2}-3;\r\ \n baz: #{1- 2}- 3;\r\ \n baz: #{1 -2} -3;\r\ \n baz: #{1 - 2} - 3;\r\ \n}\r\ \n\r\ \nmul {\r\ \n baz: #{1*2}*3;\r\ \n baz: #{1* 2}* 3;\r\ \n baz: #{1 *2} *3;\r\ \n baz: #{1 * 2} * 3;\r\ \n}\r\ \n\r\ \nmod {\r\ \n baz: #{1%2}%3;\r\ \n baz: #{1% 2}% 3;\r\ \n baz: #{1 %2} %3;\r\ \n baz: #{1 % 2} % 3;\r\ \n}" ), "DEPRECATION WARNING [strict-unary]: This operation is parsed as:\n\ \n 1 + 2\n\ \nbut you may have intended it to mean:\n\ \n 1 (+2)\n\ \nAdd a space after + to clarify that it\'s meant to be a binary operation, or wrap\ \nit in parentheses to make it a unary operation. This will be an error in future\ \nversions of Sass.\n\ \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\n\ \n ,\ \n11 | baz: #{1 +2} +3;\ \n | ^^^^^\ \n \'\ \n input.scss 11:10 root stylesheet\n\ \nDEPRECATION WARNING [strict-unary]: This operation is parsed as:\n\ \n #{1 + 2} + 3\n\ \nbut you may have intended it to mean:\n\ \n #{1 + 2} (+3)\n\ \nAdd a space after + to clarify that it\'s meant to be a binary operation, or wrap\ \nit in parentheses to make it a unary operation. This will be an error in future\ \nversions of Sass.\n\ \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\n\ \n ,\ \n11 | baz: #{1 +2} +3;\ \n | ^^^^^^^^^^^^\ \n \'\ \n input.scss 11:8 root stylesheet\n\ \nError: Undefined operation \"2 * 3\".\ \n ,\ \n23 | baz: #{1*2}*3;\ \n | ^^^^^^^^\ \n \'\ \n input.scss 23:8 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1739/interpolate/mod.rs000066400000000000000000000003411474765622100300520ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1739/interpolate" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("interpolate") } mod both; mod left; mod right; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1739/interpolate/right.rs000066400000000000000000000054621474765622100304210ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1739/interpolate/right.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("right") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "div {\r\ \n baz: 3/#{1/2};\r\ \n baz: 3/ #{1/ 2};\r\ \n baz: 3 /#{1 /2};\r\ \n baz: 3 / #{1 / 2};\r\ \n}\r\ \n\r\ \nadd {\r\ \n baz: 3+#{1+2};\r\ \n baz: 3+ #{1+ 2};\r\ \n baz: 3 +#{1 +2};\r\ \n baz: 3 + #{1 + 2};\r\ \n}\r\ \n\r\ \nsub {\r\ \n baz: 3-#{1-2};\r\ \n baz: 3- #{1- 2};\r\ \n baz: 3 -#{1 -2};\r\ \n baz: 3 - #{1 - 2};\r\ \n}\r\ \n\r\ \nmul {\r\ \n baz: 3*#{1*2};\r\ \n baz: 3* #{1* 2};\r\ \n baz: 3 *#{1 *2};\r\ \n baz: 3 * #{1 * 2};\r\ \n}\r\ \n\r\ \nmod {\r\ \n baz: 3%#{1%2};\r\ \n baz: 3% #{1% 2};\r\ \n baz: 3 %#{1 %2};\r\ \n baz: 3 % #{1 % 2};\r\ \n}" ), "DEPRECATION WARNING [strict-unary]: This operation is parsed as:\n\ \n 1 + 2\n\ \nbut you may have intended it to mean:\n\ \n 1 (+2)\n\ \nAdd a space after + to clarify that it\'s meant to be a binary operation, or wrap\ \nit in parentheses to make it a unary operation. This will be an error in future\ \nversions of Sass.\n\ \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\n\ \n ,\ \n11 | baz: 3 +#{1 +2};\ \n | ^^^^^\ \n \'\ \n input.scss 11:14 root stylesheet\n\ \nDEPRECATION WARNING [strict-unary]: This operation is parsed as:\n\ \n 3 + #{1 + 2}\n\ \nbut you may have intended it to mean:\n\ \n 3 (+#{1 + 2})\n\ \nAdd a space after + to clarify that it\'s meant to be a binary operation, or wrap\ \nit in parentheses to make it a unary operation. This will be an error in future\ \nversions of Sass.\n\ \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\n\ \n ,\ \n11 | baz: 3 +#{1 +2};\ \n | ^^^^^^^^^^^^\ \n \'\ \n input.scss 11:8 root stylesheet\n\ \nError: Undefined operation \"3 * 2\".\ \n ,\ \n23 | baz: 3*#{1*2};\ \n | ^^^^^^^^\ \n \'\ \n input.scss 23:8 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1739/mod.rs000066400000000000000000000003201474765622100255210ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1739" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1739") } mod basic; mod interpolate; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1741.rs000066400000000000000000000007561474765622100247500ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1741.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1741") } #[test] fn test() { assert_eq!( runner().ok(".header {\r\ \n .nav-text-link:not(&.popover-link) {\r\ \n margin: 10px;\r\ \n }\r\ \n}"), ".nav-text-link:not(.header.popover-link) {\ \n margin: 10px;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1752.rs000066400000000000000000000007461474765622100247510ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1752.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1752") } #[test] fn test() { assert_eq!( runner().ok("@mixin some-fn($args...) {\ \n @each $item in $args {\ \n @debug($item);\ \n }\ \n}\n\ \nfoo {\ \n @include some-fn(());\ \n}"), "" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1757/000077500000000000000000000000001474765622100244015ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1757/each.rs000066400000000000000000000020041474765622100256430ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1757/each.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("each") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:list\";\ \n.test .nest {\ \n length: list.length(&);\ \n @each $list in & {\ \n list: $list;\ \n length: list.length($list);\ \n }\ \n}\n\ \n.test, .other {\ \n length: list.length(&);\ \n @each $list in & {\ \n list: $list;\ \n length: list.length($list);\ \n }\ \n}\n"), ".test .nest {\ \n length: 1;\ \n list: .test .nest;\ \n length: 2;\ \n}\ \n.test, .other {\ \n length: 2;\ \n list: .test;\ \n length: 1;\ \n list: .other;\ \n length: 1;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1757/mod.rs000066400000000000000000000003141474765622100255240ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1757" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1757") } mod each; mod test_for; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1757/test_for.rs000066400000000000000000000022041474765622100265720ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1757/for.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("for") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:list\";\ \n.test .nest {\ \n length: list.length(&);\ \n @for $i from 1 through list.length(&) {\ \n $list: list.nth(&, $i);\ \n list: $list;\ \n length: list.length($list);\ \n }\ \n}\n\ \n.test, .other {\ \n length: list.length(&);\ \n @for $i from 1 through list.length(&) {\ \n $list: list.nth(&, $i);\ \n list: $list;\ \n length: list.length($list);\ \n }\ \n}\n"), ".test .nest {\ \n length: 1;\ \n list: .test .nest;\ \n length: 2;\ \n}\ \n.test, .other {\ \n length: 2;\ \n list: .test;\ \n length: 1;\ \n list: .other;\ \n length: 1;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1765.rs000066400000000000000000000006701474765622100247510ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1765.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1765") } #[test] fn test() { assert_eq!( runner().ok( "foo {\ \n bar: 20px /* height */ + 2*5px /* padding */ + 2*1px /*border*/;\ \n}\n" ), "foo {\ \n bar: 32px;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1766.rs000066400000000000000000000011371474765622100247510ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1766.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("issue_1766") .mock_file("foo.scss", "foo { bar: baz }\n") } #[test] fn test() { assert_eq!( runner().ok("@media all { @import \"foo.scss\" }\ \n@media all { @import \"foo.scss\"; }\n"), "@media all {\ \n foo {\ \n bar: baz;\ \n }\ \n}\ \n@media all {\ \n foo {\ \n bar: baz;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1768.rs000066400000000000000000000006121474765622100247500ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1768.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1768") } #[test] fn test() { assert_eq!( runner().ok("@debug(());\ \n@debug(foo, (), bar);\ \n@debug(foo () bar);\ \n@debug((foo: (), bar: baz));"), "" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1770.rs000066400000000000000000000017171474765622100247500ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1770.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1770") } #[test] fn test() { assert_eq!( runner().ok("@function returns-string() {\ \n @return \"selector\";\ \n}\n\ \n#{\"selector\"} {\ \n color: red;\ \n}\n\ \n#{returns-string()} {\ \n color: red;\ \n}\n\ \n#{\"selector\"} selector2 {\ \n color: red;\ \n}\n\ \n#{returns-string()} selector2 {\ \n color: red;\ \n}"), "selector {\ \n color: red;\ \n}\ \nselector {\ \n color: red;\ \n}\ \nselector selector2 {\ \n color: red;\ \n}\ \nselector selector2 {\ \n color: red;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1776.rs000066400000000000000000000006141474765622100247510ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1776.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1776") } #[test] fn test() { assert_eq!( runner().ok("h1 {\r\ \n width :calc(100% - 110px);\r\ \n}"), "h1 {\ \n width: calc(100% - 110px);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1786.rs000066400000000000000000000010721474765622100247510ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1786.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1786") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok("$input: \"\\0_\\a_\\A\";\n\ \ntest {\ \n bug1: \"#{\"_\\a\" + b}\";\ \n bug2: \"#{a $input}\";\ \n}\n"), "@charset \"UTF-8\";\ \ntest {\ \n bug1: \"_\\a b\";\ \n bug2: \"a �_ _ \";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1792.rs000066400000000000000000000007331474765622100247510ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1792.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1792") } #[test] fn test() { assert_eq!( runner().ok("test {\ \n test1: (3px*4in) / 1in;\ \n test2: ((1px*2in) + (3px*4in)) / 1in;\ \n}"), "test {\ \n test1: 0.125in;\ \n test2: 0.1458333333in;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1793.rs000066400000000000000000000011561474765622100247520ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1793.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1793") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "@media (max-width: (2px*5in)) {\ \n foo { bar: baz; }\ \n}\n" ), "Error: calc(10px * 1in) isn\'t a valid CSS value.\ \n ,\ \n1 | @media (max-width: (2px*5in)) {\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 1:20 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1794.rs000066400000000000000000000007171474765622100247550ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1794.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1794") } #[test] fn test() { assert_eq!( runner().ok("@media (max-width /*comment*/ : 500px) {\ \n foo { bar: baz; }\ \n}"), "@media (max-width: 500px) {\ \n foo {\ \n bar: baz;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1796.rs000066400000000000000000000026041474765622100247540ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1796.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1796") } #[test] fn test() { assert_eq!( runner().ok( "@use \"sass:list\";\ \n.parent {\ \n .brother, .sister, .cousin {\ \n color: green;\ \n sel: &;\n\ \n $new-sel: ();\ \n @each $s in & {\ \n $last: list.nth($s, -1);\ \n $new-sel: list.append($new-sel, $s #{\'+\'} $last, comma);\ \n x: $new-sel;\ \n }\ \n @at-root #{$new-sel} {\ \n debug: foo;\ \n }\ \n }\ \n}" ), ".parent .brother, .parent .sister, .parent .cousin {\ \n color: green;\ \n sel: .parent .brother, .parent .sister, .parent .cousin;\ \n x: .parent .brother + .brother;\ \n x: .parent .brother + .brother, .parent .sister + .sister;\ \n x: .parent .brother + .brother, .parent .sister + .sister, .parent .cousin + .cousin;\ \n}\ \n.parent .brother + .brother, .parent .sister + .sister, .parent .cousin + .cousin {\ \n debug: foo;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1797.rs000066400000000000000000000022041474765622100247510ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1797.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1797") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%not {\ \n color: red;\ \n}\ \n.not {\ \n @extend %not;\ \n}\ \ndiv:has(%not) {\ \n color: black;\ \n}\n\ \nbar {\ \n span:not(%not) {\ \n color: black;\ \n }\ \n span:not(&.foo) {\ \n color: black;\ \n }\ \n span:not(&%not) {\ \n color: black;\ \n }\ \n}"), ".not {\ \n color: red;\ \n}\ \ndiv:has(.not) {\ \n color: black;\ \n}\ \nbar span:not(.not) {\ \n color: black;\ \n}\ \nspan:not(bar.foo) {\ \n color: black;\ \n}\ \nspan:not(bar.not) {\ \n color: black;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1798/000077500000000000000000000000001474765622100244065ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1798/mod.rs000066400000000000000000000003041474765622100255300ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1798" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1798") } mod t1; mod t2; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1798/t1.rs000066400000000000000000000005571474765622100253070ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1798/1.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("1") } #[test] fn test() { assert_eq!( runner().ok("a /*#{\"}*/ {\ \n margin: 2px;\ \n}\n"), "a {\ \n margin: 2px;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1798/t2.rs000066400000000000000000000005561474765622100253070ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1798/2.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("2") } #[test] fn test() { assert_eq!( runner().ok("a /*#{#{*/ {\ \n margin: 2px;\ \n}\n"), "a {\ \n margin: 2px;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1801/000077500000000000000000000000001474765622100243675ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1801/import_cycle.rs000066400000000000000000000040001474765622100274200ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1801/import-cycle.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("import-cycle") .mock_file("_alpha.scss", "@import 'beta';\n") .mock_file("_beta.scss", "@import 'alpha';\n") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "@import \'alpha\';\n" ), "DEPRECATION WARNING [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ \nMore info and automated migrator: https://sass-lang.com/d/import\n\ \n ,\ \n1 | @import \'alpha\';\ \n | ^^^^^^^\ \n \'\ \n input.scss 1:9 root stylesheet\n\ \nDEPRECATION WARNING [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ \nMore info and automated migrator: https://sass-lang.com/d/import\n\ \n ,\ \n1 | @import \'beta\';\ \n | ^^^^^^\ \n \'\ \n _alpha.scss 1:9 @import\ \n input.scss 1:9 root stylesheet\n\ \nDEPRECATION WARNING [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ \nMore info and automated migrator: https://sass-lang.com/d/import\n\ \n ,\ \n1 | @import \'alpha\';\ \n | ^^^^^^^\ \n \'\ \n _beta.scss 1:9 @import\ \n _alpha.scss 1:9 @import\ \n input.scss 1:9 root stylesheet\n\ \nError: This file is already being loaded.\ \n ,--> _beta.scss\ \n1 | @import \'alpha\';\ \n | ^^^^^^^ new load\ \n \'\ \n ,--> input.scss\ \n1 | @import \'alpha\';\ \n | ======= original load\ \n \'\ \n _beta.scss 1:9 @import\ \n _alpha.scss 1:9 @import\ \n input.scss 1:9 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1801/mod.rs000066400000000000000000000003051474765622100255120ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1801" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1801") } mod import_cycle; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1803/000077500000000000000000000000001474765622100243715ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1803/mod.rs000066400000000000000000000003151474765622100255150ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1803" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1803") } mod nested; mod shallow; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1803/nested.rs000066400000000000000000000012031474765622100262150ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1803/nested.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("nested") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "a {\ \n display: block\n\ \n b {\ \n c {\ \n foo: bar;\ \n }\ \n }\ \n}\n" ), "Error: expected \":\".\ \n ,\ \n5 | c {\ \n | ^\ \n \'\ \n input.scss 5:7 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1803/shallow.rs000066400000000000000000000007421474765622100264130ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1803/shallow.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("shallow") } #[test] fn test() { assert_eq!( runner().ok("a {\ \n display: block\n\ \n b {\ \n foo: bar;\ \n }\ \n}\n"), "a {\ \n display: block b;\ \n display-foo: bar;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1804/000077500000000000000000000000001474765622100243725ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1804/inline.rs000066400000000000000000000011031474765622100262110ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1804/inline.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("inline") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "foo {\ \n bar: #{(2px*5in)};\ \n}\n" ), "Error: calc(10px * 1in) isn\'t a valid CSS value.\ \n ,\ \n2 | bar: #{(2px*5in)};\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 2:10 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1804/mod.rs000066400000000000000000000003161474765622100255170ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1804" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1804") } mod inline; mod variable; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1804/variable.rs000066400000000000000000000012051474765622100265230ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1804/variable.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("variable") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "$foo: 2px;\ \n$bar: 5in;\n\ \nfoo {\ \n bar: #{($foo*$bar)};\ \n}\n" ), "Error: calc(10px * 1in) isn\'t a valid CSS value.\ \n ,\ \n5 | bar: #{($foo*$bar)};\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 5:10 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1812.rs000066400000000000000000000011351474765622100247370ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1812.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1812") } #[test] fn test() { assert_eq!( runner().ok("@svg-load test url(foo.svg) {\r\ \n fill: red;\r\ \n}\r\ \n\r\ \n.foo {\r\ \n background: svg-inline(test);\r\ \n}"), "@svg-load test url(foo.svg) {\ \n fill: red;\ \n}\ \n.foo {\ \n background: svg-inline(test);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1813.rs000066400000000000000000000011751474765622100247440ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1813.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1813") } #[test] fn test() { assert_eq!( runner().ok("@function foo($value) {\ \n $a: bar($value);\ \n @return $value;\ \n}\n\ \n@function bar($list) {\ \n @while (true) {\ \n @return true;\ \n }\ \n}\n\ \na {\ \n b: foo(true);\ \n}\n"), "a {\ \n b: true;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1819.rs000066400000000000000000000007341474765622100247520ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1819.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1819") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:meta\";\ \n@use \"sass:selector\";\ \nfoo {\ \n bar: meta.type-of(selector.unify(\'p\', \'a\'));\ \n}"), "foo {\ \n bar: null;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1822.rs000066400000000000000000000011661474765622100247440ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1822.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1822") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( ".btn {\ \n .open& {\ \n color: #000;\ \n }\ \n}\n" ), "Error: \"&\" may only used at the beginning of a compound selector.\ \n ,\ \n2 | .open& {\ \n | ^\ \n \'\ \n input.scss 2:10 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1825.rs000066400000000000000000000007251474765622100247470ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1825.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1825") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n &-- {\ \n &baz {\ \n color: red;\ \n } \ \n } \ \n} "), "foo--baz {\ \n color: red;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1839.rs000066400000000000000000000005601474765622100247510ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1839.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1839") } #[test] fn test() { assert_eq!( runner().ok("@custom-media --large-viewport (min-width: 1001px);"), "@custom-media --large-viewport (min-width: 1001px);\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_185/000077500000000000000000000000001474765622100243135ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_185/hoisting.rs000066400000000000000000000027211474765622100265070ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_185/hoisting.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("hoisting") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok( "@media only screen {\ \n .foo {\ \n content: bar;\n\ \n @media (min-width: 1337px) {\ \n content: baz;\ \n }\n\ \n content: foo;\ \n }\ \n}\n\ \n$foo: \"(min-width: 0) and (max-width: 599px), (min-width: 600px) and (max-width: 899px)\";\ \n@media #{$foo} {\ \n $bar: \"(min-width: 0) and (max-width: 599px)\";\ \n @media #{$bar} {\ \n .foo {\ \n content: bar;\ \n }\ \n }\ \n}\n" ), "@media only screen {\ \n .foo {\ \n content: bar;\ \n content: foo;\ \n }\ \n}\ \n@media only screen and (min-width: 1337px) {\ \n .foo {\ \n content: baz;\ \n }\ \n}\ \n@media (min-width: 0) and (max-width: 599px) and (min-width: 0) and (max-width: 599px), (min-width: 600px) and (max-width: 899px) and (min-width: 0) and (max-width: 599px) {\ \n .foo {\ \n content: bar;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_185/media_level_4.rs000066400000000000000000000020221474765622100273460ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_185/media_level_4.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("media_level_4") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok(".foo {\ \n @media (pointer: none) {\ \n content: foo;\n\ \n @media (scripting) {\ \n content: baz;\n\ \n @media (light-level: dim) {\ \n content: bar;\ \n }\ \n }\ \n }\ \n}\n"), "@media (pointer: none) {\ \n .foo {\ \n content: foo;\ \n }\ \n}\ \n@media (pointer: none) and (scripting) {\ \n .foo {\ \n content: baz;\ \n }\ \n}\ \n@media (pointer: none) and (scripting) and (light-level: dim) {\ \n .foo {\ \n content: bar;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_185/media_wrapper_selector.rs000066400000000000000000000026101474765622100313770ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_185/media_wrapper_selector.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("media_wrapper_selector") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok("@media all {\ \n .bar { content: baz; }\n\ \n @media (min-width: 1337px) {\ \n .foo { content: bar; }\ \n }\ \n}\n\ \n@media all {\ \n .bar { content: baz; }\n\ \n @media (min-width: 1337px) {\ \n .baz { content: foo; }\n\ \n @media (max-width: 42em) {\ \n .foo { content: bar; }\ \n }\ \n }\ \n}\n"), "@media all {\ \n .bar {\ \n content: baz;\ \n }\ \n}\ \n@media (min-width: 1337px) {\ \n .foo {\ \n content: bar;\ \n }\ \n}\ \n@media all {\ \n .bar {\ \n content: baz;\ \n }\ \n}\ \n@media (min-width: 1337px) {\ \n .baz {\ \n content: foo;\ \n }\ \n}\ \n@media (min-width: 1337px) and (max-width: 42em) {\ \n .foo {\ \n content: bar;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_185/merge_no_repeat.rs000066400000000000000000000016761474765622100300260ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_185/merge_no_repeat.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("merge_no_repeat") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok(".foo {\ \n content: foo;\n\ \n @media only screen and (min-width: 1337px) {\ \n content: bar;\n\ \n @media only screen and (max-width: 42em) {\ \n content: baz;\ \n }\ \n }\ \n}\n"), ".foo {\ \n content: foo;\ \n}\ \n@media only screen and (min-width: 1337px) {\ \n .foo {\ \n content: bar;\ \n }\ \n}\ \n@media only screen and (min-width: 1337px) and (max-width: 42em) {\ \n .foo {\ \n content: baz;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_185/mixin.rs000066400000000000000000000032001474765622100260000ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_185/mixin.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("mixin") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok( "@use \"sass:list\";\ \n@function shift($list) {\ \n @if list.length($list) == 1 { @return (); }\n\ \n $new: ();\ \n @for $i from 2 through list.length($list) {\ \n $new: list.append($new, list.nth($list, $i));\ \n }\ \n @return $new;\ \n}\n\ \n@mixin media($medias...) {\ \n @if list.length($medias) == 0 {\ \n @content;\ \n } @else {\ \n @media #{list.nth($medias, 1)} {\ \n @include media(shift($medias)...) {\ \n @content;\ \n }\ \n }\ \n }\ \n}\n\ \n.foo {\ \n @include media(\'only screen\', \'(color)\', \'(orientation: portrait)\') {\ \n content: bar;\ \n }\ \n}\n\ \n@include media(\'all\', \'(min-width: 42em)\') {\ \n .foo {\ \n content: bar;\ \n }\ \n}\n" ), "@media only screen and (color) and (orientation: portrait) {\ \n .foo {\ \n content: bar;\ \n }\ \n}\ \n@media (min-width: 42em) {\ \n .foo {\ \n content: bar;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_185/mod.rs000066400000000000000000000004571474765622100254460ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_185" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_185") } mod hoisting; mod media_level_4; mod media_wrapper_selector; mod merge_no_repeat; mod mixin; mod selector_wrapper_media; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_185/selector_wrapper_media.rs000066400000000000000000000027131474765622100314030ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_185/selector_wrapper_media.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("selector_wrapper_media") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok(".foo {\ \n @media all {\ \n content: baz;\n\ \n @media (min-width: 1337px) {\ \n content: bar;\ \n }\ \n }\ \n}\n\ \n.foo {\ \n @media all {\ \n content: baz;\n\ \n @media (min-width: 1337px) {\ \n content: foo;\n\ \n @media (max-width: 42em) {\ \n content: bar;\ \n }\ \n }\ \n }\ \n}\n"), "@media all {\ \n .foo {\ \n content: baz;\ \n }\ \n}\ \n@media (min-width: 1337px) {\ \n .foo {\ \n content: bar;\ \n }\ \n}\ \n@media all {\ \n .foo {\ \n content: baz;\ \n }\ \n}\ \n@media (min-width: 1337px) {\ \n .foo {\ \n content: foo;\ \n }\ \n}\ \n@media (min-width: 1337px) and (max-width: 42em) {\ \n .foo {\ \n content: bar;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1873.rs000066400000000000000000000012721474765622100247500ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1873.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1873") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( ".a {\ \n display: block;\ \n}\n\ \n.b {\ \n @at-root (with: media) {\ \n @extend .a;\ \n }\ \n}" ), "Error: @extend may only be used within style rules.\ \n ,\ \n7 | @extend .a;\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 7:5 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1886.rs000066400000000000000000000005731474765622100247570ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1886.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1886") } #[test] fn test() { assert_eq!( runner().ok("body {\ \n background: url()\ \n}"), "body {\ \n background: url();\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1889.rs000066400000000000000000000012441474765622100247560ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1889.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1889") } #[test] fn test() { assert_eq!( runner().ok("@media (min-width: 640px) { \ \n /* comment */\ \n}\n\ \ndiv {\ \n @media (min-width: 320px) { \ \n /* comment */\ \n }\ \n}"), "@media (min-width: 640px) {\ \n /* comment */\ \n}\ \n@media (min-width: 320px) {\ \n div {\ \n /* comment */\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1890.rs000066400000000000000000000014201474765622100247420ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1890.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1890") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".wrap {\ \n @media (min-width: 480px) { \ \n display: block;\ \n @at-root (without: media){ \ \n .box { \ \n display: inline-block;\ \n }\ \n } \ \n }\ \n}"), "@media (min-width: 480px) {\ \n .wrap {\ \n display: block;\ \n }\ \n}\ \n.wrap .box {\ \n display: inline-block;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1898.rs000066400000000000000000000012441474765622100247560ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1898.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1898") } #[test] fn test() { assert_eq!( runner().ok("@media (min-width: 640px) { \ \n /* comment */\ \n}\n\ \ndiv {\ \n @media (min-width: 320px) { \ \n /* comment */\ \n }\ \n}"), "@media (min-width: 640px) {\ \n /* comment */\ \n}\ \n@media (min-width: 320px) {\ \n div {\ \n /* comment */\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1901.rs000066400000000000000000000006551474765622100247440ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1901.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1901") } #[test] fn test() { assert_eq!( runner().ok("a, b {\ \n &:not(c) {\ \n d: e;\ \n }\ \n}\n"), "a:not(c), b:not(c) {\ \n d: e;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1904.rs000066400000000000000000000006531474765622100247450ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1904.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1904") } #[test] fn test() { assert_eq!( runner().ok(".foo {\ \n &--#{\'bar\'} {\ \n color: red;\ \n }\ \n}"), ".foo--bar {\ \n color: red;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1907.rs000066400000000000000000000006061474765622100247460ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1907.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1907") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n bar: \'test\' + \'1 #{2} 3\';\ \n}"), "foo {\ \n bar: \"test1 2 3\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1915.rs000066400000000000000000000011741474765622100247460ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1915.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1915") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("@mixin wrapper() {\ \n .wrapped {\ \n @content;\ \n }\ \n}\n\ \n%ext {\ \n background: #000;\ \n}\n\ \n@include wrapper() {\ \n @extend %ext;\ \n}"), ".wrapped {\ \n background: #000;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1916.rs000066400000000000000000000020431474765622100247430ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1916.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1916") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( ".z-depth-1 {\ \n box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);\ \n}\n\ \n.z-depth-1-half {\ \n box-shadow: 0 5px 11px 0 rgba(0, 0, 0, 0.18), 0 4px 15px 0 rgba(0, 0, 0, 0.15);\ \n}\n\ \n.btn {\ \n @extend .z-depth-1;\n\ \n &:hover {\ \n @extend .z-depth-half-1;\ \n }\ \n}\n" ), "Error: The target selector was not found.\ \nUse \"@extend .z-depth-half-1 !optional\" to avoid this error.\ \n ,\ \n13 | @extend .z-depth-half-1;\ \n | ^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 13:5 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_192.rs000066400000000000000000000014041474765622100246560ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_192.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_192") } #[test] fn test() { assert_eq!( runner().ok("@function test($from, $to) {\r\ \n @warn \'Starting loop\';\r\ \n @for $i from $from through $to {\r\ \n @warn \'Step #{$i}\' ;\r\ \n }\r\ \n @warn \'Finished loop\';\r\ \n @return 100%;\r\ \n}\r\ \nbody {\r\ \n width: test(0, 1);\r\ \n height: test(-1, 1);\r\ \n}"), "body {\ \n width: 100%;\ \n height: 100%;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1923.rs000066400000000000000000000021201474765622100247350ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1923.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1923") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "%btnBase {\ \n display: none;\ \n}\n\ \n@mixin mobile {\ \n @media only screen and (min-width:300px) {\ \n @content;\ \n }\ \n}\n\ \n@include mobile {\ \n a {\ \n @extend %btnBase;\ \n }\ \n}" ), "Error: From line 1, column 1 of input.scss: \ \n ,\ \n1 | %btnBase {\ \n | ^^^^^^^^^\ \n \'\ \nYou may not @extend selectors across media queries.\ \n ,\ \n13 | @extend %btnBase;\ \n | ^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 13:5 @content\ \n input.scss 7:5 mobile()\ \n input.scss 11:1 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1926.rs000066400000000000000000000002661474765622100247510ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1926.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1926") } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1927.rs000066400000000000000000000011271474765622100247470ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1927.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1927") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("@media screen {\ \n $variable: dynamic;\ \n .foo-#{$variable} {a: b}\ \n .bar {\ \n @extend .foo-dynamic\ \n }\ \n}"), "@media screen {\ \n .foo-dynamic, .bar {\ \n a: b;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1931.rs000066400000000000000000000007121474765622100247410ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1931.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1931") } #[test] fn test() { assert_eq!( runner().ok("$var: \'http://test.com\';\ \nbody {\ \n background-image: url( #{$var});\ \n}"), "body {\ \n background-image: url(http://test.com);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1940.rs000066400000000000000000000022171474765622100247430ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1940.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1940") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:map\";\ \n// ----\r\ \n// libsass (v3.3.2)\r\ \n// ----\r\ \n\r\ \n$prefix:(\r\ \n\tfoo: foo,\r\ \n\tbar: #bar\r\ \n);\r\ \n\r\ \n#{map.get($prefix, foo)} {\r\ \n color: red;\r\ \n}\r\ \n#{map.get($prefix, bar)} {\r\ \n color: red;\r\ \n}\r\ \n\r\ \n#{map.get($prefix, foo)} .baz {\r\ \n color: red;\r\ \n}\r\ \n#{map.get($prefix, bar)} .baz {\r\ \n color: red;\r\ \n}"), "foo {\ \n color: red;\ \n}\ \n#bar {\ \n color: red;\ \n}\ \nfoo .baz {\ \n color: red;\ \n}\ \n#bar .baz {\ \n color: red;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1941/000077500000000000000000000000001474765622100243745ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1941/function_function.rs000066400000000000000000000013651474765622100305010ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1941/function_function.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("function_function") } #[test] fn test() { assert_eq!( runner().err( "@function parent() {\ \n @function nested() {\ \n @return foo;\ \n }\n\ \n @return nested();\ \n}\n\n\ \ntest {\ \n foo: parent();\ \n}\n" ), "Error: This at-rule is not allowed here.\ \n ,\ \n2 | @function nested() {\ \n | ^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1941/function_mixin.rs000066400000000000000000000013341474765622100277740ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1941/function_mixin.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("function_mixin") } #[test] fn test() { assert_eq!( runner().err( "@function parent() {\ \n @mixin nested {\ \n foo: bar;\ \n }\n\ \n @include nested;\ \n}\n\n\ \ntest {\ \n foo: parent();\ \n}\n" ), "Error: This at-rule is not allowed here.\ \n ,\ \n2 | @mixin nested {\ \n | ^^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1941/mixin_function.rs000066400000000000000000000013641474765622100277770ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1941/mixin_function.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("mixin_function") } #[test] fn test() { assert_eq!( runner().err( "@mixin parent {\ \n @function nested() {\ \n @return foo;\ \n }\n\ \n foo: nested();\ \n}\n\n\ \ntest {\ \n @include parent;\ \n}\n" ), "Error: Mixins may not contain function declarations.\ \n ,\ \n2 | @function nested() {\ \n | ^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1941/mixin_mixin.rs000066400000000000000000000013341474765622100272730ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1941/mixin_mixin.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("mixin_mixin") } #[test] fn test() { assert_eq!( runner().err( "@mixin parent {\ \n @mixin nested {\ \n foo: bar;\ \n }\n\ \n @include nested;\ \n}\n\n\ \ntest {\ \n @include parent;\ \n}\n" ), "Error: Mixins may not contain mixin declarations.\ \n ,\ \n2 | @mixin nested {\ \n | ^^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1941/mod.rs000066400000000000000000000004061474765622100255210ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1941" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1941") } mod function_function; mod function_mixin; mod mixin_function; mod mixin_mixin; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1944.rs000066400000000000000000000011321474765622100247420ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1944.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1944") } #[test] fn test() { assert_eq!( runner().ok("$count: 0;\n\ \n@function foo() {\ \n $count: $count + 1 !global;\ \n $selector: (\'.bar\' \'baz\');\ \n @return $selector;\ \n}\n\n\ \n#{foo()} {\ \n count: $count;\ \n}\n"), ".bar baz {\ \n count: 1;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1945.rs000066400000000000000000000005741474765622100247540ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1945.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1945") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n bar: #{\"\\\\\"}#{\"baz\"};\ \n}"), "foo {\ \n bar: \\baz;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1947.rs000066400000000000000000000010421474765622100247450ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1947.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1947") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:string\";\ \n.a-#{string.quote(\'\' + b)} {\ \n c: d;\ \n}\n\ \n.a-#{\'\' + b} {\ \n c: d;\ \n}"), ".a-b {\ \n c: d;\ \n}\ \n.a-b {\ \n c: d;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1960.rs000066400000000000000000000011511474765622100247410ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1960.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1960") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("foo:not(.missing) {\ \n a: b;\n\ \n &:hover { c: d; }\ \n}\n\ \nbar {\ \n @extend .missing;\ \n}"), "foo:not(.missing):not(bar) {\ \n a: b;\ \n}\ \nfoo:not(.missing):not(bar):hover {\ \n c: d;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1969.rs000066400000000000000000000013571474765622100247620ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1969.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1969") } #[test] fn test() { assert_eq!( runner().ok( "@use \"sass:color\";\ \n$base-text-color: #666;\n\ \n@function calcNavbarTextColor ($base-text-color) {\ \n @return $base-text-color;\ \n}\n\ \n$header-text-color: calcNavbarTextColor($base-text-color);\n\ \n.test_class {\ \n color: color.adjust($header-text-color, $lightness: 20%);\ \n}" ), ".test_class {\ \n color: #999999;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1971.rs000066400000000000000000000016121474765622100247450ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1971.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1971") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%foo1 {\ \n @supports (flex-wrap: wrap) {\ \n flex: auto;\ \n }\ \n}\n\ \n@supports (flex-wrap: wrap) {\ \n %foo2 {\ \n flex: auto;\ \n }\ \n}\n\ \n.bar {\ \n @extend %foo1;\ \n @extend %foo2;\ \n}\n"), "@supports (flex-wrap: wrap) {\ \n .bar {\ \n flex: auto;\ \n }\ \n}\ \n@supports (flex-wrap: wrap) {\ \n .bar {\ \n flex: auto;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1977.rs000066400000000000000000000011011474765622100247440ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1977.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1977") } #[test] fn test() { assert_eq!( runner().ok("body#some-\\(selector\\) {\ \ncolor: red;\ \n}\n\ \n#äöü {\ \n color: reds;\ \n}"), "@charset \"UTF-8\";\ \nbody#some-\\(selector\\) {\ \n color: red;\ \n}\ \n#äöü {\ \n color: reds;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1991.rs000066400000000000000000000005441474765622100247520ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1991.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1991") } #[test] fn test() { assert_eq!( runner().ok("$tests: (\ \n 0: \'foo\',\ \n false: \'bar\',\ \n);"), "" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1993.rs000066400000000000000000000005611474765622100247530ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1993.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1993") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".test {\ \n @extend #{\'%test\'} !optional\ \n}"), "" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1994.rs000066400000000000000000000017301474765622100247530ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1994.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1994") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%hoverbrighter {\ \n &:hover,\ \n &:focus {\ \n opacity: .8;\n\ \n @supports (filter: brightness(120%)) {\ \n filter: brightness(120%);\ \n }\ \n }\ \n}\n\ \n.productportal-link {\ \n @extend %hoverbrighter;\ \n}"), ".productportal-link:hover, .productportal-link:focus {\ \n opacity: 0.8;\ \n}\ \n@supports (filter: brightness(120%)) {\ \n .productportal-link:hover, .productportal-link:focus {\ \n filter: brightness(120%);\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_1996.rs000066400000000000000000000006531474765622100247600ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_1996.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1996") } #[test] fn test() { assert_eq!( runner().ok("$foo: \"bar\";\n\ \n%class //#{$foo}\ \n{\ \n &_baz {\ \n color: red;\ \n }\ \n}"), "" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2000.rs000066400000000000000000000011511474765622100247230ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2000.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2000") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".m__exhibit-header--medium {\ \n @extend #{&}--plain;\ \n &--plain {\ \n font-size: --&;\ \n }\ \n}"), ".m__exhibit-header--medium--plain, .m__exhibit-header--medium {\ \n font-size: -- .m__exhibit-header--medium--plain;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2006.rs000066400000000000000000000010361474765622100247330ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2006.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2006") } #[test] fn test() { assert_eq!( runner().ok("@mixin main() {\ \n bar {\ \n baz: 1;\ \n }\ \n}\n\ \nfoo {\ \n @at-root {\ \n @include main();\ \n }\ \n}\n"), "bar {\ \n baz: 1;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2007.rs000066400000000000000000000013711474765622100247360ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2007.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2007") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("@mixin foo() {\ \n @media (mix-width: 100px) {\ \n @extend %bar;\ \n }\ \n}\n\ \nfoo {\ \n @media (mix-width: 100px) {\ \n %bar {\ \n foo: bar;\ \n }\ \n }\n\ \n @include foo;\ \n}\n"), "@media (mix-width: 100px) {\ \n foo foo {\ \n foo: bar;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2009.rs000066400000000000000000000020531474765622100247360ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2009.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2009") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("@mixin breakpoint() {\ \n @media (min-width: 200px) {\ \n @content;\ \n }\ \n}\n\ \n@mixin foo() {\ \n @include breakpoint {\ \n @extend %reveal-centered;\ \n }\ \n}\n\n\ \nfoo {\ \n @include breakpoint {\ \n %reveal-centered {\ \n left: auto;\ \n right: auto;\ \n margin: 0 auto;\ \n }\ \n }\n\ \n @include foo;\ \n}\n"), "@media (min-width: 200px) {\ \n foo foo {\ \n left: auto;\ \n right: auto;\ \n margin: 0 auto;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_201.rs000066400000000000000000000005131474765622100246450ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_201.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_201") } #[test] fn test() { assert_eq!( runner().ok("a, b, { color: red; }"), "a, b {\ \n color: red;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2017.rs000066400000000000000000000015631474765622100247420ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2017.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2017") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("foo {\r\ \n bar: baz;\r\ \n}\r\ \n\r\ \n@mixin link() {\r\ \n a:not(.btn) {\r\ \n color: red;\r\ \n }\r\ \n}\r\ \n\r\ \nfoo {\r\ \n @include link;\r\ \n @extend .btn;\r\ \n @include link;\r\ \n}"), "foo {\ \n bar: baz;\ \n}\ \nfoo a:not(.btn):not(foo) {\ \n color: red;\ \n}\ \nfoo a:not(.btn):not(foo) {\ \n color: red;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2020.rs000066400000000000000000000011641474765622100247310ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2020.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2020") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:list\";\ \n@use \"sass:meta\";\n\ \nform {\ \n $selector: list.nth(&, 1);\ \n sel: meta.inspect($selector);\ \n $selector: list.nth($selector, 1);\ \n sel: meta.inspect($selector);\ \n}"), "form {\ \n sel: form;\ \n sel: form;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2023/000077500000000000000000000000001474765622100243645ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2023/id_selector_id.rs000066400000000000000000000010401474765622100276750ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2023/id-selector-id.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("id-selector-id") } #[test] #[ignore] // missing error fn test() { assert_eq!( runner().err( "#2b {\r\ \n color: red;\r\ \n}\r\n" ), "Error: Expected identifier.\ \n ,\ \n1 | #2b {\ \n | ^\ \n \'\ \n input.scss 1:2 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2023/id_selector_nr.rs000066400000000000000000000010361474765622100277250ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2023/id-selector-nr.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("id-selector-nr") } #[test] #[ignore] // missing error fn test() { assert_eq!( runner().err( "#2 {\r\ \n color: red;\r\ \n}\r\n" ), "Error: Expected identifier.\ \n ,\ \n1 | #2 {\ \n | ^\ \n \'\ \n input.scss 1:2 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2023/mod.rs000066400000000000000000000004161474765622100255120ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2023" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2023") } mod id_selector_id; mod id_selector_nr; mod pseudo_selector_id; mod pseudo_selector_nr; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2023/pseudo_selector_id.rs000066400000000000000000000010501474765622100306010ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2023/pseudo-selector-id.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("pseudo-selector-id") } #[test] #[ignore] // missing error fn test() { assert_eq!( runner().err( "#4d {\r\ \n color: red;\r\ \n}\r\n" ), "Error: Expected identifier.\ \n ,\ \n1 | #4d {\ \n | ^\ \n \'\ \n input.scss 1:2 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2023/pseudo_selector_nr.rs000066400000000000000000000010461474765622100306310ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2023/pseudo-selector-nr.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("pseudo-selector-nr") } #[test] #[ignore] // missing error fn test() { assert_eq!( runner().err( "#4 {\r\ \n color: red;\r\ \n}\r\n" ), "Error: Expected identifier.\ \n ,\ \n1 | #4 {\ \n | ^\ \n \'\ \n input.scss 1:2 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2031/000077500000000000000000000000001474765622100243635ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2031/extended_not.rs000066400000000000000000000014711474765622100274140ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2031/extended-not.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("extended-not") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok( "@use \"sass:selector\";\ \n:not(.foo) {\r\ \n content: test;\r\ \n}\r\ \n.bar, .baz {\r\ \n @extend .foo;\r\ \n}\r\ \n\r\ \ntest {\r\ \n content: selector.extend(\":not(.foo)\", \".foo\", \".bar\");\r\ \n}" ), ":not(.foo):not(.bar):not(.baz) {\ \n content: test;\ \n}\ \ntest {\ \n content: :not(.foo):not(.bar);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2031/mod.rs000066400000000000000000000003271474765622100255120ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2031" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2031") } mod extended_not; mod wrapped_not; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2031/wrapped_not.rs000066400000000000000000000006351474765622100272570ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2031/wrapped-not.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("wrapped-not") } #[test] fn test() { assert_eq!( runner().ok(":not(.asd, .qwe) {\r\ \n content: test;\r\ \n}"), ":not(.asd, .qwe) {\ \n content: test;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2034.rs000066400000000000000000000011531474765622100247340ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2034.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2034") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(":not(.thing) {\r\ \n color: red;\r\ \n}\r\ \n:not(.bar) {\r\ \n @extend .thing;\r\ \n background: blue;\r\ \n}"), ":not(.thing) {\ \n color: red;\ \n}\ \n:not(.bar) {\ \n background: blue;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2042.rs000066400000000000000000000011441474765622100247330ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2042.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2042") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok(".wizard-editor {\r\ \n transform: scale(50/1);\r\ \n transform: scale((50/1));\r\ \n transform: scale( (50/1) );\r\ \n}"), ".wizard-editor {\ \n transform: scale(50/1);\ \n transform: scale(50);\ \n transform: scale(50);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2053.rs000066400000000000000000000016771474765622100247500ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2053.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2053") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".foo[disabled] {\ \n @extend .foo;\ \n background: blue;\ \n }\ \n.bar[disabled] {\ \n foo {\ \n @extend .bar;\ \n background: blue;\ \n }\ \n}\ \nfoo {\ \n .baz[disabled] {\ \n @extend .baz;\ \n background: blue;\ \n }\ \n}"), ".foo[disabled] {\ \n background: blue;\ \n}\ \n.bar[disabled] foo {\ \n background: blue;\ \n}\ \nfoo .baz[disabled] {\ \n background: blue;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2054.rs000066400000000000000000000011531474765622100247360ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2054.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2054") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(":not(.thing) {\r\ \n color: red;\r\ \n}\r\ \n:not(.bar) {\r\ \n @extend .thing;\r\ \n background: blue;\r\ \n}"), ":not(.thing) {\ \n color: red;\ \n}\ \n:not(.bar) {\ \n background: blue;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2055.rs000066400000000000000000000054551474765622100247500ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2055.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2055") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok( ":not(.thing) {\ \n color: red;\ \n}\ \n:not(.thing[disabled]) {\ \n @extend .thing;\ \n background: blue;\ \n}\ \n:has(:not(.thing[disabled])) {\ \n @extend .thing;\ \n background: blue;\ \n}\n" ), ":not(.thing):not(:not(.thing[disabled]):not([disabled]:has(:not(.thing[disabled]):not([disabled]:not(.thing[disabled]))))) {\ \n color: red;\ \n}\ \n:not(.thing[disabled]):not([disabled]:has(:not(.thing[disabled]):not([disabled]:not(.thing[disabled])))):not([disabled]:not(.thing[disabled]):not([disabled]:has(:not(.thing[disabled]):not([disabled]:not(.thing[disabled]))))):not([disabled]:has(:not(.thing[disabled]):not([disabled]:has(:not(.thing[disabled]):not([disabled]:not(.thing[disabled])))):not([disabled]:not(.thing[disabled]):not([disabled]:has(:not(.thing[disabled]):not([disabled]:not(.thing[disabled]))))))):not([disabled]:not(.thing[disabled]):not([disabled]:has(:not(.thing[disabled]):not([disabled]:not(.thing[disabled])))):not([disabled]:not(.thing[disabled]):not([disabled]:has(:not(.thing[disabled]):not([disabled]:not(.thing[disabled]))))):not([disabled]:has(:not(.thing[disabled]):not([disabled]:has(:not(.thing[disabled]):not([disabled]:not(.thing[disabled])))):not([disabled]:not(.thing[disabled]):not([disabled]:has(:not(.thing[disabled]):not([disabled]:not(.thing[disabled])))))))) {\ \n background: blue;\ \n}\ \n:has(:not(.thing[disabled]):not([disabled]:has(:not(.thing[disabled]):not([disabled]:not(.thing[disabled])))):not([disabled]:not(.thing[disabled]):not([disabled]:has(:not(.thing[disabled]):not([disabled]:not(.thing[disabled]))))):not([disabled]:has(:not(.thing[disabled]):not([disabled]:has(:not(.thing[disabled]):not([disabled]:not(.thing[disabled])))):not([disabled]:not(.thing[disabled]):not([disabled]:has(:not(.thing[disabled]):not([disabled]:not(.thing[disabled]))))))):not([disabled]:not(.thing[disabled]):not([disabled]:has(:not(.thing[disabled]):not([disabled]:not(.thing[disabled])))):not([disabled]:not(.thing[disabled]):not([disabled]:has(:not(.thing[disabled]):not([disabled]:not(.thing[disabled]))))):not([disabled]:has(:not(.thing[disabled]):not([disabled]:has(:not(.thing[disabled]):not([disabled]:not(.thing[disabled])))):not([disabled]:not(.thing[disabled]):not([disabled]:has(:not(.thing[disabled]):not([disabled]:not(.thing[disabled]))))))))) {\ \n background: blue;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2056.rs000066400000000000000000000006041474765622100247400ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2056.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2056") } #[test] fn test() { assert_eq!( runner().ok(":foobar(.baz) {\ \n color: red;\ \n}\n"), ":foobar(.baz) {\ \n color: red;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2057.rs000066400000000000000000000011531474765622100247410ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2057.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2057") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(":not(.thing) {\r\ \n color: red;\r\ \n}\r\ \n:not(.bar) {\r\ \n @extend .thing;\r\ \n background: blue;\r\ \n}"), ":not(.thing) {\ \n color: red;\ \n}\ \n:not(.bar) {\ \n background: blue;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2074.rs000066400000000000000000000010421474765622100247350ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2074.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2074") } #[test] fn test() { assert_eq!( runner().ok("@function calc_foo() {\r\ \n @return \"bar\";\r\ \n}\r\ \nfoo {\r\ \n test1: calc-foo();\r\ \n test2: calc_foo();\r\ \n}"), "foo {\ \n test1: \"bar\";\ \n test2: \"bar\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2081.rs000066400000000000000000000007331474765622100247410ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2081.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2081") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err("$foo: #{bar();};\n"), "Error: expected \"}\".\ \n ,\ \n1 | $foo: #{bar();};\ \n | ^\ \n \'\ \n input.scss 1:14 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2095.rs000066400000000000000000000006021474765622100247410ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2095.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("issue_2095") .mock_file("expected_output.scss", "") } #[test] fn test() { assert_eq!( runner().ok("@media all {\ \n @mixin foo() {}\ \n}\n"), "" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2106/000077500000000000000000000000001474765622100243665ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2106/mod.rs000066400000000000000000000002751474765622100255170ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2106" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2106") } mod test; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2106/test.rs000066400000000000000000000016351474765622100257200ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2106/test.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("test") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "@import \"../does-not-exist\";\n" ), "DEPRECATION WARNING [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ \nMore info and automated migrator: https://sass-lang.com/d/import\n\ \n ,\ \n1 | @import \"../does-not-exist\";\ \n | ^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:9 root stylesheet\n\ \nError: Can\'t find stylesheet to import.\ \n ,\ \n1 | @import \"../does-not-exist\";\ \n | ^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:9 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2112.rs000066400000000000000000000012561474765622100247350ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2112.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2112") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:color\";\ \n$color: #1caf9a;\r\ \n\r\ \nbody {\r\ \n test-01: color.change($color, $hue: -240);\r\ \n test-03: color.change($color, $hue: 120);\r\ \n test-02: color.change($color, $hue: 480);\r\ \n}"), "body {\ \n test-01: #1caf1c;\ \n test-03: #1caf1c;\ \n test-02: #1caf1c;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2116.rs000066400000000000000000000007371474765622100247440ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2116.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2116") } #[test] fn test() { assert_eq!( runner().ok("@function foo() {\ \n @return if(& != null, green, red);\ \n}\n\ \ntest {\ \n color: foo();\ \n}\n"), "test {\ \n color: green;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2120.rs000066400000000000000000000005431474765622100247320ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2120.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2120") } #[test] fn test() { assert_eq!( runner().ok("@import url(//xyz.cöm/ürl)"), "@charset \"UTF-8\";\ \n@import url(//xyz.cöm/ürl);\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2123/000077500000000000000000000000001474765622100243655ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2123/mod.rs000066400000000000000000000003161474765622100255120ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2123" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2123") } mod test_01; mod test_02; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2123/test_01.rs000066400000000000000000000006241474765622100262140ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2123/test-01.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("test-01") } #[test] fn test() { assert_eq!( runner().ok(".class{background-image:url(//foo.bar/favicon.ico)}"), ".class {\ \n background-image: url(//foo.bar/favicon.ico);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2123/test_02.rs000066400000000000000000000007401474765622100262140ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2123/test-02.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("test-02") } #[test] fn test() { assert_eq!( runner().ok( "@font-face { font-family:\'foo\';src:url(//foo.bar) format(\'woff2\'); }" ), "@font-face {\ \n font-family: \"foo\";\ \n src: url(//foo.bar) format(\"woff2\");\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2124.rs000066400000000000000000000034231474765622100247360ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2124.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2124") } #[test] fn test() { assert_eq!( runner().ok("test {\r\ \n test-01: #{if(&, \'true\', \'false\')};\r\ \n test-01: #{if(0, \'true\', \'false\')};\r\ \n test-01: #{if(\'\', \'true\', \'false\')};\r\ \n test-01: #{if(\'0\', \'true\', \'false\')};\r\ \n test-01: #{if(null, \'true\', \'false\')};\r\ \n test-01: #{if(false, \'true\', \'false\')};\r\ \n}\r\ \n\r\ \n#{if(&, \'has-parent\', \'parentless\')} {\r\ \n test: parent;\r\ \n}\r\ \n\r\ \n@mixin with-js() {\r\ \n .js:root #{if(&, \'&\', \'\')} {\r\ \n @content;\r\ \n }\r\ \n}\r\ \n\r\ \n@include with-js() {\r\ \n .bou {\r\ \n content: \'bar\';\r\ \n }\r\ \n}\r\ \n\r\ \n.bou {\r\ \n @include with-js() {\r\ \n .bar {\r\ \n content: \'baz\';\r\ \n }\r\ \n }\r\ \n}\r\ \n\r\n"), "test {\ \n test-01: true;\ \n test-01: true;\ \n test-01: true;\ \n test-01: true;\ \n test-01: false;\ \n test-01: false;\ \n}\ \nparentless {\ \n test: parent;\ \n}\ \n.js:root .bou {\ \n content: \"bar\";\ \n}\ \n.js:root .bou .bar {\ \n content: \"baz\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2139.rs000066400000000000000000000013561474765622100247470ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2139.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2139") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".foo {\ \n color: #FFF;\ \n}\n\ \n.bar .baz {\ \n @extend .foo;\n\ \n border: \'1px\';\ \n}\n\ \n*:not(.foo) {\ \n display: none;\ \n}\n"), ".foo, .bar .baz {\ \n color: #FFF;\ \n}\ \n.bar .baz {\ \n border: \"1px\";\ \n}\ \n*:not(.foo) {\ \n display: none;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2140.rs000066400000000000000000000037401474765622100247360ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2140.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2140") } #[test] fn test() { assert_eq!( runner().ok("$red: red;\ \n$foo: red;\n\ \n:root {\ \n --red: #f00;\ \n // --red: $red;\ \n // --red: $foo;\ \n}\n\ \na { content: var(--red) }\ \na { content: var(--$red) }\ \na { content: var(--$foo) }\n\ \nb { content: (- red) }\ \nb { content: (- $red) }\ \nb { content: (- $foo) }\n\ \nc { content: (+- red) }\ \nc { content: (+- $red) }\ \nc { content: (+- $foo) }\n\ \nd { content: (-red) }\ \nd { content: (-$red) }\ \nd { content: (-$foo) }\n\ \ne { content: (+ red) }\ \ne { content: (+ $red) }\ \ne { content: (+ $foo) }"), ":root {\ \n --red: #f00;\ \n}\ \na {\ \n content: var(--red);\ \n}\ \na {\ \n content: var(-- red);\ \n}\ \na {\ \n content: var(-- red);\ \n}\ \nb {\ \n content: -red;\ \n}\ \nb {\ \n content: -red;\ \n}\ \nb {\ \n content: -red;\ \n}\ \nc {\ \n content: +-red;\ \n}\ \nc {\ \n content: +-red;\ \n}\ \nc {\ \n content: +-red;\ \n}\ \nd {\ \n content: -red;\ \n}\ \nd {\ \n content: -red;\ \n}\ \nd {\ \n content: -red;\ \n}\ \ne {\ \n content: +red;\ \n}\ \ne {\ \n content: +red;\ \n}\ \ne {\ \n content: +red;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2143.rs000066400000000000000000000007011474765622100247330ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2143.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2143") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err("$map:;"), "Error: Expected expression.\ \n ,\ \n1 | $map:;\ \n | ^\ \n \'\ \n input.scss 1:6 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2147/000077500000000000000000000000001474765622100243735ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2147/lhs.rs000066400000000000000000000007441474765622100255340ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2147/lhs.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("lhs") } #[test] fn test() { assert_eq!( runner().err("$map: (a:b,c:d) + 1;\r\n"), "Error: (a: b, c: d) isn\'t a valid CSS value.\ \n ,\ \n1 | $map: (a:b,c:d) + 1;\ \n | ^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2147/mod.rs000066400000000000000000000003061474765622100255170ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2147" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2147") } mod lhs; mod rhs; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2147/rhs.rs000066400000000000000000000007441474765622100255420ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2147/rhs.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("rhs") } #[test] fn test() { assert_eq!( runner().err("$map: 1 + (a:b,c:d);\r\n"), "Error: (a: b, c: d) isn\'t a valid CSS value.\ \n ,\ \n1 | $map: 1 + (a:b,c:d);\ \n | ^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2149.rs000066400000000000000000000007551474765622100247520ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2149.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2149") } #[test] fn test() { assert_eq!( runner().ok( ".foo {\ \n background: url(\'background.png\') -10px -10px/110% no-repeat\ \n}\n" ), ".foo {\ \n background: url(\"background.png\") -10px -10px/110% no-repeat;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2150.rs000066400000000000000000000011641474765622100247350ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2150.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2150") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("@media (min-width: 100px) {\ \n .parent > %child {\ \n color: blue;\ \n }\ \n}\n\ \n.foo {\ \n @extend %child;\ \n}\n"), "@media (min-width: 100px) {\ \n .parent > .foo {\ \n color: blue;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2153.rs000066400000000000000000000011421474765622100247340ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2153.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2153") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n a: \"\\\"foo\\\"\" + \"\";\ \n b: \"\" + \"\\\"foo\\\"\";\ \n c: \"\" + \"\\\"foo\";\ \n d: \"\\\"foo\\\"\" + \"bar\";\ \n}\n"), "foo {\ \n a: \'\"foo\"\';\ \n b: \'\"foo\"\';\ \n c: \'\"foo\';\ \n d: \'\"foo\"bar\';\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2154.rs000066400000000000000000000013151474765622100247370ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2154.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2154") } #[test] fn test() { assert_eq!( runner().ok("@media (min-width: 1px) {\ \n .first {\ \n font-weight: 100;\n\ \n @media (min-width: 2px) {}\ \n }\ \n .second {\ \n font-weight: 200;\ \n }\ \n}\n"), "@media (min-width: 1px) {\ \n .first {\ \n font-weight: 100;\ \n }\ \n .second {\ \n font-weight: 200;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2155.rs000066400000000000000000000022751474765622100247460ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2155.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2155") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "a {\ \n &.#{#ff0} {\ \n color: red;\ \n }\ \n}\n" ), "WARNING: You probably don\'t mean to use the color value yellow in interpolation here.\ \nIt may end up represented as #ff0, which will likely produce invalid CSS.\ \nAlways quote color names when using them as strings or map keys (for example, \"yellow\").\ \nIf you really want to use the color value here, use \'\"\" + #ff0\'.\n\ \n ,\ \n2 | &.#{#ff0} {\ \n | ^^^^\ \n \'\ \n input.scss 2:7 root stylesheet\n\ \nError: Expected identifier.\ \n ,--> input.scss\ \n2 | &.#{#ff0} {\ \n | ^^^^ \ \n \'\ \n ,\ \n1 | &.#ff0 \ \n | = error in interpolated output\ \n \'\ \n input.scss 2:7 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2156/000077500000000000000000000000001474765622100243735ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2156/debug.rs000066400000000000000000000010551474765622100260300ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2156/debug.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("debug") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:string\";\ \n@debug \"\\\"foo\\\"\" + \"\";\r\ \n@debug \"\" + \"\\\"foo\\\"\";\r\ \n@debug \"\" + \"\\\"foo\";\r\ \n@debug \"\\\"foo\\\"\" + \"bar\";\r\ \n@debug string.unquote(\"\\\"foo\\\" and \\\"bar\\\"\");\r\n"), "" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2156/error.rs000066400000000000000000000011561474765622100260750ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2156/error.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("error") } #[test] fn test() { assert_eq!( runner().err( "@use \"sass:string\";\ \n@error string.unquote(\"\\\"foo\\\" and \\\"bar\\\"\");\n" ), "Error: \"foo\" and \"bar\"\ \n ,\ \n2 | @error string.unquote(\"\\\"foo\\\" and \\\"bar\\\"\");\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:1 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2156/mod.rs000066400000000000000000000003251474765622100255200ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2156" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2156") } mod debug; mod error; mod warn; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2156/warn.rs000066400000000000000000000010461474765622100257110ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2156/warn.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("warn") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:string\";\ \n@warn \"\\\"foo\\\"\" + \"\";\r\ \n@warn \"\" + \"\\\"foo\\\"\";\r\ \n@warn \"\" + \"\\\"foo\";\r\ \n@warn \"\\\"foo\\\"\" + \"bar\";\r\ \n@warn string.unquote(\"\\\"foo\\\" and \\\"bar\\\"\");\r\n"), "" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2169.rs000066400000000000000000000010061474765622100247420ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2169.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2169") } #[test] fn test() { assert_eq!( runner().ok("@function test($a, $b) {\ \n @return \"#{$a}\" + \"#{$b}\" + \"\" + \"\";\ \n}\n\ \nfoo {\ \n content: test(\'bim\', \'baz\');\ \n}"), "foo {\ \n content: \"bimbaz\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2175.rs000066400000000000000000000010461474765622100247430ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2175.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2175") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "a:nth-child() {\ \n color: yellowgreen;\ \n}\n" ), "Error: Expected \"n\".\ \n ,\ \n1 | a:nth-child() {\ \n | ^\ \n \'\ \n input.scss 1:13 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2177.rs000066400000000000000000000002661474765622100247500ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2177.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2177") } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2179.rs000066400000000000000000000025161474765622100247520ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2179.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2179") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("@mixin sprite-arrow() {\ \n @extend %hidden-text;\ \n}\n\ \n%hidden-text {\ \n text-indent: -999em;\ \n}\n\ \n// button.scss\ \n.button-left,\ \n.button-right,\ \n.button-plus,\ \n.button-min {\ \n &:after {\ \n @include sprite-arrow();\ \n }\ \n}\n\ \n.banner {\ \n &:after {\ \n @include sprite-arrow();\ \n }\ \n}\n\ \n.calculator {\ \n .btn-down,\ \n .btn-up {\ \n &:after {\ \n @include sprite-arrow();\ \n }\ \n }\ \n}"), ".calculator .btn-down:after,\ \n.calculator .btn-up:after, .banner:after, .button-left:after,\ \n.button-right:after,\ \n.button-plus:after,\ \n.button-min:after {\ \n text-indent: -999em;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2185.rs000066400000000000000000000057021474765622100247470ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2185.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2185") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok("$bar: true;\r\ \n\r\ \n@mixin mixin() {\r\ \n mix: in;\r\ \n}\r\ \n\r\ \n@mixin include() {\r\ \n @content;\r\ \n}\r\ \n\r\ \np {\r\ \n @at-root {\r\ \n @if $bar {\r\ \n #if {\r\ \n height: 100px;\r\ \n }\r\ \n }\r\ \n @if (not $bar) {\r\ \n } @else if($bar) {\r\ \n #elseif {\r\ \n width: 100px;\r\ \n }\r\ \n }\r\ \n @if (not $bar) {\r\ \n } @else {\r\ \n #else {\r\ \n width: 100px;\r\ \n }\r\ \n }\r\ \n @for $i from 1 through 1 {\r\ \n #for {\r\ \n foo: bar#{$i};\r\ \n }\r\ \n }\r\ \n $i: 0;\r\ \n @while ($i == 0) {\r\ \n $i: $i + 1;\r\ \n #while {\r\ \n foo: bar#{$i};\r\ \n }\r\ \n }\r\ \n @each $i in (1) {\r\ \n #each {\r\ \n foo: bar#{$i};\r\ \n }\r\ \n }\r\ \n #inc {\r\ \n @include mixin();\r\ \n @include include() {\r\ \n inc: lude;\r\ \n }\r\ \n }\r\ \n @supports (display: flex) {\r\ \n a {display: flex}\r\ \n }\r\ \n @foo {\r\ \n bar: bat;\r\ \n }\r\ \n }\r\ \n}"), "#if {\ \n height: 100px;\ \n}\ \n#elseif {\ \n width: 100px;\ \n}\ \n#else {\ \n width: 100px;\ \n}\ \n#for {\ \n foo: bar1;\ \n}\ \n#while {\ \n foo: bar1;\ \n}\ \n#each {\ \n foo: bar1;\ \n}\ \n#inc {\ \n mix: in;\ \n inc: lude;\ \n}\ \n@supports (display: flex) {\ \n a {\ \n display: flex;\ \n }\ \n}\ \n@foo {\ \n bar: bat;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2198.rs000066400000000000000000000012021474765622100247420ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2198.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2198") } #[test] fn test() { assert_eq!( runner().ok("@mixin test() {\ \n @at-root {\ \n @include foo();\ \n }\ \n}\n\ \n@mixin foo() {\ \n #{\'.foo\'} {\ \n bar: baz;\ \n }\ \n}\n\ \n.test {\ \n @include test();\ \n}\n"), ".foo {\ \n bar: baz;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2200.rs000066400000000000000000000013501474765622100247260ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2200.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2200") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".media-object-section:last-child:not(:nth-child(2)) {\ \n color: blue;\ \n}\n\ \n%orbit-control {\ \n color: red;\ \n}\n\ \n.orbit-previous {\ \n @extend %orbit-control;\ \n}\n"), ".media-object-section:last-child:not(:nth-child(2)) {\ \n color: blue;\ \n}\ \n.orbit-previous {\ \n color: red;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2202.rs000066400000000000000000000006611474765622100247340ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2202.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2202") } #[test] fn test() { assert_eq!( runner().ok("@customAtRule;\r\ \ntest {\r\ \n content: bar\r\ \n}"), "@customAtRule;\ \ntest {\ \n content: bar;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2205.rs000066400000000000000000000012421474765622100247330ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2205.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2205") } #[test] fn test() { assert_eq!( runner().ok("$params1: #fff .5;\r\ \ntest {\r\ \n color: rgba($params1...);\r\ \n}\r\ \n\r\ \n$params2: 10 250 130 .5;\r\ \ntest {\r\ \n color: rgba($params2...);\r\ \n}"), "test {\ \n color: rgba(255, 255, 255, 0.5);\ \n}\ \ntest {\ \n color: rgba(10, 250, 130, 0.5);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_221255.rs000066400000000000000000000007101474765622100251020ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_221255.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_221255") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err("\'#{)\'{\n"), "Error: Expected expression.\ \n ,\ \n1 | \'#{)\'{\ \n | ^^\ \n \'\ \n input.scss 1:2 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_221289.rs000066400000000000000000000005721474765622100251170ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_221289.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_221289") } #[test] fn test() { assert_eq!( runner().ok("foo {\r\ \n bar: if(0,0<0,0);\r\ \n}"), "foo {\ \n bar: false;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2233.rs000066400000000000000000000010051474765622100247310ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2233.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("issue_2233") .mock_file("foo.scss", "a { b: c; }\n") } #[test] fn test() { assert_eq!( runner().ok("@media all and (min-width: 100px) {\ \n @import \"foo\"\ \n}\n"), "@media all and (min-width: 100px) {\ \n a {\ \n b: c;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_224.rs000066400000000000000000000014061474765622100246540ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_224.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_224") } #[test] fn test() { assert_eq!( runner().ok( "@use \"sass:list\";\ \n$list: (\"a\", \"b\", \"c\");\n\ \ntest {\ \n content: list.nth($list, -1);\ \n content: list.nth($list, -2);\ \n content: list.nth($list, -3);\ \n content: list.nth($list, -1) == list.nth($list, list.length($list));\ \n}\n" ), "test {\ \n content: \"c\";\ \n content: \"b\";\ \n content: \"a\";\ \n content: true;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2243/000077500000000000000000000000001474765622100243705ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2243/mod.rs000066400000000000000000000003101474765622100255070ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2243" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2243") } mod sass; mod scss; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2243/sass.rs000066400000000000000000000002651474765622100257120ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2243/sass.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("sass") } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2243/scss.rs000066400000000000000000000007041474765622100257120ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2243/scss.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("scss") } #[test] fn test() { assert_eq!( runner().ok( "@namespace url(\"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul\")\n" ), "@namespace url(\"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul\");\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2246.rs000066400000000000000000000021131474765622100247360ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2246.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2246") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("@use \"sass:math\";\ \n@mixin foo($option: \'foo\') {\ \n // Create a unique, random placeholder to store styles\ \n $placeholder : $option + math.random(9999);\n\ \n // Store the styles in the placeholder\ \n @at-root %#{$placeholder} {\ \n content: \'foo\';\ \n }\n\ \n @at-root {\ \n .bar {\ \n @extend %#{$placeholder};\ \n }\ \n }\ \n}\n\ \n@mixin bar($option) {\ \n @include foo($option);\ \n}\n\ \n.foo {\ \n @include bar(\'baz\');\ \n}"), ".bar {\ \n content: \"foo\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2260/000077500000000000000000000000001474765622100243675ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2260/inner_parent_no_compound.rs000066400000000000000000000013011474765622100320140ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2260/inner-parent-no-compound.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("inner-parent-no-compound") } #[test] fn test() { assert_eq!( runner().ok("@mixin test() {\r\ \n @at-root {\r\ \n .inner {\r\ \n @content;\r\ \n }\r\ \n }\r\ \n}\r\ \n\r\ \n@include test {\r\ \n .test {\r\ \n property: value;\r\ \n }\r\ \n }"), ".inner .test {\ \n property: value;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2260/inner_parent_with_compound.rs000066400000000000000000000013071474765622100323610ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2260/inner-parent-with-compound.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("inner-parent-with-compound") } #[test] fn test() { assert_eq!( runner().ok("@mixin test() {\r\ \n @at-root {\r\ \n .inner {\r\ \n @content;\r\ \n }\r\ \n }\r\ \n}\r\ \n\r\ \n@include test {\r\ \n .test & {\r\ \n property: value;\r\ \n }\r\ \n }"), ".test .inner {\ \n property: value;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2260/mod.rs000066400000000000000000000005541474765622100255200ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2260" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2260") } mod inner_parent_no_compound; mod inner_parent_with_compound; mod no_parent_no_compound; mod no_parent_with_compound; mod outer_parent_no_compound; mod outer_parent_with_compound; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2260/no_parent_no_compound.rs000066400000000000000000000011731474765622100313240ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2260/no-parent-no-compound.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("no-parent-no-compound") } #[test] fn test() { assert_eq!( runner().ok("@mixin test() {\r\ \n @at-root {\r\ \n @content;\r\ \n }\r\ \n}\r\ \n\r\ \n@include test {\r\ \n .test {\r\ \n property: value;\r\ \n }\r\ \n }"), ".test {\ \n property: value;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2260/no_parent_with_compound.rs000066400000000000000000000015621474765622100316650ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2260/no-parent-with-compound.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("no-parent-with-compound") } #[test] #[ignore] // missing error fn test() { assert_eq!( runner().err( "@mixin test() {\ \n @at-root {\ \n @content;\ \n }\ \n}\n\ \n@include test {\ \n .test & {\ \n property: value;\ \n }\ \n}\n" ), "Error: Top-level selectors may not contain the parent selector \"&\".\ \n ,\ \n8 | .test & {\ \n | ^\ \n \'\ \n input.scss 8:9 @content\ \n input.scss 3:5 test()\ \n input.scss 7:1 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2260/outer_parent_no_compound.rs000066400000000000000000000012721474765622100320460ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2260/outer-parent-no-compound.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("outer-parent-no-compound") } #[test] fn test() { assert_eq!( runner().ok("@mixin test() {\r\ \n .outer {\r\ \n @at-root {\r\ \n @content;\r\ \n }\r\ \n }\r\ \n}\r\ \n\r\ \n@include test {\r\ \n .test {\r\ \n property: value;\r\ \n }\r\ \n }"), ".test {\ \n property: value;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2260/outer_parent_with_compound.rs000066400000000000000000000013071474765622100324040ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2260/outer-parent-with-compound.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("outer-parent-with-compound") } #[test] fn test() { assert_eq!( runner().ok("@mixin test() {\r\ \n .outer {\r\ \n @at-root {\r\ \n @content;\r\ \n }\r\ \n }\r\ \n}\r\ \n\r\ \n@include test {\r\ \n .test & {\r\ \n property: value;\r\ \n }\r\ \n }"), ".test .outer {\ \n property: value;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2261.rs000066400000000000000000000042111474765622100247340ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2261.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2261") } #[test] fn test() { assert_eq!( runner().ok("$seven: 7;\n\ \n.test {\n\ \n equal-01: (7 == 7);\ \n equal-02: (\'7\' == \'7\');\ \n equal-03: (\'#{7}\' == \'#{7}\');\n\ \n equal-04: (7 == \'7\');\ \n equal-05: (\'7\' == 7);\ \n equal-06: (7 == \'#{7}\');\ \n equal-07: (\'#{7}\' == 7);\ \n equal-08: (\'7\' == \'#{7}\');\ \n equal-09: (\'#{7}\' == \'7\');\n\ \n equal-10: ($seven == 7);\ \n equal-11: ($seven == \'7\');\ \n equal-13: ($seven == \'#{7}\');\n\ \n equal-14: (7 == $seven);\ \n equal-15: (\'7\' == $seven);\ \n equal-16: (\'#{7}\' == $seven);\n\ \n equal-17: (\'#{$seven}\' == 7);\ \n equal-18: (\'#{$seven}\' == \'7\');\ \n equal-19: (\'#{$seven}\' == \'#{7}\');\n\ \n equal-20: (7 == \'#{$seven}\');\ \n equal-21: (\'7\' == \'#{$seven}\');\ \n equal-22: (\'#{7}\' == \'#{$seven}\');\n\ \n equal-23: (\'#{$seven}\' == $seven);\ \n equal-24: (\'#{$seven}\' == \'#{$seven}\');\n\ \n}"), ".test {\ \n equal-01: true;\ \n equal-02: true;\ \n equal-03: true;\ \n equal-04: false;\ \n equal-05: false;\ \n equal-06: false;\ \n equal-07: false;\ \n equal-08: true;\ \n equal-09: true;\ \n equal-10: true;\ \n equal-11: false;\ \n equal-13: false;\ \n equal-14: true;\ \n equal-15: false;\ \n equal-16: false;\ \n equal-17: false;\ \n equal-18: true;\ \n equal-19: true;\ \n equal-20: false;\ \n equal-21: true;\ \n equal-22: true;\ \n equal-23: false;\ \n equal-24: true;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2289.rs000066400000000000000000000007721474765622100247560ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2289.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2289") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".foo:baz:baz {\ \n float: left;\ \n}\n\ \n.bar {\ \n @extend .foo;\ \n}\n"), ".foo:baz:baz, .bar:baz:baz {\ \n float: left;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2291.rs000066400000000000000000000056141474765622100247470ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2291.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2291") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok( ".m__exhibit-header--medium {\ \n @extend #{&}--plain;\ \n &--plain {\ \n font-size: 1em;\ \n }\ \n}\n\ \nfoo {\ \n bar[baz=\"#{&}\"][str=\"&\"] {\ \n asd: qwe;\ \n }\ \n}\n\ \nA, B, C {\ \n #{&}-foo#{&}-bar {\ \n color: blue;\ \n }\ \n #{\"A, B, C\"}-foo#{\"A, B, C\"}-bar {\ \n color: blue;\ \n }\ \n}\n\ \nA {\ \n B#{&}C {\ \n .b, .c, .d {\ \n #{&}-foo {\ \n parent: &bar;\ \n itpl: #{&}bar;\ \n }\ \n #{\"A .b, A .c, A .d\"}-foo {\ \n parent: &bar;\ \n itpl: #{&}bar;\ \n }\ \n }\ \n }\ \n}" ), ".m__exhibit-header--medium--plain, .m__exhibit-header--medium {\ \n font-size: 1em;\ \n}\ \nfoo bar[baz=foo][str=\"&\"] {\ \n asd: qwe;\ \n}\ \nA A, A B, A C-fooA, A B, A C-bar, B A, B B, B C-fooA, B B, B C-bar, C A, C B, C C-fooA, C B, C C-bar {\ \n color: blue;\ \n}\ \nA A, A B, A C-fooA, A B, A C-bar, B A, B B, B C-fooA, B B, B C-bar, C A, C B, C C-fooA, C B, C C-bar {\ \n color: blue;\ \n}\ \nA BAC .b A BAC .b, A BAC .b A BAC .c, A BAC .b A BAC .d-foo, A BAC .c A BAC .b, A BAC .c A BAC .c, A BAC .c A BAC .d-foo, A BAC .d A BAC .b, A BAC .d A BAC .c, A BAC .d A BAC .d-foo {\ \n parent: A BAC .b A BAC .b, A BAC .b A BAC .c, A BAC .b A BAC .d-foo, A BAC .c A BAC .b, A BAC .c A BAC .c, A BAC .c A BAC .d-foo, A BAC .d A BAC .b, A BAC .d A BAC .c, A BAC .d A BAC .d-foo bar;\ \n itpl: A BAC .b A BAC .b, A BAC .b A BAC .c, A BAC .b A BAC .d-foo, A BAC .c A BAC .b, A BAC .c A BAC .c, A BAC .c A BAC .d-foo, A BAC .d A BAC .b, A BAC .d A BAC .c, A BAC .d A BAC .d-foobar;\ \n}\ \nA BAC .b A .b, A BAC .b A .c, A BAC .b A .d-foo, A BAC .c A .b, A BAC .c A .c, A BAC .c A .d-foo, A BAC .d A .b, A BAC .d A .c, A BAC .d A .d-foo {\ \n parent: A BAC .b A .b, A BAC .b A .c, A BAC .b A .d-foo, A BAC .c A .b, A BAC .c A .c, A BAC .c A .d-foo, A BAC .d A .b, A BAC .d A .c, A BAC .d A .d-foo bar;\ \n itpl: A BAC .b A .b, A BAC .b A .c, A BAC .b A .d-foo, A BAC .c A .b, A BAC .c A .c, A BAC .c A .d-foo, A BAC .d A .b, A BAC .d A .c, A BAC .d A .d-foobar;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2295/000077500000000000000000000000001474765622100243775ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2295/basic.rs000066400000000000000000000007661474765622100260370ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2295/basic.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("basic").mock_file( "include.scss", "@if (true) {\r\n .foo { display: none; }\r\n}", ) } #[test] fn test() { assert_eq!( runner().ok(".my-scope {\r\ \n @import \'include.scss\';\r\ \n}"), ".my-scope .foo {\ \n display: none;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2295/mod.rs000066400000000000000000000003151474765622100255230ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2295" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2295") } mod basic; mod original; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2295/original.rs000066400000000000000000000017331474765622100265550ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2295/original.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("original") .mock_file("_input-bug.scss", "$include-foo: true !default;\r\n.bar { display: none; }\r\n@if ($include-foo) {\r\n .foo { display: none; }\r\n}") } #[test] fn test() { assert_eq!( runner().ok("$include-foo: true !default;\r\ \n.my-scope {\r\ \n .bar { display: none; }\r\ \n @if ($include-foo) {\r\ \n .foo { display: none; }\r\ \n }\r\ \n @import \'input-bug\';\r\ \n}"), ".my-scope .bar {\ \n display: none;\ \n}\ \n.my-scope .foo {\ \n display: none;\ \n}\ \n.my-scope .bar {\ \n display: none;\ \n}\ \n.my-scope .foo {\ \n display: none;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2303.rs000066400000000000000000000012061474765622100247320ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2303.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("issue_2303") .mock_file("_module.scss", ".okay {\r\n background: green;\r\n}\r\n\r\n@if true {\r\n .broken {\r\n background: red;\r\n }\r\n}") } #[test] fn test() { assert_eq!( runner().ok(".wrapper-class {\r\ \n @import \'module\';\r\ \n}"), ".wrapper-class .okay {\ \n background: green;\ \n}\ \n.wrapper-class .broken {\ \n background: red;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2304.rs000066400000000000000000000020261474765622100247340ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2304.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("issue_2304") .mock_file("_module.scss", ".foo, & {\n background: red;\n}\n\n.foo, &:before {\n background: red;\n}") } #[test] #[ignore] // missing error fn test() { assert_eq!( runner().err( "@import \"module\";" ), "DEPRECATION WARNING [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ \nMore info and automated migrator: https://sass-lang.com/d/import\n\ \n ,\ \n1 | @import \"module\";\ \n | ^^^^^^^^\ \n \'\ \n input.scss 1:9 root stylesheet\n\ \nError: Top-level selectors may not contain the parent selector \"&\".\ \n ,\ \n1 | .foo, & {\ \n | ^\ \n \'\ \n _module.scss 1:7 @import\ \n input.scss 1:9 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2307.rs000066400000000000000000000007341474765622100247430ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2307.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2307") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "0//#{\ \n{\n" ), "Error: expected \"}\".\ \n ,\ \n2 | {\ \n | ^\ \n \'\ \n input.scss 2:2 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2309.rs000066400000000000000000000026171474765622100247470ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2309.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2309") } #[test] fn test() { assert_eq!( runner().ok( "@use \"sass:list\";\ \n@use \"sass:map\";\ \n$button-sizes: (\r\ \n \'xs\': (\r\ \n \'line-height\': 16 / 12,\r\ \n ),\r\ \n \'s\': (\r\ \n \'line-height\': 18 / 14,\r\ \n ),\r\ \n \'m\': (\r\ \n \'line-height\': 18 / 14,\r\ \n ),\r\ \n \'l\': (\r\ \n \'line-height\': 22 / 16,\r\ \n )\r\ \n);\r\ \n\r\ \n@each $size in $button-sizes {\r\ \n $size-metrics: list.nth($size, 2);\r\ \n\r\ \n .c-button__icon {\r\ \n min-height: map.get($size-metrics, \'line-height\') * 1em;\r\ \n }\r\ \n}" ), ".c-button__icon {\ \n min-height: 1.3333333333em;\ \n}\ \n.c-button__icon {\ \n min-height: 1.2857142857em;\ \n}\ \n.c-button__icon {\ \n min-height: 1.2857142857em;\ \n}\ \n.c-button__icon {\ \n min-height: 1.375em;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_231.rs000066400000000000000000000006661474765622100246610ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_231.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_231") } #[test] fn test() { assert_eq!( runner().ok("// test.scss:\r\ \na {\r\ \n background-image: url(fn(\"s\"));\r\ \n}"), "a {\ \n background-image: url(fn(\"s\"));\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2320.rs000066400000000000000000000021701474765622100247320ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2320.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2320") } #[test] fn test() { assert_eq!( runner().ok("$char-f: \'\\66\';\r\ \n$char-g: \'\\67\';\r\ \n\r\ \n.test-1 {\r\ \n content: \'#{$char-f}\\feff\';\r\ \n}\r\ \n\r\ \n.test-2 {\r\ \n content: \'#{$char-g}\\feff\';\r\ \n}\r\ \n\r\ \n// this is broken\r\ \n.test-3 {\r\ \n content: \'\\feff#{$char-f}\';\r\ \n}\r\ \n\r\ \n.test-4 {\r\ \n content: \'\\feff#{$char-g}\';\r\ \n}"), "@charset \"UTF-8\";\ \n.test-1 {\ \n content: \"f\u{feff}\";\ \n}\ \n.test-2 {\ \n content: \"g\u{feff}\";\ \n}\ \n.test-3 {\ \n content: \"\u{feff}f\";\ \n}\ \n.test-4 {\ \n content: \"\u{feff}g\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2321.rs000066400000000000000000000007051474765622100247350ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2321.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2321") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok("a {\ \n b: if(true, b, c...);\ \n c: if(false, b, c...);\ \n}\n"), "a {\ \n b: b;\ \n c: c;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2330.rs000066400000000000000000000016131474765622100247340ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2330.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2330") } #[test] fn test() { assert_eq!( runner().ok( "@use \"sass:list\";\ \n@use \"sass:map\";\ \n@use \"sass:meta\";\n\ \n@function test () {\ \n $m: ();\ \n $abc: (a b c d e f g h i j k);\n\ \n @for $index from 1 through list.length($abc) {;\ \n $m: map.merge($m, (list.nth($abc, $index):$index) );\ \n }\n\ \n @return $m;\ \n}\n\ \ntest {\ \n content: meta.inspect(test());\ \n}" ), "test {\ \n content: (a: 1, b: 2, c: 3, d: 4, e: 5, f: 6, g: 7, h: 8, i: 9, j: 10, k: 11);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2333.rs000066400000000000000000000006501474765622100247370ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2333.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2333") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:meta\";\n\ \ntest { test: meta.inspect((a:1,b:(foo,bar),c:3)); }"), "test {\ \n test: (a: 1, b: (foo, bar), c: 3);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2341.rs000066400000000000000000000015271474765622100247420ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2341.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2341") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("@function aFunction() {\r\ \n @return 1em;\r\ \n}\r\ \n\r\ \n@media (max-width: 1em) {\r\ \n %placeholder {\r\ \n color: red;\r\ \n }\r\ \n}\r\ \n\r\ \n@media (max-width: aFunction()) {\r\ \n .test {\r\ \n @extend %placeholder;\r\ \n }\r\ \n}"), "@media (max-width: 1em) {\ \n .test {\ \n color: red;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2346.rs000066400000000000000000000010071474765622100247400ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2346.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2346") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok("$items: 3;\r\ \nli {\r\ \n &:nth-child(#{$items}n - #{$items}) {\r\ \n color: red;\r\ \n }\r\ \n}"), "li:nth-child(3n-3) {\ \n color: red;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2347.rs000066400000000000000000000015231474765622100247440ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2347.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2347") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%baz2 {\r\ \n display: flex;\r\ \n}\r\ \n%baz3 {\r\ \n display: flex;\r\ \n}\r\ \n\r\ \ncustom2, [custom2], .custom2 {\r\ \n @extend %baz2\r\ \n}\r\ \n\r\ \n[custom3], custom3, .custom3 {\r\ \n @extend %baz3\r\ \n}"), "custom2, [custom2], .custom2 {\ \n display: flex;\ \n}\ \n[custom3], custom3, .custom3 {\ \n display: flex;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2349.rs000066400000000000000000000012171474765622100247460ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2349.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2349") } #[test] fn test() { assert_eq!( runner().ok("$path1: assets/images; // no errors thrown\r\ \n$path2: /images; // errors thrown\r\ \n.test {\r\ \n background: url(#{$path1}/image.png);\r\ \n background: url(#{$path2}/image.png);\r\ \n}"), ".test {\ \n background: url(assets/images/image.png);\ \n background: url(/images/image.png);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2352.rs000066400000000000000000000015041474765622100247370ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2352.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2352") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "$theme: (red: #D700EE);\r\ \n\r\ \n@function test($args...) {\r\ \n\t@return #000;\r\ \n}\r\ \n\r\ \n.test {\r\ \n\tcolor: test($theme...);\r\ \n}" ), "Error: Variable keyword argument map must have string keys.\ \nred is not a string in (red: #D700EE).\ \n ,\ \n8 | color: test($theme...);\ \n | ^^^^^^\ \n \'\ \n input.scss 8:14 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2358.rs000066400000000000000000000044051474765622100247500ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2358.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2358") } #[test] fn test() { assert_eq!( runner().ok( ".outer {\r\ \n @at-root .root {\r\ \n .inner {\r\ \n .element {\r\ \n --modifier#{&}--another-modifier {\r\ \n content: \"#{&}\";\r\ \n }\r\ \n &--modifier#{&}--another-modifier {\r\ \n content: \"#{&}\";\r\ \n }\r\ \n }\r\ \n }\r\ \n }\r\ \n}\r\ \n\r\ \n@at-root .block {\r\ \n &__element {\r\ \n #{&} {\r\ \n content: \"#{&}\";\r\ \n }\r\ \n &--modifier {\r\ \n content: \"#{&}\";\r\ \n }\r\ \n --modifier#{&}--another-modifier {\r\ \n content: \"#{&}\";\r\ \n }\r\ \n &--modifier#{&}--another-modifier {\r\ \n content: \"#{&}\";\r\ \n }\r\ \n }\r\ \n}\r\n" ), ".root .inner .element --modifier.root .inner .element--another-modifier {\ \n content: \".root .inner .element --modifier.root .inner .element--another-modifier\";\ \n}\ \n.root .inner .element--modifier.root .inner .element--another-modifier {\ \n content: \".root .inner .element--modifier.root .inner .element--another-modifier\";\ \n}\ \n.block__element .block__element {\ \n content: \".block__element .block__element\";\ \n}\ \n.block__element--modifier {\ \n content: \".block__element--modifier\";\ \n}\ \n.block__element --modifier.block__element--another-modifier {\ \n content: \".block__element --modifier.block__element--another-modifier\";\ \n}\ \n.block__element--modifier.block__element--another-modifier {\ \n content: \".block__element--modifier.block__element--another-modifier\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2360.rs000066400000000000000000000002661474765622100247420ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2360.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2360") } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2365.rs000066400000000000000000000012321474765622100247410ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2365.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2365") } #[test] #[ignore] // missing error fn test() { assert_eq!( runner().err( "a {\r\ \n b {\r\ \n color: red;\r\ \n },\r\ \n c {\r\ \n color: blue;\r\ \n }\r\ \n}" ), "Error: expected selector.\ \n ,\ \n4 | },\ \n | ^\ \n \'\ \n input.scss 4:6 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2366/000077500000000000000000000000001474765622100243765ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2366/global.rs000066400000000000000000000020111474765622100261760ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2366/global.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("global") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".item {\r\ \n display: inline-block;\r\ \n\r\ \n :global(> .ext-link) {\r\ \n background: #000;\r\ \n }\r\ \n}\r\ \n\r\ \n.link {\r\ \n color: red;\r\ \n}\r\ \n\r\ \n.textLink {\r\ \n @extend .link;\r\ \n padding: 0 10px;\r\ \n}"), ".item {\ \n display: inline-block;\ \n}\ \n.item :global(> .ext-link) {\ \n background: #000;\ \n}\ \n.link, .textLink {\ \n color: red;\ \n}\ \n.textLink {\ \n padding: 0 10px;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2366/has.rs000066400000000000000000000017751474765622100255310ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2366/has.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("has") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".item {\r\ \n display: inline-block;\r\ \n\r\ \n :has(> .ext-link) {\r\ \n background: #000;\r\ \n }\r\ \n}\r\ \n\r\ \n.link {\r\ \n color: red;\r\ \n}\r\ \n\r\ \n.textLink {\r\ \n @extend .link;\r\ \n padding: 0 10px;\r\ \n}"), ".item {\ \n display: inline-block;\ \n}\ \n.item :has(> .ext-link) {\ \n background: #000;\ \n}\ \n.link, .textLink {\ \n color: red;\ \n}\ \n.textLink {\ \n padding: 0 10px;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2366/mod.rs000066400000000000000000000003111474765622100255160ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2366" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2366") } mod global; mod has; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2371.rs000066400000000000000000000007021474765622100247370ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2371.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2371") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err("#{a==b}\n"), "Error: expected \"{\".\ \n ,\ \n1 | #{a==b}\ \n | ^\ \n \'\ \n input.scss 1:8 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2374.rs000066400000000000000000000055701474765622100247520ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2374.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2374") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok( "@use \"sass:color\";\ \n$colors: (\ \n yellow: #ffeb3b\ \n);\ \n@each $name, $color in $colors {\ \n $amount: 40%;\ \n @for $i from 0 through 9 {\ \n .#{$name}-#{($i*100)} { background-color: color.adjust($color, $lightness: $amount) };\ \n $amount: $amount - 2;\ \n }\ \n}\n\ \n$colors: (\ \n yellow: yellow,\ \n red: red,\ \n blue: blue,\n\ \n);\ \n@each $name, $color in $colors {\ \n @for $i from 0 through 2 {\ \n .#{$name}-#{($i*100)} {\ \n background-color: color.adjust($color, $lightness: 10%)\ \n };\ \n }\ \n}\n\n" ), ".yellow-0 {\ \n background-color: hsl(53.8775510204, 100%, 101.568627451%);\ \n}\ \n.yellow-100 {\ \n background-color: rgb(255, 254.7755102041, 252.8);\ \n}\ \n.yellow-200 {\ \n background-color: rgb(255, 253.7346938776, 242.6);\ \n}\ \n.yellow-300 {\ \n background-color: rgb(255, 252.693877551, 232.4);\ \n}\ \n.yellow-400 {\ \n background-color: rgb(255, 251.6530612245, 222.2);\ \n}\ \n.yellow-500 {\ \n background-color: rgb(255, 250.612244898, 212);\ \n}\ \n.yellow-600 {\ \n background-color: rgb(255, 249.5714285714, 201.8);\ \n}\ \n.yellow-700 {\ \n background-color: rgb(255, 248.5306122449, 191.6);\ \n}\ \n.yellow-800 {\ \n background-color: rgb(255, 247.4897959184, 181.4);\ \n}\ \n.yellow-900 {\ \n background-color: rgb(255, 246.4489795918, 171.2);\ \n}\ \n.yellow-0 {\ \n background-color: #ffff33;\ \n}\ \n.yellow-100 {\ \n background-color: #ffff33;\ \n}\ \n.yellow-200 {\ \n background-color: #ffff33;\ \n}\ \n.red-0 {\ \n background-color: #ff3333;\ \n}\ \n.red-100 {\ \n background-color: #ff3333;\ \n}\ \n.red-200 {\ \n background-color: #ff3333;\ \n}\ \n.blue-0 {\ \n background-color: #3333ff;\ \n}\ \n.blue-100 {\ \n background-color: #3333ff;\ \n}\ \n.blue-200 {\ \n background-color: #3333ff;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2376.rs000066400000000000000000000011061474765622100247430ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2376.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2376") } #[test] fn test() { assert_eq!( runner().ok(".test {\r\ \n\tbackground:url(//img12.360buyimg.com/..);\r\ \n\t.a{\r\ \n\t\theight: 100px;\r\ \n\t}\r\ \n}"), ".test {\ \n background: url(//img12.360buyimg.com/..);\ \n}\ \n.test .a {\ \n height: 100px;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_238760.rs000066400000000000000000000012241474765622100251140ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_238760.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_238760") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "@use \"sass:meta\";\n\ \n$id: meta.inspect((a#b:c)...)" ), "Error: Variable keyword argument map must have string keys.\ \n(a #b) is not a string in (a #b: c).\ \n ,\ \n3 | $id: meta.inspect((a#b:c)...)\ \n | ^^^^^^^\ \n \'\ \n input.scss 3:19 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_239.rs000066400000000000000000000060331474765622100246630ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_239.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_239") } #[test] fn test() { assert_eq!( runner().ok( "$gutter: 100% / 36.2;\r\ \n $gutter_em: 1rem; //This needs to be rem to not mess up margins\r\ \n\r\ \n// This calculate the gutter\r\ \n@function col_width($n, $use_calc: false) {\r\ \n $divisor: 12 / $n;\r\ \n @if ($use_calc) {\r\ \n $gutter_offset: $gutter_em * ($divisor - 1);\r\ \n @return calc((100% - #{$gutter_offset}) / #{$divisor});\r\ \n }\r\ \n @else {\r\ \n @return (100% - $gutter * ($divisor - 1)) / $divisor;\r\ \n }\r\ \n}\r\ \n\r\ \n// Each number here becomes a grid: onecol, twocol etc. \r\ \n$grids: one, two, three, four, five, six, seven, eight, nine, ten, eleven, twelve;\r\ \n$i: 1;\r\ \n@each $grid in $grids {\r\ \n .#{$grid}col {\r\ \n width: col_width( $i );\r\ \n width: col_width( $i, true );\r\ \n }\r\ \n\r\ \n %#{$grid}col {\r\ \n width: col_width( $i );\r\ \n width: col_width( $i, true );\r\ \n }\r\ \n $i: $i + 1;\r\ \n}" ), ".onecol {\ \n width: 5.8011049724%;\ \n width: calc((100% - 11rem) / 12);\ \n}\ \n.twocol {\ \n width: 14.364640884%;\ \n width: calc((100% - 5rem) / 6);\ \n}\ \n.threecol {\ \n width: 22.9281767956%;\ \n width: calc((100% - 3rem) / 4);\ \n}\ \n.fourcol {\ \n width: 31.4917127072%;\ \n width: calc((100% - 2rem) / 3);\ \n}\ \n.fivecol {\ \n width: 40.0552486188%;\ \n width: calc((100% - 1.4rem) / 2.4);\ \n}\ \n.sixcol {\ \n width: 48.6187845304%;\ \n width: calc((100% - 1rem) / 2);\ \n}\ \n.sevencol {\ \n width: 57.182320442%;\ \n width: calc((100% - 0.7142857143rem) / 1.7142857143);\ \n}\ \n.eightcol {\ \n width: 65.7458563536%;\ \n width: calc((100% - 0.5rem) / 1.5);\ \n}\ \n.ninecol {\ \n width: 74.3093922652%;\ \n width: calc((100% - 0.3333333333rem) / 1.3333333333);\ \n}\ \n.tencol {\ \n width: 82.8729281768%;\ \n width: calc((100% - 0.2rem) / 1.2);\ \n}\ \n.elevencol {\ \n width: 91.4364640884%;\ \n width: calc((100% - 0.0909090909rem) / 1.0909090909);\ \n}\ \n.twelvecol {\ \n width: 100%;\ \n width: calc((100% - 0rem) / 1);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2394.rs000066400000000000000000000034531474765622100247520ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2394.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2394") } #[test] fn test() { assert_eq!( runner().ok( "@use \"sass:map\";\ \n@use \"sass:meta\";\ \n@mixin brokenTest($color: red, $variableArguments...) {\r\ \n $width: map.get(meta.keywords($variableArguments), width);\r\ \n a {\r\ \n width: $width;\r\ \n color: $color;\r\ \n }\r\ \n}\r\ \n\r\ \n@mixin workingTest($variableArguments...) {\r\ \n $width: map.get(meta.keywords($variableArguments), width);\r\ \n $color: map.get(meta.keywords($variableArguments), color);\r\ \n a {\r\ \n width: $width;\r\ \n color: $color;\r\ \n }\r\ \n}\r\ \n\r\ \n@include brokenTest($width: 30px, $color: blue); // #1 fails\r\ \n@include brokenTest($color: blue, $width: 30px); // #2 fails\r\ \n@include brokenTest(blue, $width: 30px); // #3 works (!)\r\ \n@include workingTest($width: 30px, $color: blue); // #4 works\r\ \n@include workingTest($color: blue, $width: 30px); // #5 works\r\n" ), "a {\ \n width: 30px;\ \n color: blue;\ \n}\ \na {\ \n width: 30px;\ \n color: blue;\ \n}\ \na {\ \n width: 30px;\ \n color: blue;\ \n}\ \na {\ \n width: 30px;\ \n color: blue;\ \n}\ \na {\ \n width: 30px;\ \n color: blue;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2399.rs000066400000000000000000000013451474765622100247550ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2399.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2399") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".thing {\r\ \n\tcolor: black;\r\ \n}\r\ \n\r\ \n.a,\r\ \n.b,\r\ \n.c,\r\ \n.d,\r\ \n.e {\r\ \n\t&:not(.thing) { @extend .thing; }\r\ \n}"), ".thing, .a:not(.thing),\ \n.b:not(.thing),\ \n.c:not(.thing),\ \n.d:not(.thing),\ \n.e:not(.thing) {\ \n color: black;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2429.rs000066400000000000000000000006131474765622100247440ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2429.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2429") } #[test] fn test() { assert_eq!( runner().ok("input[type=url] {\r\ \n content: bar\r\ \n}"), "input[type=url] {\ \n content: bar;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2444.rs000066400000000000000000000006751474765622100247510ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2444.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2444") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("a {\ \n @at-root (with: rule) {\ \n b: c;\ \n }\ \n}\n"), "a {\ \n b: c;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_246.rs000066400000000000000000000015571474765622100246670ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_246.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_246") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok("$content-width: 960px;\r\ \n\r\ \n/* demo.css: */\r\ \n.selector {\r\ \n padding: 0 calc(100%/2 - #{$content-width/2})\r\ \n}\r\ \n\r\ \n\r\ \n/* bin/sassc demo.scss */\r\ \n.selector {\r\ \n padding: 0 calc(100%/2 - #{$content-width/2}); }"), "/* demo.css: */\ \n.selector {\ \n padding: 0 calc(50% - 480px);\ \n}\ \n/* bin/sassc demo.scss */\ \n.selector {\ \n padding: 0 calc(50% - 480px);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2462.rs000066400000000000000000000007121474765622100247410ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2462.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2462") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:color\";\ \nb {\ \n color: color.adjust(Crimson, $lightness: 10%);\ \n}\n"), "b {\ \n color: rgb(236.75, 54.25, 90.75);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2464.rs000066400000000000000000000011731474765622100247450ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2464.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2464") } #[test] fn test() { assert_eq!( runner().ok(":host(:not(.foo)) {\r\ \n left: 0;\r\ \n}\r\ \n\r\ \nfoobar {\r\ \n :host(:not(.foo)) {\r\ \n left: 0;\r\ \n }\r\ \n}"), ":host(:not(.foo)) {\ \n left: 0;\ \n}\ \nfoobar :host(:not(.foo)) {\ \n left: 0;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2465.rs000066400000000000000000000010261474765622100247430ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2465.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2465") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n a: 4e2px;\ \n b: 5e-2px;\ \n c: 6e2px + 3px;\ \n d: 7e-2px + 3px;\ \n}\n"), "foo {\ \n a: 400px;\ \n b: 0.05px;\ \n c: 603px;\ \n d: 3.07px;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2467.rs000066400000000000000000000017561474765622100247570ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2467.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2467") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n a: [footer-right] / 120px;\ \n b: [footer-right]/ 120px;\ \n c: [footer-right] /120px;\ \n d: [footer-right]/120px;\ \n e: [footer-right] / 120px 1fr;\ \n f: [footer-right]/ 120px 1fr;\ \n g: [footer-right] /120px 1fr;\ \n h: [footer-right]/120px 1fr;\ \n}\n"), "foo {\ \n a: [footer-right]/120px;\ \n b: [footer-right]/120px;\ \n c: [footer-right]/120px;\ \n d: [footer-right]/120px;\ \n e: [footer-right]/120px 1fr;\ \n f: [footer-right]/120px 1fr;\ \n g: [footer-right]/120px 1fr;\ \n h: [footer-right]/120px 1fr;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2468.rs000066400000000000000000000017451474765622100247560ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2468.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2468") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%matches {\ \n :matches(oh, no) {\ \n x: 1;\ \n y: 2;\ \n }\ \n}\ \nmatches {\ \n @extend %matches;\ \n @extend oh;\ \n}\n\ \n%any {\ \n :any(oh, no) {\ \n x: 1;\ \n y: 2;\ \n }\ \n}\ \nany {\ \n @extend %any;\ \n @extend oh;\ \n}\n"), "matches :matches(oh, any, matches, no) {\ \n x: 1;\ \n y: 2;\ \n}\ \nany :any(oh, any, matches, no) {\ \n x: 1;\ \n y: 2;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2472.rs000066400000000000000000000023771474765622100247530ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2472.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2472") } #[test] fn test() { assert_eq!( runner().ok("@function dark(\r\ \n $color,\r\ \n $args...\r\ \n) {\r\ \n @return call(\'darken\', $color, $args...);\r\ \n}\r\ \n\r\ \n@function dark2(\r\ \n $args...\r\ \n) {\r\ \n @return call(\'darken\', $args...);\r\ \n}\r\ \n\r\ \n$arg: join((), 5%);\r\ \n\r\ \n.single {\r\ \n direct: darken(#102030, 5%);\r\ \n arg: darken(#102030, $arg...);\r\ \n call: call(\'darken\', #102030, $arg...);\r\ \n function: dark(#102030, 5%);\r\ \n function2: dark2(#102030, 5%);\r\ \n}"), ".single {\ \n direct: rgb(9.625, 19.25, 28.875);\ \n arg: rgb(9.625, 19.25, 28.875);\ \n call: rgb(9.625, 19.25, 28.875);\ \n function: rgb(9.625, 19.25, 28.875);\ \n function2: rgb(9.625, 19.25, 28.875);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2480.rs000066400000000000000000000026741474765622100247520ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2480.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2480") } #[test] fn test() { assert_eq!( runner().ok("@mixin main(\r\ \n $param1: param1,\r\ \n $param2: param2,\r\ \n $param3: param3\r\ \n) {\r\ \n param1-value: $param1;\r\ \n param2-value: $param2;\r\ \n param3-value: $param3;\r\ \n}\r\ \n\r\ \n@mixin router($args...) {\r\ \n @if (true) { @include main($args...) }\r\ \n @else { @include main2($args...) }\r\ \n}\r\ \n\r\ \n@mixin helper($args...) {\r\ \n @include router($param2: param__2, $args...)\r\ \n}\r\ \n\r\ \n.ordinal-arguments {\r\ \n @include helper(param___1);\r\ \n}\r\ \n\r\ \n.named-arguments {\r\ \n @include helper($param1: param___1);\r\ \n}"), ".ordinal-arguments {\ \n param1-value: param___1;\ \n param2-value: param__2;\ \n param3-value: param3;\ \n}\ \n.named-arguments {\ \n param1-value: param___1;\ \n param2-value: param__2;\ \n param3-value: param3;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2482.rs000066400000000000000000000013431474765622100247440ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2482.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2482") } #[test] #[ignore] // missing error fn test() { assert_eq!( runner().err( "@mixin mixin()\ \n{\ \n\t& .class\ \n\t{\ \n\t\tcolor: black;\ \n\t}\ \n}\n\ \n@include mixin();" ), "Error: Top-level selectors may not contain the parent selector \"&\".\ \n ,\ \n3 | & .class\ \n | ^\ \n \'\ \n input.scss 3:2 mixin()\ \n input.scss 9:1 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2509.rs000066400000000000000000000015621474765622100247470ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2509.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2509") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "[charset i] {\r\ \n\tdisplay: block;\r\ \n}\r\ \n\r\ \n[charset I] {\r\ \n\tdisplay: block;\r\ \n}\r\ \n\r\ \n[charset=\"utf-8\" i] {\r\ \n\tdisplay: block;\r\ \n}\r\ \n\r\ \n[charset=\"utf-8\" I] {\r\ \n\tdisplay: block;\r\ \n}" ), "Error: Expected \"]\".\ \n ,\ \n1 | [charset i] {\ \n | ^\ \n \'\ \n input.scss 1:10 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2520.rs000066400000000000000000000306531474765622100247430ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2520.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2520") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok( "@use \"sass:list\";\ \n@use \"sass:map\";\ \n@use \"sass:meta\";\ \n@use \"sass:selector\";\ \n@use \"sass:string\";\ \n// ----\r\ \n// Sass (v3.4.21)\r\ \n// Compass (v1.0.3)\r\ \n// ----\r\ \n\r\ \n@function remove-modifiers($selector) {\r\ \n // convert selector to a string\r\ \n $selector: meta.inspect(list.nth($selector, 1));\r\ \n \r\ \n $modifier: \'\';\r\ \n \r\ \n // Find out where the first modifier starts\r\ \n $modifier-index: string.index($selector, \'\"--\');\r\ \n \r\ \n @if $modifier-index {\r\ \n // Strip the first part of the selector up until the first modifier\r\ \n $modifier: string.slice($selector, $modifier-index);\r\ \n // Find out where the modifier ends\r\ \n $modifier-end: string.index($modifier, \'\"]\');\r\ \n // Isolate the modifier\r\ \n $modifier: string.slice($modifier, 0, $modifier-end);\r\ \n // Remove the modifier from the selector\r\ \n $selector: str-replace($selector, $modifier, \'\');\r\ \n // Remove junk characters\r\ \n $selector: str-replace($selector, \'[class*=]\', \'\');\r\ \n // Recurse the function to eliminate any remainig modifiers\r\ \n $selector: remove-modifiers($selector);\r\ \n }\r\ \n \r\ \n @return $selector;\r\ \n }\r\ \n \r\ \n @function remove-duplicates($list, $recursive: false) {\r\ \n $result: ();\r\ \n \r\ \n @each $item in $list {\r\ \n @if not list.index($result, $item) {\r\ \n @if list.length($item) > 1 and $recursive {\r\ \n $result: list.append($result, remove-duplicates($item, $recursive));\r\ \n }\r\ \n @else {\r\ \n $result: list.append($result, $item);\r\ \n }\r\ \n }\r\ \n }\r\ \n \r\ \n @return $result;\r\ \n }\r\ \n \r\ \n @function str-replace($string, $search, $replace) { \r\ \n $index: string.index($string, $search);\r\ \n \r\ \n @if $index {\r\ \n @return string.slice($string, 1, $index - 1) + $replace + str-replace(\r\ \n string.slice($string, $index + string.length($search)), $search, $replace\r\ \n );\r\ \n }\r\ \n \r\ \n @return $string;\r\ \n }\r\ \n \r\ \n @function module-tree($selector) {\r\ \n $parent-module: $module;\r\ \n \r\ \n // Remove any modifers\r\ \n $selectors: remove-modifiers($selector);\r\ \n \r\ \n // Remove any junk characters\r\ \n $selectors: str-replace($selectors, \'.\', \'\');\r\ \n $selectors: str-replace($selectors, \'[class*=\"--\', \'\');\r\ \n $selectors: str-replace($selectors, \'[class*=\"\', \'\');\r\ \n $selectors: str-replace($selectors, \'--\"]\', \'\');\r\ \n $selectors: str-replace($selectors, \'\"]\', \'\');\r\ \n \r\ \n // Spoof our modules into a list\r\ \n $selectors: str-replace($selectors, \' \', \', \');\r\ \n $selectors: selector.parse($selectors);\r\ \n \r\ \n @return $selectors;\r\ \n }\r\ \n \r\ \n @function list-remove($list, $value, $recursive: false) { \r\ \n $result: ();\r\ \n \r\ \n @for $i from 1 through list.length($list) {\r\ \n @if meta.type-of(list.nth($list, $i)) == list and $recursive {\r\ \n $result: list.append($result, list-remove(list.nth($list, $i), $value, $recursive), comma);\r\ \n } @else if list.nth($list, $i) != $value {\r\ \n $result: list.append($result, list.nth($list, $i), comma);\r\ \n }\r\ \n }\r\ \n \r\ \n @return $result;\r\ \n }\r\ \n \r\ \n @function this($options...) {\r\ \n $value: map.get($config, $options...);\r\ \n $debug: true;\r\ \n \r\ \n $this: &;\r\ \n \r\ \n @if list.length($this) > 0 {\r\ \n @if string.index(meta.inspect(list.nth($this, 1)), \'%\') == 1 {\r\ \n $debug: false;\r\ \n }\r\ \n }\r\ \n \r\ \n @if $debug and not $value and $value != false {\r\ \n @warn \'#{$options} not found in #{$module} config\';\r\ \n }\r\ \n \r\ \n @return $value;\r\ \n }\r\ \n \r\ \n @function config($map-old, $map-new) {\r\ \n // Merge default and custom options\r\ \n $map-merged: map.merge($map-old, $map-new);\r\ \n \r\ \n // Store config in global variable\r\ \n $config: $map-merged !global;\r\ \n \r\ \n // Return merged map\r\ \n @return $map-merged;\r\ \n }\r\ \n \r\ \n @mixin module($module: $module) {\r\ \n $nested: &;\r\ \n \r\ \n @if not $nested {\r\ \n $module: $module !global;\r\ \n }\r\ \n \r\ \n $selectors: ();\r\ \n \r\ \n @each $item in $module {\r\ \n $selectors: list.join($selectors, \'.#{$module}\', comma);\r\ \n $selectors: list.join($selectors, \'[class*=\"#{$module}--\"]\', comma);\r\ \n }\r\ \n \r\ \n #{$selectors} {\r\ \n @content;\r\ \n }\r\ \n }\r\ \n \r\ \n @mixin component($components: null, $glue: \'__\') {\r\ \n $selectors: \'[class*=\"#{$module}#{$glue}\"]\';\r\ \n $this: &;\r\ \n $tree: module-tree($this);\r\ \n $namespace: list.nth($tree, list.length($tree));\r\ \n \r\ \n @if $components {\r\ \n $selectors: ();\r\ \n \r\ \n @each $component in $components {\r\ \n $selectors: list.join(\r\ \n $selectors, \r\ \n \'.#{$namespace}#{$glue}#{$component}, [class*=\"#{$namespace}#{$glue}#{$component}-\"]\', \r\ \n comma\r\ \n );\r\ \n }\r\ \n }\r\ \n \r\ \n $parents: ();\r\ \n \r\ \n @each $selector in & {\r\ \n // spoof the selector into a list\r\ \n $selector: str-replace(meta.inspect($selector), \' \', \', \');\r\ \n $selector: selector.parse($selector);\r\ \n \r\ \n // if the last item isn\'t a modifier, remove it\r\ \n @if not string.index(meta.inspect(list.nth($selector, list.length($selector))), \'[class*=\"--\') {\r\ \n $selector: list-remove($selector, list.nth($selector, list.length($selector)));\r\ \n }\r\ \n \r\ \n // convert the selector back into a string\r\ \n @if list.length($selector) == 1 {\r\ \n $selector: list.nth($selector, 1);\r\ \n }\r\ \n $selector: str-replace(meta.inspect($selector), \', \', \' \');\r\ \n \r\ \n // Re-build the parent selector\r\ \n $parents: list.append($parents, $selector, comma);\r\ \n }\r\ \n \r\ \n // remove duplicate selectors\r\ \n $parents: remove-duplicates($parents);\r\ \n \r\ \n @if list.length($parents) == 1 {\r\ \n $parents: list.nth($parents, 1);\r\ \n }\r\ \n \r\ \n @if ($parents == \'()\') {\r\ \n @at-root #{$selectors} {\r\ \n @content;\r\ \n }\r\ \n } @else {\r\ \n @at-root #{$parents} {\r\ \n #{$selectors} {\r\ \n @content;\r\ \n }\r\ \n }\r\ \n }\r\ \n \r\ \n }\r\ \n \r\ \n @mixin modifier($modifier) {\r\ \n $selectors: &;\r\ \n \r\ \n @if string.index(meta.inspect(&), \'.#{$module}\') {\r\ \n $selectors: ();\r\ \n \r\ \n @for $i from 1 through list.length(&) {\r\ \n @if $i % 2 == 0 {\r\ \n $selectors: list.append($selectors, list.nth(&, $i), comma);\r\ \n }\r\ \n }\r\ \n }\r\ \n \r\ \n @at-root #{$selectors} {\r\ \n $modifier-selectors: ();\r\ \n \r\ \n @each $item in $modifier {\r\ \n $modifier-selectors: list.join(\r\ \n $modifier-selectors, \'&[class*=\"--#{$modifier}\"]\', comma\r\ \n );\r\ \n }\r\ \n \r\ \n #{$modifier-selectors} {\r\ \n @content;\r\ \n }\r\ \n }\r\ \n }\r\ \n \r\ \n @mixin button($custom:()) {\r\ \n $buttons: config((\r\ \n \'group-spacing\': 1em\r\ \n ), $custom);\r\ \n \r\ \n @include module(\'button\') {\r\ \n @include component(\'group\') {\r\ \n content: \'fizzbuzz\';\r\ \n @include module {\r\ \n margin-left: this(\'group-spacing\');\r\ \n &:first-child {\r\ \n margin-left: 0;\r\ \n }\r\ \n }\r\ \n }\r\ \n }\r\ \n }\r\ \n \r\ \n @include button();\r\ \n \r\ \n @include module(\'modal\') {\r\ \n @include modifier(\'animate\') {\r\ \n @include modifier(\'zoom\') {\r\ \n content: \"fizzbuzz\"\r\ \n }\r\ \n }\r\ \n }" ), ".button__group, [class*=\"button__group-\"] {\ \n content: \'fizzbuzz\';\ \n}\ \n.button__group .button, .button__group [class*=\"button--\"], [class*=\"button__group-\"] .button, [class*=\"button__group-\"] [class*=\"button--\"] {\ \n margin-left: 1em;\ \n}\ \n.button__group .button:first-child, .button__group [class*=\"button--\"]:first-child, [class*=\"button__group-\"] .button:first-child, [class*=\"button__group-\"] [class*=\"button--\"]:first-child {\ \n margin-left: 0;\ \n}\ \n[class*=\"modal--\"][class*=\"--animate\"][class*=\"--zoom\"] {\ \n content: \"fizzbuzz\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_254.rs000066400000000000000000000021571474765622100246630ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_254.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_254") } #[test] fn test() { assert_eq!( runner().ok( "@mixin simple-media-query($max-width, $min-width) {\r\ \n @media only screen and (max-width: $max-width) and (min-width: $min-width) {\r\ \n @content;\r\ \n }\r\ \n}\r\ \n\r\ \n@mixin test($value) {\r\ \n border-color: $value;\r\ \n}\r\ \n\r\ \nbody \r\ \n{\r\ \n @include test(\"#ccc\");\r\ \n @include simple-media-query(900px, 400px) {\r\ \n border-color: black;\r\ \n }\r\ \n}" ), "body {\ \n border-color: \"#ccc\";\ \n}\ \n@media only screen and (max-width: 900px) and (min-width: 400px) {\ \n body {\ \n border-color: black;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2560.rs000066400000000000000000000007621474765622100247450ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2560.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2560") } #[test] fn test() { assert_eq!( runner().ok("$x: 10px / 5px;\r\ \n\r\ \ntest {\r\ \n font-size: $x;\r\ \n font-size: #{$x};\r\ \n}"), "test {\ \n font-size: 2;\ \n font-size: 2;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2569.rs000066400000000000000000000014021474765622100247460ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2569.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2569") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "@function test() {\ \n @if (false) {\ \n @return 0;\ \n } @else {\ \n opacity: 1;\ \n }\ \n}\n\ \n.my-module {\ \n opacity: test();\ \n}" ), "Error: @function rules may not contain declarations.\ \n ,\ \n5 | opacity: 1;\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 5:5 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_257.rs000066400000000000000000000006411474765622100246620ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_257.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_257") } #[test] fn test() { assert_eq!( runner().ok("body{background:blue; a{color:black;}}"), "body {\ \n background: blue;\ \n}\ \nbody a {\ \n color: black;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2582.rs000066400000000000000000000010601474765622100247410ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2582.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2582") } #[test] fn test() { assert_eq!( runner().ok(".test {\r\ \n font-size: (16px / 16px) + 0em;\r\ \n font-size: (16px / 16px + 0em);\r\ \n font-size: 16px / 16px + 0em;\r\ \n}"), ".test {\ \n font-size: 1em;\ \n font-size: 1em;\ \n font-size: 1em;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2625.rs000066400000000000000000000005411474765622100247420ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2625.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2625") } #[test] fn test() { assert_eq!( runner().ok("something\\:{ padding: 2px; }\n"), "something\\: {\ \n padding: 2px;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2633.rs000066400000000000000000000026541474765622100247500ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2633.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2633") } #[test] fn test() { assert_eq!( runner().ok( "@use \"sass:selector\";\ \n$sel1: \'.something__child + .something__child--mod1\';\ \n$sel2: \'.something__child ~ .something__child--mod2\';\ \n$result1: selector.unify($sel1, $sel2);\n\ \n#{$result1} {\ \n /* nothing */\ \n}\n\ \n.a {\ \n color: blue;\ \n & > * {\ \n @at-root #{selector.unify(&, \'.b\')} {\ \n color: red;\ \n }\ \n }\ \n}\n\ \n.a, .b {\ \n color: blue;\ \n & > * {\ \n @at-root #{selector.unify(&, \'.c, .d\')} {\ \n color: red;\ \n }\ \n }\ \n}\n" ), ".something__child + .something__child--mod1.something__child--mod2 {\ \n /* nothing */\ \n}\ \n.a {\ \n color: blue;\ \n}\ \n.a > .b {\ \n color: red;\ \n}\ \n.a, .b {\ \n color: blue;\ \n}\ \n.a > .c, .a > .d, .b > .c, .b > .d {\ \n color: red;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2640.rs000066400000000000000000000014121474765622100247350ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue-2640.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue-2640") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:selector\";\ \n.theme1, .theme2 {\ \n .something {\ \n /* nothing */\ \n }\ \n}\n\ \n$sel: selector.nest(\'.theme1, .theme2\', \'.something\');\ \n \ \n#{$sel} {\ \n /* nothing */\ \n}\n"), ".theme1 .something, .theme2 .something {\ \n /* nothing */\ \n}\ \n.theme1 .something, .theme2 .something {\ \n /* nothing */\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2681.rs000066400000000000000000000012441474765622100247450ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue-2681.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue-2681") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%button-styles {\ \n color: red;\n\ \n &:focus {\ \n color: blue;\ \n }\ \n}\n\ \n[type=\"button\"] {\ \n @extend %button-styles;\ \n}\n\n"), "[type=button] {\ \n color: red;\ \n}\ \n[type=button]:focus {\ \n color: blue;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2697.rs000066400000000000000000000010421474765622100247500ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2697.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2697") } #[test] fn test() { assert_eq!( runner().ok(".Card {\ \n &:not(.is-open, .is-static) {\ \n .CardContents {\ \n display: none;\ \n }\ \n }\ \n}\n"), ".Card:not(.is-open, .is-static) .CardContents {\ \n display: none;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_274.rs000066400000000000000000000011541474765622100246610ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_274.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_274") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok("input[type=submit],\r\ \ninput[type=reset],\r\ \ninput[type=button]\r\ \n{\r\ \n filter:chroma(color=#000000);\r\ \n}"), "input[type=submit],\ \ninput[type=reset],\ \ninput[type=button] {\ \n filter: chroma(color=#000000);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2779.rs000066400000000000000000000013541474765622100247570ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2779.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2779") } #[test] fn test() { assert_eq!( runner().err( "@use \"sass:selector\";\ \n@debug(selector.extend(\".a .b\", \"&b\", ndll));\n" ), "Error: $extendee: Parent selectors aren\'t allowed here.\ \n ,\ \n1 | &b\ \n | ^^\ \n \'\ \n - 1:1 root stylesheet\ \n ,\ \n2 | @debug(selector.extend(\".a .b\", \"&b\", ndll));\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:8 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_279.rs000066400000000000000000000010641474765622100246660ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_279.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("issue_279") .mock_file("foo.scss", ".test-hello {\n color: red;\n}\n\n.test-world {\n @extend .test-hello;\n}\n") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".theme {\ \n @import \"foo.scss\";\ \n}\n"), ".theme .test-hello, .theme .test-world {\ \n color: red;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2808.rs000066400000000000000000000006611474765622100247500ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2808.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2808") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:string\";\ \ntest {\ \n content: string.slice(abcdef, -10, 2)\ \n}\n"), "test {\ \n content: ab;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2863.rs000066400000000000000000000021521474765622100247460ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2863.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2863") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:string\";\ \n$squoted: \"\'dquoted\'\";\ \n$dquoted: \"\\\"squoted\\\"\";\n\ \ntest {\ \n str-slice-single: string.slice( $squoted, 1, 2 );\ \n str-slice-double: string.slice( $dquoted, 1, 2 );\ \n str-index-single: string.index( $squoted, \"q\" );\ \n str-index-double: string.index( $dquoted, \"q\" );\ \n str-insert-single: string.insert( $squoted, \"p\", 2 );\ \n str-insert-double: string.insert( $dquoted, \"p\", 2 );\ \n}\n"), "test {\ \n str-slice-single: \"\'d\";\ \n str-slice-double: \'\"s\';\ \n str-index-single: 3;\ \n str-index-double: 3;\ \n str-insert-single: \"\'pdquoted\'\";\ \n str-insert-double: \'\"psquoted\"\';\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2884.rs000066400000000000000000000031521474765622100247520ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2884.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2884") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok( "$titles: \"foo\", \"bar\", \"BaZ\";\n\ \n%border {\ \n border: 1px solid;\ \n}\n\ \n@mixin border-red {\ \n border-color: red;\ \n}\n\ \n@mixin border-blue {\ \n border-color: blue;\ \n}\n\ \n@each $t in $titles {\ \n p[title=\"#{$t}\" i] {\ \n @extend %border;\ \n @include border-red;\ \n }\ \n p[title=\"#{$t}\"] {\ \n @extend %border;\ \n @include border-blue;\ \n }\ \n}\n" ), "p[title=BaZ], p[title=BaZ i], p[title=bar], p[title=bar i], p[title=foo], p[title=foo i] {\ \n border: 1px solid;\ \n}\ \np[title=foo i] {\ \n border-color: red;\ \n}\ \np[title=foo] {\ \n border-color: blue;\ \n}\ \np[title=bar i] {\ \n border-color: red;\ \n}\ \np[title=bar] {\ \n border-color: blue;\ \n}\ \np[title=BaZ i] {\ \n border-color: red;\ \n}\ \np[title=BaZ] {\ \n border-color: blue;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_289.rs000066400000000000000000000007021474765622100246650ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_289.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_289") } #[test] fn test() { assert_eq!( runner().ok( "@import url(http://fonts.googleapis.com/css?family=Titillium+Web:400,300,200,600);" ), "@import url(http://fonts.googleapis.com/css?family=Titillium+Web:400,300,200,600);\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2959.rs000066400000000000000000000016121474765622100247540ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2959.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2959") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%color {\ \n\tcolor: blue;\ \n}\n\ \n@mixin getOverridedSelector {\ \n\t&#{&} {\ \n\t\t@content;\ \n\t}\ \n}\n\ \n.foo {\ \n\t@include getOverridedSelector {\ \n\t\t@extend %color;\ \n\t}\ \n}\n\ \n.bar {\ \n\t@include getOverridedSelector {\ \n\t\tcolor: red;\ \n\t}\ \n}\n"), ".foo.foo {\ \n color: blue;\ \n}\ \n.bar.bar {\ \n color: red;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2975.rs000066400000000000000000000031631474765622100247550ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2975.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2975") } #[test] fn test() { assert_eq!( runner().ok("@mixin test($name: false) {\ \n $a: \"\";\ \n $b: \"\";\ \n @if $name {\ \n $a: \"-#{$name}\"; // works as expected\ \n $b: -$name; // here occurs the bug\ \n } @else {\ \n $a: \"\";\ \n $b: \"\";\ \n }\ \n \ \n .test-a#{$a} {\ \n display: block;\ \n }\ \n .test-b#{$b} {\ \n display: block;\ \n }\ \n}\n\ \n@include test;\ \n@include test(asdf);\ \n@include test(foo1);\ \n@include test(bar1);\ \n// @include test(\"foo2\");\ \n// @include test(\"bar2\");\n"), ".test-a {\ \n display: block;\ \n}\ \n.test-b {\ \n display: block;\ \n}\ \n.test-a-asdf {\ \n display: block;\ \n}\ \n.test-b-asdf {\ \n display: block;\ \n}\ \n.test-a-foo1 {\ \n display: block;\ \n}\ \n.test-b-foo1 {\ \n display: block;\ \n}\ \n.test-a-bar1 {\ \n display: block;\ \n}\ \n.test-b-bar1 {\ \n display: block;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2980.rs000066400000000000000000000032441474765622100247510ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2980.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2980") } #[test] fn test() { assert_eq!( runner().ok( "@use \"sass:map\";\ \n$config: (\ \n phone: (\ \n break-point-width:0px,\ \n break-point-name: xs\ \n ),\ \n tablet: (\ \n break-point-width:600px,\ \n break-point-name: sm\ \n ),\ \n laptop: (\ \n break-point-width:900px,\ \n break-point-name: md\ \n ),\ \n desktop: (\ \n break-point-width:1200px,\ \n break-point-name:lg\ \n ),\ \n);\n\ \n@each $key, $map in $config {\ \n $break-point-width: map.get($map, break-point-width);\ \n $break-point-name: map.get($map, break-point-name);\ \n $infix: if($break-point-width == 0px, null, -$break-point-name);\ \n .foo#{$infix} {\ \n content: \'#{$break-point-name}\';\ \n }\ \n}\n" ), ".foo {\ \n content: \"xs\";\ \n}\ \n.foo-sm {\ \n content: \"sm\";\ \n}\ \n.foo-md {\ \n content: \"md\";\ \n}\ \n.foo-lg {\ \n content: \"lg\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_2994.rs000066400000000000000000000015631474765622100247600ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_2994.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2994") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok( ".one-screen-page {\ \n\t@extend %context-dark;\ \n}\n\ \n%context-dark {\ \n\t.button-secondary-outline {\ \n\t\t&:hover,\ \n\t\t&:focus,\ \n\t\t&:active,\ \n\t\t&:hover {\ \n\t\t\tcolor: #fca;\ \n\t\t}\ \n\t}\ \n}\n" ), ".one-screen-page .button-secondary-outline:hover, .one-screen-page .button-secondary-outline:focus, .one-screen-page .button-secondary-outline:active {\ \n color: #fca;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_308.rs000066400000000000000000000010471474765622100246600ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_308.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_308") } #[test] fn test() { assert_eq!( runner().ok("$var: orange;\n\ \n.test {\ \n color: $var;\ \n}\n\ \n.#{$var} {\ \n color: #C0362C;\ \n}\n"), ".test {\ \n color: orange;\ \n}\ \n.orange {\ \n color: #C0362C;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_309.rs000066400000000000000000000005711474765622100246620ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_309.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_309") } #[test] fn test() { assert_eq!( runner().ok("$zzz: zzz;\r\ \na[data-foo=\"#{$zzz}\"] { a: b; }"), "a[data-foo=zzz] {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_312.rs000066400000000000000000000026151474765622100246550ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_312.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_312") } #[test] fn test() { assert_eq!( runner().ok("@for $i from 0 through 10 {\r\ \n .foo [index = \"#{$i}\"] {\r\ \n transform: translateY($i * 100%);\r\ \n }\r\ \n}"), ".foo [index=\"0\"] {\ \n transform: translateY(0%);\ \n}\ \n.foo [index=\"1\"] {\ \n transform: translateY(100%);\ \n}\ \n.foo [index=\"2\"] {\ \n transform: translateY(200%);\ \n}\ \n.foo [index=\"3\"] {\ \n transform: translateY(300%);\ \n}\ \n.foo [index=\"4\"] {\ \n transform: translateY(400%);\ \n}\ \n.foo [index=\"5\"] {\ \n transform: translateY(500%);\ \n}\ \n.foo [index=\"6\"] {\ \n transform: translateY(600%);\ \n}\ \n.foo [index=\"7\"] {\ \n transform: translateY(700%);\ \n}\ \n.foo [index=\"8\"] {\ \n transform: translateY(800%);\ \n}\ \n.foo [index=\"9\"] {\ \n transform: translateY(900%);\ \n}\ \n.foo [index=\"10\"] {\ \n transform: translateY(1000%);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_338.rs000066400000000000000000000010321474765622100246550ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_338.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_338") } #[test] fn test() { assert_eq!( runner().ok( "@use \"sass:list\";\ \n$list: (\"a\", \"b\");\n\ \ntest {\ \n content: if( list.length($list) > 2, list.nth($list, 3), list.nth($list, 1) );\ \n}\n" ), "test {\ \n content: \"a\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_344.rs000066400000000000000000000011421474765622100246540ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_344.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_344") } #[test] fn test() { assert_eq!( runner().ok("$variable: 1;\n\ \n$foo: #{$variable}px;\ \n$bar: #{1}px;\ \n$baz: \"1px\";\n\ \ndiv {\ \n top: -$foo;\ \n top: -$bar;\ \n top: -$baz;\ \n}\n"), "div {\ \n top: -1px;\ \n top: -1px;\ \n top: -\"1px\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_346.rs000066400000000000000000000010671474765622100246640ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_346.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_346") } #[test] fn test() { assert_eq!( runner().ok("$mediaquery: \'and (min-width: 300px)\';\n\ \n@media all #{$mediaquery} {\ \n div {\ \n display: block;\ \n }\ \n}\n"), "@media all and (min-width: 300px) {\ \n div {\ \n display: block;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_349.rs000066400000000000000000000005611474765622100246650ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_349.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_349") } #[test] fn test() { assert_eq!( runner().ok("div {\ \n blah: not true;\ \n}\n"), "div {\ \n blah: false;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_368.rs000066400000000000000000000016031474765622100246640ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_368.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_368") } #[test] fn test() { assert_eq!( runner().ok("@if true {\ \n div {\ \n background: green;\ \n }\ \n}\ \n@if not true {\ \n div {\ \n background: red;\ \n }\ \n}\ \n@if not not true {\ \n div {\ \n background: blue;\ \n }\ \n}\ \n@if not (true or false) {\ \n div {\ \n background: black;\ \n }\ \n}"), "div {\ \n background: green;\ \n}\ \ndiv {\ \n background: blue;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_394.rs000066400000000000000000000017121474765622100246640ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_394.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_394") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:list\";\ \n$list1: alpha beta gamma;\ \n$list2: one two three;\n\ \n$map: (alpha: one, beta: two, gamma: three);\n\ \n.ma-list {\ \n @each $item1, $item2 in list.zip($list1, $list2) {\ \n #{$item1}: $item2;\ \n }\ \n}\n\ \n.ma-map {\ \n @each $key, $value in $map {\ \n #{$key}: $value;\ \n }\ \n}"), ".ma-list {\ \n alpha: one;\ \n beta: two;\ \n gamma: three;\ \n}\ \n.ma-map {\ \n alpha: one;\ \n beta: two;\ \n gamma: three;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_424.rs000066400000000000000000000025051474765622100246570ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_424.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_424") } #[test] fn test() { assert_eq!( runner().ok("footer {\r\ \n color: red;\r\ \n}\r\ \n\r\ \n// Ampersand in SassScript:\r\ \n/*.button {\r\ \n &-primary {\r\ \n background: orange;\r\ \n }\r\ \n\r\ \n &-secondary {\r\ \n background: blue;\r\ \n }\r\ \n}*/\r\ \n\r\ \n// Output:\r\ \n.button-primary {\r\ \n background: orange;\r\ \n}\r\ \n\r\ \n.button-secondary {\r\ \n background: blue;\r\ \n}"), "footer {\ \n color: red;\ \n}\ \n/*.button {\ \n &-primary {\ \n background: orange;\ \n }\ \n &-secondary {\ \n background: blue;\ \n }\ \n}*/\ \n.button-primary {\ \n background: orange;\ \n}\ \n.button-secondary {\ \n background: blue;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_435.rs000066400000000000000000000043271474765622100246650ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_435.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_435") } #[test] fn test() { assert_eq!( runner().ok( "@use \"sass:string\";\ \n$skin-name: \"CMS_Black\";\r\ \n\r\ \n$QUOTE: string.unquote(\'\"\');\r\ \n$EMPTY_STRING: string.unquote( \"\" );\r\ \n$SLASH: string.unquote(\"/\");\r\ \n\r\ \n$SKINS_PATH: string.unquote(\"/CMS/Skins\");\r\ \n$URL_SEPARATOR: $SLASH;\r\ \n$URL_PREFIX: $EMPTY_STRING;\r\ \n$URL_SUFFIX: $EMPTY_STRING;\r\ \n\r\ \n$_URL_PREFIX: $URL_PREFIX + $EMPTY_STRING;\r\ \n$_URL_SUFFIX: $URL_SUFFIX + $EMPTY_STRING;\r\ \n$_URL_SEPARATOR: $URL_SEPARATOR + $EMPTY_STRING;\r\ \n$_SKINS_PATH: $SKINS_PATH + $EMPTY_STRING;\r\ \n\r\ \n@function webresource-image-url( $skin, $control, $file ) \r\ \n{\r\ \n\t$_url: $EMPTY_STRING;\r\ \n\t$_path: $_SKINS_PATH $skin $control;\r\ \n\r\ \n\t@each $_part in $_path {\r\ \n\t\t$_url: $_url + $_part + $_URL_SEPARATOR\r\ \n\t}\r\ \n\r\ \n\t@return $_URL_PREFIX + $QUOTE + $_url + $file + $QUOTE + $_URL_SUFFIX;\r\ \n}\r\ \n\r\ \n@function global-image-url( $skin, $control, $file ) {\r\ \n\t@return webresource-image-url( $skin, $control, $file );\r\ \n}\r\ \n\r\ \n@function skin-image-url( $control, $file ) {\r\ \n\t@return global-image-url( $skin-name, $control, $file );\r\ \n}\r\ \n\r\ \n$actions-sprite: skin-image-url( \"Common\", \"radActionsSprite.png\" );\r\ \n\r\ \n.test \r\ \n{\r\ \n\tbackground-image: url( $actions-sprite );\r\ \n}\r\ \n\r\n" ), ".test {\ \n background-image: url(\"/CMS/Skins/CMS_Black/Common/radActionsSprite.png\");\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_439.rs000066400000000000000000000014231474765622100246630ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_439.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_439") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("@use \"sass:string\";\ \n@mixin odd( $selector, $n) {\ \n $selector: \"& + \" + $selector + \" + \" + $selector;\ \n $placeholder: string.unique_id();\ \n %#{$placeholder} { @content; }\ \n #{$selector}:first-child {\ \n #{$selector} { @extend %#{$placeholder}; }\ \n }\ \n}\n\ \nul > {\ \n @include odd( li, 5 ) { background: #ccc; }\ \n}\n"), "" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_442.rs000066400000000000000000000010331474765622100246520ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_442.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_442") } #[test] fn test() { assert_eq!( runner().ok("$lhs: (100/10)#{rem};\ \n$rhs: 10rem;\n\ \nfoo {\ \n a: $lhs;\ \n a: $rhs;\ \n a: $lhs == $rhs;\ \n}\n"), "foo {\ \n a: 10 rem;\ \n a: 10rem;\ \n a: false;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_45.rs000066400000000000000000000047031474765622100246000ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_45.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_45") } #[test] fn test() { assert_eq!( runner().ok( "p:after {\r\ \ncontent:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAACeElEQVR42nySy29McRTHP/fOnTvT6bQNrdHKMGGhFkTSELGxwoJY8Q9YWFhYEUJsRSKCsJWikjYSJBIbinpVPJLSRlEkKK2WTnXmvl+/Y4F4tPVJPqtvzjcnJ0cTEQxdY/miFH6gcAJpaWrQl86t05rR9axSKD8UZ6KqJscm5bMdyDDgAYgIBoCORm2G1u0b6w8unJ/bmDG1QtpUmIYiZ8Zk0zEpYmW76tujV9J3/Ep04v0XdR2IDYAdWxYt27Sa8/l8btWIlaYSupgqpNaMUYbC0DUa8qKXWpLGNSvZEETpZO/Z4B5gGQCRMio1xdVfioUIa3AQJ/ZARWhJgkQJKq3wfJ3RwETGhRtPgx7ABtBEhCVNBqViU2tn5+5bLfXmgurIYwJrGFEJmqZh2T4jo2X0YIreZ+7dfeejrcCEiKADfCon3O4fHzp25Nx+8nnqF65lXnEphQUtNBYKaKkMcRgxVY29093JUWCCn+gAORMaTLh0dbCjo/1KO3X1kC6BGIR+QLVioSc+F+9HnW/G1DX+QAcw0j8c/QaHj3UfeN0/MMicEmSL+J5P6DkMDUcfLvZGJ4FwWoHl/lAEXo344zv3dO3ynXJIpg7XdnBtj46bwSnblwH+QQdQ8lsNeNg32nOm/fIh3CGS0OXOQHCv90XYwUyICM2NNX85f26WUnOu5smFzX0vu9qktZjeNtusAbB+XdvfAWDZnjeurX2XST1Y8X6s7zmzYABUrHBaYNshYRC4k340FcZU/1vg2JVpgeP4uJXypHK8soD134In/W+mb+AJvffvvC022It/ve1MaCJCXU6f4UCQy1CbNVONH7/Gw7Md8fsAtddMUh5fveYAAAAASUVORK5CYII=);\r\ \n}" ), "p:after {\ \n content: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAACeElEQVR42nySy29McRTHP/fOnTvT6bQNrdHKMGGhFkTSELGxwoJY8Q9YWFhYEUJsRSKCsJWikjYSJBIbinpVPJLSRlEkKK2WTnXmvl+/Y4F4tPVJPqtvzjcnJ0cTEQxdY/miFH6gcAJpaWrQl86t05rR9axSKD8UZ6KqJscm5bMdyDDgAYgIBoCORm2G1u0b6w8unJ/bmDG1QtpUmIYiZ8Zk0zEpYmW76tujV9J3/Ep04v0XdR2IDYAdWxYt27Sa8/l8btWIlaYSupgqpNaMUYbC0DUa8qKXWpLGNSvZEETpZO/Z4B5gGQCRMio1xdVfioUIa3AQJ/ZARWhJgkQJKq3wfJ3RwETGhRtPgx7ABtBEhCVNBqViU2tn5+5bLfXmgurIYwJrGFEJmqZh2T4jo2X0YIreZ+7dfeejrcCEiKADfCon3O4fHzp25Nx+8nnqF65lXnEphQUtNBYKaKkMcRgxVY29093JUWCCn+gAORMaTLh0dbCjo/1KO3X1kC6BGIR+QLVioSc+F+9HnW/G1DX+QAcw0j8c/QaHj3UfeN0/MMicEmSL+J5P6DkMDUcfLvZGJ4FwWoHl/lAEXo344zv3dO3ynXJIpg7XdnBtj46bwSnblwH+QQdQ8lsNeNg32nOm/fIh3CGS0OXOQHCv90XYwUyICM2NNX85f26WUnOu5smFzX0vu9qktZjeNtusAbB+XdvfAWDZnjeurX2XST1Y8X6s7zmzYABUrHBaYNshYRC4k340FcZU/1vg2JVpgeP4uJXypHK8soD134In/W+mb+AJvffvvC022It/ve1MaCJCXU6f4UCQy1CbNVONH7/Gw7Md8fsAtddMUh5fveYAAAAASUVORK5CYII=);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_453.rs000066400000000000000000000006521474765622100246620ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_453.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_453") } #[test] fn test() { assert_eq!( runner().ok("div {\ \n --a: 2px;\ \n top: var(--a);\ \n}\n"), "div {\ \n --a: 2px;\ \n top: var(--a);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_456.rs000066400000000000000000000006221474765622100246620ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_456.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_456") } #[test] fn test() { assert_eq!( runner().ok("body {\ \n -webkit-filter: invert(100%);\ \n}\n"), "body {\ \n -webkit-filter: invert(100%);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_469.rs000066400000000000000000000010661474765622100246710ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_469.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_469") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok("/*!\ \n*/\n\ \n@charset \"utf-8\";\n\ \na {\ \n color: red;\ \n}\n\ \n@import url(\"x\");\n"), "/*!\ \n*/\ \n@import url(\"x\");\ \na {\ \n color: red;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_478.rs000066400000000000000000000006371474765622100246740ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_478.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_478") } #[test] fn test() { assert_eq!( runner().ok("$x: \"x\";\ \n$y: \"y\";\ \n#{$x}--#{$y} {\ \n a: 1\ \n}\n"), "x--y {\ \n a: 1;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_485.rs000066400000000000000000000016041474765622100246650ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_485.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_485") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok( "@media not all and (monochrome) { a {foo: bar} }\ \n@media not screen and (color), print and (color) { a {foo: bar} }\ \n@media (not (screen and (color))), print and (color) { a {foo: bar} }\n" ), "@media not all and (monochrome) {\ \n a {\ \n foo: bar;\ \n }\ \n}\ \n@media not screen and (color), print and (color) {\ \n a {\ \n foo: bar;\ \n }\ \n}\ \n@media not (color), print and (color) {\ \n a {\ \n foo: bar;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_487.rs000066400000000000000000000016211474765622100246660ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_487.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_487") } #[test] fn test() { assert_eq!( runner().ok("\ \n@mixin flex($grow: 1, $shrink: null, $basis: null) {\ \n -webkit-box-flex: $grow;\ \n -webkit-flex: $grow $shrink $basis;\ \n -moz-box-flex: $grow;\ \n -moz-flex: $grow $shrink $basis;\ \n -ms-flex: $grow $shrink $basis;\ \n flex: $grow $shrink $basis;\ \n}\n\ \n[flex] {\ \n @include flex;\ \n}\n"), "[flex] {\ \n -webkit-box-flex: 1;\ \n -webkit-flex: 1;\ \n -moz-box-flex: 1;\ \n -moz-flex: 1;\ \n -ms-flex: 1;\ \n flex: 1;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_492.rs000066400000000000000000000016071474765622100246660ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_492.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_492") } #[test] fn test() { assert_eq!( runner().ok("$map: (\ \n foo: bar,\ \n baz: monkey,\ \n);\n\ \n.css {\ \n @each $key, $value in $map {\ \n #{$key}: $value;\ \n }\ \n}\n\ \n$list: one two, three four five, six seven;\n\ \n.list {\ \n @each $foo, $bar, $baz in $list {\ \n #{$foo}: $bar $baz;\ \n }\ \n}\n"), ".css {\ \n foo: bar;\ \n baz: monkey;\ \n}\ \n.list {\ \n one: two;\ \n three: four five;\ \n six: seven;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_495.rs000066400000000000000000000007751474765622100246760ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_495.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_495") } #[test] fn test() { assert_eq!( runner().ok( "/* Testing to make sure that a trailing comma doesn\'t break the tests */\ \n$map: (\ \n hello: world,\ \n);\n" ), "/* Testing to make sure that a trailing comma doesn\'t break the tests */\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_502.rs000066400000000000000000000005011474765622100246460ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_502.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_502") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("$a: 1;;\ \n;;\n"), "" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_506.rs000066400000000000000000000013321474765622100246550ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_506.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_506") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:list\";\ \n$list: foo bar baz;\ \n$list--comma: foo, bar, baz;\ \n$single: foo;\n\ \ndiv {\ \n _list-space: list.separator($list);\ \n _list-comma: list.separator($list--comma);\ \n _single-item: list.separator($single);\ \n}"), "div {\ \n _list-space: space;\ \n _list-comma: comma;\ \n _single-item: space;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_509.rs000066400000000000000000000025411474765622100246630ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_509.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_509") } #[test] fn test() { assert_eq!( runner().ok( "@use \"sass:map\";\ \n$foo: (\ \n (key1): (value-1-0),\ \n key2: value-2-0,\ \n (key6): (value-6-0),\ \n key-3-0 key-3-1 key-3-2: value-3-0 value-3-1 value-3-2,\ \n key4: (value-4-0, value-4-1, value-4-2),\ \n key5: (key-5-0: value-5-1),\ \n (key-7-0: key-7-1): (value-7-0: value-7-1),\ \n (key-8-0, key-8-1, key-8-2): (value-8-0, value-8-1, value-8-2),\ \n);\n\ \ndiv {\ \n foo: map.get((foo: 1, bar: 2), foo);\ \n foo: map.get((foo: 1, bar: 2), bar);\ \n foo: map.get((foo: 1, bar: 2), baz);\ \n foo: map.get((), foo);\ \n foo: map.get($foo, (key-5-0: value-5-1));\ \n foo: map.get($foo, (key2));\ \n foo: map.get($foo, (key-3-0 key-3-1 key-3-2));\ \n}\n" ), "div {\ \n foo: 1;\ \n foo: 2;\ \n foo: value-2-0;\ \n foo: value-3-0 value-3-1 value-3-2;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_510.rs000066400000000000000000000010551474765622100246520ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_510.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_510") } #[test] fn test() { assert_eq!( runner().ok( "@use \"sass:map\";\ \n$before: map.remove((foo: 1, bar: 2, baz: 3, burp: 4), bar, baz);\ \n$after: (foo: 1, burp: 4);\n\ \ndiv {\ \n foo: $before == $after;\ \n}" ), "div {\ \n foo: true;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_512.rs000066400000000000000000000011721474765622100246540ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_512.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_512") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:list\";\ \n@use \"sass:meta\";\ \n$list: a b c;\ \n.css {\ \n debug: list.index($list, a);\n\ \n @if meta.type-of(list.index($list, 2)) == \"null\" {\ \n debug: foo;\ \n }\ \n}\n"), ".css {\ \n debug: 1;\ \n debug: foo;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_534.rs000066400000000000000000000013131474765622100246550ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_534.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_534") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:map\";\ \n$foo: (\ \n 1: foo1 bar1,\ \n 10: foo2 bar2,\ \n 100: foo3 bar3,\ \n);\n\ \ndiv {\ \n foo: map.get($foo, 1);\ \n foo: map.get($foo, 10);\ \n foo: map.get($foo, 100);\ \n}\n"), "div {\ \n foo: foo1 bar1;\ \n foo: foo2 bar2;\ \n foo: foo3 bar3;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_535.rs000066400000000000000000000006511474765622100246620ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_535.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_535") } #[test] fn test() { assert_eq!( runner().ok("$width: 10;\n\ \n.test {\ \n margin-left: - 54 * $width - 1;\ \n}\n"), ".test {\ \n margin-left: -541;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_548.rs000066400000000000000000000020131474765622100246600ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_548.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_548") } #[test] fn test() { assert_eq!( runner().ok( ".parent-sel-value {\ \n font-family: &;\ \n .parent-sel-interpolation {\ \n font-family: #{&};\ \n .parent-sel-value-concat {\ \n font-family: \"Current parent: \" + &;\ \n }\ \n }\ \n}\n" ), ".parent-sel-value {\ \n font-family: .parent-sel-value;\ \n}\ \n.parent-sel-value .parent-sel-interpolation {\ \n font-family: .parent-sel-value .parent-sel-interpolation;\ \n}\ \n.parent-sel-value .parent-sel-interpolation .parent-sel-value-concat {\ \n font-family: \"Current parent: .parent-sel-value .parent-sel-interpolation .parent-sel-value-concat\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_549.rs000066400000000000000000000007101474765622100246630ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_549.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_549") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok("$value: 10;\n\ \nfoo {\ \n filter: foo(opacity=$value*100);\ \n}\n"), "foo {\ \n filter: foo(opacity=1000);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_550/000077500000000000000000000000001474765622100243075ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_550/literal/000077500000000000000000000000001474765622100257435ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_550/literal/dimension.rs000066400000000000000000000021401474765622100302730ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_550/literal/dimension.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("dimension") } #[test] fn test() { assert_eq!( runner().ok("#foo {\ \n i: 10.0001px;\ \n j: 10.01px;\ \n k: -10.0001px;\ \n l: -10.01px; }\n\ \n#foo {\ \n i: 0.0001px;\ \n j: 0.01px;\ \n k: -0.0001px;\ \n l: -0.01px; }\n\ \n#foo {\ \n i: .0001px;\ \n j: .01px;\ \n k: -.0001px;\ \n l: -.01px; }\n"), "#foo {\ \n i: 10.0001px;\ \n j: 10.01px;\ \n k: -10.0001px;\ \n l: -10.01px;\ \n}\ \n#foo {\ \n i: 0.0001px;\ \n j: 0.01px;\ \n k: -0.0001px;\ \n l: -0.01px;\ \n}\ \n#foo {\ \n i: 0.0001px;\ \n j: 0.01px;\ \n k: -0.0001px;\ \n l: -0.01px;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_550/literal/mod.rs000066400000000000000000000003411474765622100270660ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_550/literal" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("literal") } mod dimension; mod number; mod percent; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_550/literal/number.rs000066400000000000000000000020521474765622100276000ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_550/literal/number.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("number") } #[test] fn test() { assert_eq!( runner().ok("#foo {\ \n a: 10.0001;\ \n b: 10.01;\ \n c: -10.0001;\ \n d: -10.01; }\n\ \n#foo {\ \n a: 0.0001;\ \n b: 0.01;\ \n c: -0.0001;\ \n d: -0.01; }\n\ \n#foo {\ \n a: .0001;\ \n b: .01;\ \n c: -.0001;\ \n d: -.01; }\n"), "#foo {\ \n a: 10.0001;\ \n b: 10.01;\ \n c: -10.0001;\ \n d: -10.01;\ \n}\ \n#foo {\ \n a: 0.0001;\ \n b: 0.01;\ \n c: -0.0001;\ \n d: -0.01;\ \n}\ \n#foo {\ \n a: 0.0001;\ \n b: 0.01;\ \n c: -0.0001;\ \n d: -0.01;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_550/literal/percent.rs000066400000000000000000000021041474765622100277460ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_550/literal/percent.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("percent") } #[test] fn test() { assert_eq!( runner().ok("#foo {\ \n e: 10.0001%;\ \n f: 10.01%;\ \n g: -10.0001%;\ \n h: -10.01%; }\n\ \n#foo {\ \n e: 0.0001%;\ \n f: 0.01%;\ \n g: -0.0001%;\ \n h: -0.01%; }\n\ \n#foo {\ \n e: .0001%;\ \n f: .01%;\ \n g: -.0001%;\ \n h: -.01%; }\n"), "#foo {\ \n e: 10.0001%;\ \n f: 10.01%;\ \n g: -10.0001%;\ \n h: -10.01%;\ \n}\ \n#foo {\ \n e: 0.0001%;\ \n f: 0.01%;\ \n g: -0.0001%;\ \n h: -0.01%;\ \n}\ \n#foo {\ \n e: 0.0001%;\ \n f: 0.01%;\ \n g: -0.0001%;\ \n h: -0.01%;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_550/mod.rs000066400000000000000000000003341474765622100254340ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_550" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_550") } mod literal; mod operator; mod variable; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_550/operator.rs000066400000000000000000000013121474765622100265050ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_550/operator.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("operator") } #[test] fn test() { assert_eq!( runner().ok("$x: .03;\ \n$y: 0.7;\n\ \n#foo {\ \n color: saturate($x);\ \n color: saturate($y);\ \n -webkit-filter: grayscale(.03);\ \n -webkit-filter: grayscale(0.7);\ \n}\n"), "#foo {\ \n color: saturate(0.03);\ \n color: saturate(0.7);\ \n -webkit-filter: grayscale(0.03);\ \n -webkit-filter: grayscale(0.7);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_550/variable/000077500000000000000000000000001474765622100260745ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_550/variable/dimension.rs000066400000000000000000000026411474765622100304320ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_550/variable/dimension.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("dimension") } #[test] fn test() { assert_eq!( runner().ok("$i1: 10.0001px;\ \n$j1: 10.01px;\ \n$k1: -10.0001px;\ \n$l1: -10.01px;\n\ \n#foo {\ \n i: $i1;\ \n j: $j1;\ \n k: $k1;\ \n l: $l1; }\n\ \n$i2: 0.0001px;\ \n$j2: 0.01px;\ \n$k2: -0.0001px;\ \n$l2: -0.01px;\n\ \n#foo {\ \n i: $i2;\ \n j: $j2;\ \n k: $k2;\ \n l: $l2; }\n\ \n$i3: .0001px;\ \n$j3: .01px;\ \n$k3: -.0001px;\ \n$l3: -.01px;\n\ \n#foo {\ \n i: $i3;\ \n j: $j3;\ \n k: $k3;\ \n l: $l3; }\n\n"), "#foo {\ \n i: 10.0001px;\ \n j: 10.01px;\ \n k: -10.0001px;\ \n l: -10.01px;\ \n}\ \n#foo {\ \n i: 0.0001px;\ \n j: 0.01px;\ \n k: -0.0001px;\ \n l: -0.01px;\ \n}\ \n#foo {\ \n i: 0.0001px;\ \n j: 0.01px;\ \n k: -0.0001px;\ \n l: -0.01px;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_550/variable/mod.rs000066400000000000000000000003431474765622100272210ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_550/variable" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("variable") } mod dimension; mod number; mod percent; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_550/variable/number.rs000066400000000000000000000025531474765622100277370ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_550/variable/number.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("number") } #[test] fn test() { assert_eq!( runner().ok("$a1: 10.0001;\ \n$b1: 10.01;\ \n$c1: -10.0001;\ \n$d1: -10.01;\n\ \n#foo {\ \n a: $a1;\ \n b: $b1;\ \n c: $c1;\ \n d: $d1; }\n\ \n$a2: 0.0001;\ \n$b2: 0.01;\ \n$c2: -0.0001;\ \n$d2: -0.01;\n\ \n#foo {\ \n a: $a2;\ \n b: $b2;\ \n c: $c2;\ \n d: $d2; }\n\ \n$a3: .0001;\ \n$b3: .01;\ \n$c3: -.0001;\ \n$d3: -.01;\n\ \n#foo {\ \n a: $a3;\ \n b: $b3;\ \n c: $c3;\ \n d: $d3; }\n\n"), "#foo {\ \n a: 10.0001;\ \n b: 10.01;\ \n c: -10.0001;\ \n d: -10.01;\ \n}\ \n#foo {\ \n a: 0.0001;\ \n b: 0.01;\ \n c: -0.0001;\ \n d: -0.01;\ \n}\ \n#foo {\ \n a: 0.0001;\ \n b: 0.01;\ \n c: -0.0001;\ \n d: -0.01;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_550/variable/percent.rs000066400000000000000000000026031474765622100301030ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_550/variable/percent.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("percent") } #[test] fn test() { assert_eq!( runner().ok("$e1: 10.0001%;\ \n$f1: 10.01%;\ \n$g1: -10.0001%;\ \n$h1: -10.01%;\n\ \n#foo {\ \n e: $e1;\ \n f: $f1;\ \n g: $g1;\ \n h: $h1; }\ \n$e2: 0.0001%;\ \n$f2: 0.01%;\ \n$g2: -0.0001%;\ \n$h2: -0.01%;\n\ \n#foo {\ \n e: $e2;\ \n f: $f2;\ \n g: $g2;\ \n h: $h2; }\n\ \n$e3: .0001%;\ \n$f3: .01%;\ \n$g3: -.0001%;\ \n$h3: -.01%;\n\ \n#foo {\ \n e: $e3;\ \n f: $f3;\ \n g: $g3;\ \n h: $h3; }\n\n"), "#foo {\ \n e: 10.0001%;\ \n f: 10.01%;\ \n g: -10.0001%;\ \n h: -10.01%;\ \n}\ \n#foo {\ \n e: 0.0001%;\ \n f: 0.01%;\ \n g: -0.0001%;\ \n h: -0.01%;\ \n}\ \n#foo {\ \n e: 0.0001%;\ \n f: 0.01%;\ \n g: -0.0001%;\ \n h: -0.01%;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_552.rs000066400000000000000000000012001474765622100246500ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_552.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_552") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok("a,\ \ndiv {\ \n top: 0;\ \n}\n\ \n.a,\ \n.b {\ \n &.c {\ \n color: red;\ \n }\ \n}\n"), "a,\ \ndiv {\ \n top: 0;\ \n}\ \n.a.c,\ \n.b.c {\ \n color: red;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_553.rs000066400000000000000000000012721474765622100246620ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_553.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_553") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok("$foo\\bar: 1;\n\ \n@function foo\\func() { @return 1; }\ \n@mixin foo\\mixin() { mixin-value: 1; }\n\ \n.test {\ \n var-value: $foo\\bar;\ \n func-value: foo\\func();\ \n @include foo\\mixin();\ \n}\n"), ".test {\ \n var-value: 1;\ \n func-value: 1;\ \n mixin-value: 1;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_555.rs000066400000000000000000000016401474765622100246630ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_555.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_555") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok("@use \"sass:map\";\n\ \n@function hello($name) {\ \n @return $name;\ \n}\n\ \n$foo: (\ \n bar() : baz,\ \n bar(\"foo\") : blah,\ \n hello(\"bob\") : bam,\ \n);\n\ \na {\ \n foo: map.get($foo, \"bar()\");\ \n foo: map.get($foo, \"bar(\\\"foo\\\")\");\ \n foo: map.get($foo, \'bar(\"foo\")\');\ \n foo: map.get($foo, \"bob\");\ \n}\n"), "a {\ \n foo: baz;\ \n foo: blah;\ \n foo: blah;\ \n foo: bam;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_556.rs000066400000000000000000000011361474765622100246640ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_556.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_556") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok("$test: (\ \n one: 1,\ \n two: 2,\ \n);\n\ \n$expect: (\ \n two: 2,\ \n one: 1,\ \n);\n\ \n.test {\ \n equal: $test == $expect;\ \n}\n"), ".test {\ \n equal: true;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_557.rs000066400000000000000000000006461474765622100246720ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_557.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_557") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:map\";\n\ \na {\ \n foo: map.get((foo: 1, bar: 2), \"bar\");\ \n}\n"), "a {\ \n foo: 2;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_558.rs000066400000000000000000000012431474765622100246650ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_558.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_558") } #[test] fn test() { assert_eq!( runner().ok("@function is_gold($c) {\r\ \n @if ($c == gold) {\r\ \n @return \'yes\';\r\ \n }\r\ \n @return \'no\';\r\ \n}\r\ \n\r\ \ndiv {\r\ \n foo: is_gold(gold);\r\ \n bar: is_gold(white);\r\ \n}"), "div {\ \n foo: \"yes\";\ \n bar: \"no\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_56.rs000066400000000000000000000007641474765622100246050ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_56.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_56") } #[test] fn test() { assert_eq!( runner().ok("@media (min-width: 980px) {\r\ \n a {\r\ \n color: red;\r\ \n }\r\ \n}"), "@media (min-width: 980px) {\ \n a {\ \n color: red;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_574.rs000066400000000000000000000011061474765622100246610ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_574.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_574") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:map\";\ \n$flow: left;\n\ \n$map: (\ \n margin-#{$flow}: 3em,\ \n foo: bar,\ \n);\n\ \n.test {\ \n margin-left: map.get($map, margin-left);\ \n}\n"), ".test {\ \n margin-left: 3em;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_575.rs000066400000000000000000000006631474765622100246710ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_575.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_575") } #[test] fn test() { assert_eq!( runner().ok(".test {\ \n @if (foo: bar) == (foo: bar) {\ \n foo: bar;\ \n }\ \n}\n"), ".test {\ \n foo: bar;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_577.rs000066400000000000000000000013161474765622100246670ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_577.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_577") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:list\";\ \n@function map-each($map) {\ \n $values: ();\n\ \n @each $key, $value in $map {\ \n $values: list.append($values, $value);\ \n }\n\ \n @return $values;\ \n}\n\ \n$map: (foo: bar);\n\ \n.test {\ \n -map-test: map-each($map);\ \n}\n"), ".test {\ \n -map-test: bar;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_578.rs000066400000000000000000000012661474765622100246740ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_578.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_578") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:list\";\ \n$list: one foo three bar six seven;\ \n$pos: list.set-nth($list, 2, two);\ \n$neg: list.set-nth($pos, -3, four five);\n\ \n.test {\ \n -positive: $pos;\ \n -negative: $neg;\ \n}\n"), ".test {\ \n -positive: one two three bar six seven;\ \n -negative: one two three four five six seven;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_579.rs000066400000000000000000000012011474765622100246620ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_579.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_579") } #[test] fn test() { assert_eq!( runner().ok("$map: (\ \n foo: fump,\ \n bar: bump,\ \n);\n\ \n@mixin vararg-test($foo, $bar) {\ \n foo: $foo;\ \n bar: $bar;\ \n}\n\ \n.test {\ \n @include vararg-test($map...);\ \n}\n"), ".test {\ \n foo: fump;\ \n bar: bump;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_58.rs000066400000000000000000000006541474765622100246050ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_58.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_58") } #[test] fn test() { assert_eq!( runner().ok("test {\r\ \n background: url(/static_loc/img/beta.png);\r\ \n}"), "test {\ \n background: url(/static_loc/img/beta.png);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_59.rs000066400000000000000000000012001474765622100245720ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_59.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_59") } #[test] fn test() { assert_eq!( runner().ok("@mixin apply-to-ie6-only {\r\ \n * html {\r\ \n @content;\r\ \n }\r\ \n}\r\ \n@include apply-to-ie6-only {\r\ \n #logo {\r\ \n background-image: url(/logo.gif);\r\ \n }\r\ \n}"), "* html #logo {\ \n background-image: url(/logo.gif);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_590.rs000066400000000000000000000011141474765622100246560ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_590.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_590") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n foo: 1/2;\ \n foo: 0.5;\ \n foo: (1/2);\ \n foo: 1/2 == 0.5;\ \n foo: (1/2) == 0.5;\ \n}\n"), "foo {\ \n foo: 1/2;\ \n foo: 0.5;\ \n foo: 0.5;\ \n foo: true;\ \n foo: true;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_592.rs000066400000000000000000000012511474765622100246620ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_592.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_592") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%a::-webkit-scrollbar {\ \n color: green;\ \n}\n\ \n.a {\ \n .b {\ \n @extend %a;\ \n }\n\ \n .c .b {\ \n @extend %a;\ \n }\ \n}\n"), ".a .c .b::-webkit-scrollbar, .a .b::-webkit-scrollbar {\ \n color: green;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_593.rs000066400000000000000000000011571474765622100246700ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_593.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_593") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok("h1:nth-of-type(#{2 + \'n + 1\'}) {\ \n color: red;\ \n}\n\ \nh1:nth-of-type(#{2 + \'n + 1\'}) {\ \n color: red;\ \n}\n"), "h1:nth-of-type(2n + 1) {\ \n color: red;\ \n}\ \nh1:nth-of-type(2n + 1) {\ \n color: red;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_595.rs000066400000000000000000000005531474765622100246710ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_595.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_595") } #[test] fn test() { assert_eq!( runner().ok("a {\ \n color: red;\ \n};\n"), "a {\ \n color: red;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_6.rs000066400000000000000000000012201474765622100245040ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_6.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_6") } #[test] fn test() { assert_eq!( runner().ok("*[class|=\"has-background\"] {\r\ \n background: #efefef;\r\ \n padding: 7px;\r\ \n border: 1px solid #888;\r\ \n margin-bottom: 5px;\r\ \n }"), "*[class|=has-background] {\ \n background: #efefef;\ \n padding: 7px;\ \n border: 1px solid #888;\ \n margin-bottom: 5px;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_602.rs000066400000000000000000000017231474765622100246560ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_602.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_602") } #[test] fn test() { assert_eq!( runner().ok("#foo.\\bar {\ \n color: red;\ \n}\n\ \n#foo.b\\ar {\ \n color: red;\ \n}\n\ \n#foo\\.bar {\ \n color: red;\ \n}\n\ \n#foo\\bar {\ \n color: red;\ \n}\n\ \n#fo\\o.bar {\ \n color: red;\ \n}\n"), "@charset \"UTF-8\";\ \n#foo.ºr {\ \n color: red;\ \n}\ \n#foo.b\\a r {\ \n color: red;\ \n}\ \n#foo\\.bar {\ \n color: red;\ \n}\ \n#fooºr {\ \n color: red;\ \n}\ \n#foo.bar {\ \n color: red;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_610.rs000066400000000000000000000045541474765622100246620ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_610.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_610") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok( "@mixin vararg-test($a, $b, $c, $d) {\ \n a: $a;\ \n b: $b;\ \n c: $c;\ \n d: $d;\ \n}\n\ \nfoo {\ \n @include vararg-test(a, b, c, d);\ \n}\n\ \nfoo {\ \n @include vararg-test(a b c d...);\ \n}\n\ \nfoo {\ \n @include vararg-test((a b c d)...);\ \n}\n\ \nfoo {\ \n @include vararg-test((a, b, c, d)...);\ \n}\n\ \nfoo {\ \n @include vararg-test((a: a, b: b, c: c, d: d)...);\ \n}\n\ \nfoo {\ \n @include vararg-test((\"a\": a, \"b\": b, \"c\": c, \"d\": d)...);\ \n}\n\ \nfoo {\ \n @include vararg-test(a b..., (c: c, d: d)...);\ \n}\n\ \nfoo {\ \n @include vararg-test(a, b c..., (d: d)...);\ \n}\n\ \nfoo {\ \n @include vararg-test($c: c, (a: a, b: b, d: d)...);\ \n}\n" ), "foo {\ \n a: a;\ \n b: b;\ \n c: c;\ \n d: d;\ \n}\ \nfoo {\ \n a: a;\ \n b: b;\ \n c: c;\ \n d: d;\ \n}\ \nfoo {\ \n a: a;\ \n b: b;\ \n c: c;\ \n d: d;\ \n}\ \nfoo {\ \n a: a;\ \n b: b;\ \n c: c;\ \n d: d;\ \n}\ \nfoo {\ \n a: a;\ \n b: b;\ \n c: c;\ \n d: d;\ \n}\ \nfoo {\ \n a: a;\ \n b: b;\ \n c: c;\ \n d: d;\ \n}\ \nfoo {\ \n a: a;\ \n b: b;\ \n c: c;\ \n d: d;\ \n}\ \nfoo {\ \n a: a;\ \n b: b;\ \n c: c;\ \n d: d;\ \n}\ \nfoo {\ \n a: a;\ \n b: b;\ \n c: c;\ \n d: d;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_613.rs000066400000000000000000000015271474765622100246620ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_613.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_613") } #[test] fn test() { assert_eq!( runner().ok("$var: 1;\n\ \n@mixin test {\ \n $var: 2;\ \n}\n\ \n@function test() {\ \n $var: 3;\ \n @return \"dummy\";\ \n}\n\ \n.selector {\ \n $var: 4;\ \n @include test;\ \n $dummy: test();\ \n content: $var;\ \n}\n\ \n.other-selector {\ \n content: $var;\ \n}\n"), ".selector {\ \n content: 4;\ \n}\ \n.other-selector {\ \n content: 1;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_615.rs000066400000000000000000000010021474765622100246500ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_615.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_615") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("$foo: \"bar\";\ \n%#{\"foo--#{$foo}\"} {\ \n foo: bar;\ \n}\n\ \na {\ \n @extend %foo--bar;\ \n}\n"), "a {\ \n foo: bar;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_622.rs000066400000000000000000000013341474765622100246560ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_622.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_622") } #[test] fn test() { assert_eq!( runner().ok("@media screen {\ \n a {\ \n color: red;\ \n }\ \n}\n\ \n.link {\ \n @media (foo: bar) {\ \n display: flex;\ \n }\ \n}\n"), "@media screen {\ \n a {\ \n color: red;\ \n }\ \n}\ \n@media (foo: bar) {\ \n .link {\ \n display: flex;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_623.rs000066400000000000000000000010431474765622100246540ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_623.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_623") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok("a {\ \n filter: alpha(opacity=.3); }\n\ \ndiv {\ \n filter: alpha(opacity=0.7); }\n"), "a {\ \n filter: alpha(opacity=0.3);\ \n}\ \ndiv {\ \n filter: alpha(opacity=0.7);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_628.rs000066400000000000000000000013751474765622100246710ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_628.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_628") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "$map: (\r\ \n alpha: 1,\r\ \n beta: 2,\r\ \n gamma: 3,\r\ \n delta: (\r\ \n eta: 5,\r\ \n eta: 6,\r\ \n ),\r\ \n);" ), "Error: Duplicate key.\ \n ,\ \n6 | eta: 5,\ \n | === first key\ \n7 | eta: 6,\ \n | ^^^ second key\ \n \'\ \n input.scss 7:5 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_63.rs000066400000000000000000000013131474765622100245720ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_63.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_63") } #[test] fn test() { assert_eq!( runner().ok("@mixin testComments {\r\ \n\t/* crash */\r\ \n\tp {\r\ \n\t\twidth: 100px;\r\ \n\t}\r\ \n}\r\ \n\r\ \n@media screen and (orientation:landscape) {\r\ \n\t@include testComments;\t\r\ \n}\r\n"), "@media screen and (orientation: landscape) {\ \n /* crash */\ \n p {\ \n width: 100px;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_639.rs000066400000000000000000000013261474765622100246670ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_639.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_639") } #[test] fn test() { assert_eq!( runner().ok("$quoted_list: \"foo\", \"bar\", \"baz\";\ \n$unquoted_list: foo, bar, baz;\n\ \nfoo {\ \n foo: #{foo, bar, baz};\ \n foo: #{\"foo\", \"bar\", \"baz\"};\ \n foo: #{$quoted_list};\ \n foo: #{$unquoted_list};\ \n}\n"), "foo {\ \n foo: foo, bar, baz;\ \n foo: foo, bar, baz;\ \n foo: foo, bar, baz;\ \n foo: foo, bar, baz;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_64.rs000066400000000000000000000006121474765622100245740ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_64.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_64") } #[test] fn test() { assert_eq!( runner().ok("$var: 10px;\r\ \np {\r\ \n\twidth: -$var;\r\ \n}"), "p {\ \n width: -10px;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_641.rs000066400000000000000000000005301474765622100246540ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_641.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_641") } #[test] fn test() { assert_eq!( runner().ok(".#{\"foo\"}--1 { width:100%; }"), ".foo--1 {\ \n width: 100%;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_643.rs000066400000000000000000000007101474765622100246560ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_643.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_643") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:list\";\ \n$map: (foo: bar, bar: baz);\n\ \nfoo {\ \n a: list.nth($map, 2);\ \n}\n"), "foo {\ \n a: bar baz;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_644.rs000066400000000000000000000006531474765622100246650ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_644.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_644") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n background-image: url(foo/#{\"bar\"}/baz.jpg);\ \n}\n"), "foo {\ \n background-image: url(foo/bar/baz.jpg);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_646.rs000066400000000000000000000007411474765622100246650ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_646.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_646") } #[test] fn test() { assert_eq!( runner().ok("@function foo() {\ \n /* $bar: 1; */\ \n @return true;\ \n}\n\ \nfoo {\ \n foo: foo();\ \n}\n"), "foo {\ \n foo: true;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_652.rs000066400000000000000000000013411474765622100246570ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_652.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_652") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:map\";\ \n$map: (\ \n purple: foo,\ \n rgba(1,2,3,1): bar,\ \n #ffffff: baz,\ \n);\n\ \na {\ \n name: map.get($map, purple) == foo;\ \n func: map.get($map, rgba(1,2,3,1)) == bar;\ \n hex: map.get($map, #ffffff) == baz;\ \n}\n"), "a {\ \n name: true;\ \n func: true;\ \n hex: true;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_659/000077500000000000000000000000001474765622100243215ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_659/issue_659.rs000066400000000000000000000011321474765622100264170ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_659/issue_659.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_659") } #[test] fn test() { assert_eq!( runner().ok("// libsass issue 659: never output empty blocks\ \n// https://github.com/sass/libsass/issues/659\n\ \n@function null() {\ \n @return null;\ \n}\n\ \n$foo: null;\n\ \n.test {\ \n out: null();\ \n out: $foo;\ \n}"), "" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_659/mod.rs000066400000000000000000000003441474765622100254470ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_659" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_659") } mod issue_659; mod sass_script; mod test_static; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_659/sass_script.rs000066400000000000000000000013351474765622100272260ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_659/sass-script.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("sass-script") } #[test] fn test() { assert_eq!( runner().ok("$foo: null;\n\ \n@mixin bar() {\ \n bar: $foo;\ \n}\n\ \n@mixin baz() {\ \n baz: $foo !important;\ \n}\n\ \nfoo {\ \n baz: $foo;\ \n}\n\ \nbar {\ \n @include bar;\ \n}\n\ \nbaz {\ \n @include baz;\ \n}\n"), "baz {\ \n baz: !important;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_659/test_static.rs000066400000000000000000000015251474765622100272200ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_659/static.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("static") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("\ \n%bam { bam: null; }\n\ \n@mixin bar() {\ \n bar: null;\ \n}\n\ \n@mixin baz() {\ \n baz: null !important;\ \n}\n\ \nfoo {\ \n foo: null;\ \n}\n\ \nbar {\ \n @include bar;\ \n}\n\ \nbaz {\ \n @include baz;\ \n}\n\ \nbam {\ \n @extend %bam;\ \n}\n"), "baz {\ \n baz: !important;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_660.rs000066400000000000000000000014451474765622100246630ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_660.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_660") } #[test] fn test() { assert_eq!( runner().ok("$foo: true;\n\ \ndiv {\ \n blah: $foo;\ \n}\n\ \ndiv {\ \n blah: not $foo;\ \n}\n\ \ndiv {\ \n blah: not ($foo);\ \n}\n\ \ndiv {\ \n blah: not (true);\ \n}\n\n"), "div {\ \n blah: true;\ \n}\ \ndiv {\ \n blah: false;\ \n}\ \ndiv {\ \n blah: false;\ \n}\ \ndiv {\ \n blah: false;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_666/000077500000000000000000000000001474765622100243175ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_666/angle.rs000066400000000000000000000024451474765622100257600ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_666/angle.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("angle") } #[test] fn test() { assert_eq!( runner().ok("test {\n\ \n num_deg: 42 + 11deg;\ \n num_grad: 42 + 11grad;\ \n num_rad: 42 + 11rad;\ \n num_turn: 42 + 11turn;\n\ \n deg_num: 11deg + 42;\ \n deg_grad: 11deg + 42grad;\ \n deg_rad: 11deg + 42rad;\ \n deg_turn: 11deg + 1turn;\n\ \n grad_num: 11grad + 1.5;\ \n grad_rad: 11grad + 42rad;\ \n grad_turn: 11grad + 0.5turn;\n\ \n rad_num: 11rad + 1.5;\ \n rad_turn: 11rad + 0.5turn;\n\ \n}\n"), "test {\ \n num_deg: 53deg;\ \n num_grad: 53grad;\ \n num_rad: 53rad;\ \n num_turn: 53turn;\ \n deg_num: 53deg;\ \n deg_grad: 48.8deg;\ \n deg_rad: 2417.4227395495deg;\ \n deg_turn: 371deg;\ \n grad_num: 12.5grad;\ \n grad_rad: 2684.8030439438grad;\ \n grad_turn: 211grad;\ \n rad_num: 12.5rad;\ \n rad_turn: 14.1415926536rad;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_666/length.rs000066400000000000000000000041011474765622100261420ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_666/length.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("length") } #[test] fn test() { assert_eq!( runner().ok("test {\n\ \n num_in: 42 + 11in;\ \n num_cm: 42 + 11cm;\ \n num_pc: 42 + 11px;\ \n num_mm: 42 + 11mm;\ \n num_pt: 42 + 11pt;\ \n num_px: 42 + 11px;\n\ \n in_num: 11in + 42;\ \n in_cm: 11in + 42cm;\ \n in_pc: 11in + 42pc;\ \n in_mm: 11in + 42mm;\ \n in_pt: 11in + 42pt;\ \n in_px: 11in + 42px;\n\ \n cm_num: 11cm + 42;\ \n cm_pc: 11cm + 42pc;\ \n cm_mm: 11cm + 42mm;\ \n cm_pt: 11cm + 42pt;\ \n cm_px: 11cm + 42px;\n\ \n pc_num: 11pc + 42;\ \n pc_mm: 11pc + 42mm;\ \n pc_pt: 11pc + 42pt;\ \n pc_px: 11pc + 42px;\n\ \n mm_num: 11mm + 42;\ \n mm_pt: 11mm + 42pt;\ \n mm_px: 11mm + 42px;\n\ \n pt_num: 11pt + 42;\ \n pt_px: 11pt + 42px;\n\ \n}\n"), "test {\ \n num_in: 53in;\ \n num_cm: 53cm;\ \n num_pc: 53px;\ \n num_mm: 53mm;\ \n num_pt: 53pt;\ \n num_px: 53px;\ \n in_num: 53in;\ \n in_cm: 27.5354330709in;\ \n in_pc: 18in;\ \n in_mm: 12.6535433071in;\ \n in_pt: 11.5833333333in;\ \n in_px: 11.4375in;\ \n cm_num: 53cm;\ \n cm_pc: 28.78cm;\ \n cm_mm: 15.2cm;\ \n cm_pt: 12.4816666667cm;\ \n cm_px: 12.11125cm;\ \n pc_num: 53pc;\ \n pc_mm: 20.9212598425pc;\ \n pc_pt: 14.5pc;\ \n pc_px: 13.625pc;\ \n mm_num: 53mm;\ \n mm_pt: 25.8166666667mm;\ \n mm_px: 22.1125mm;\ \n pt_num: 53pt;\ \n pt_px: 42.5pt;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_666/mod.rs000066400000000000000000000003111474765622100254370ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_666" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_666") } mod angle; mod length; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_67.rs000066400000000000000000000005051474765622100246000ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_67.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_67") } #[test] fn test() { assert_eq!( runner().ok("foo {bar: 70% - 40%}"), "foo {\ \n bar: 30%;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_672.rs000066400000000000000000000017731474765622100246720ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_672.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_672") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:meta\";\ \n@mixin test($arglist...) {\ \n $map: meta.keywords($arglist);\ \n answer: if($map, \"Yep\", \"Nope\");\ \n}\n\ \nwith-keyword-args{\ \n @include test($arg1: one, $arg2: two, $arg3: three);\ \n}\ \nwith-no-args {\ \n @include test();\ \n}\ \nwithout-keyword-args {\ \n @include test(not-a-keyword-arg-1 , not-a-keyword-arg-2);\ \n}\n"), "with-keyword-args {\ \n answer: \"Yep\";\ \n}\ \nwith-no-args {\ \n answer: \"Yep\";\ \n}\ \nwithout-keyword-args {\ \n answer: \"Yep\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_673.rs000066400000000000000000000017701474765622100246700ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_673.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_673") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( ".example {\ \n padding-left: 2rem;\ \n padding-right: 2rem;\ \n}\ \n@media screen and (min-width:768px) {\n\ \n #footer {\ \n .row {\ \n @extend .example;\ \n }\ \n }\n\ \n}" ), "Error: From line 1, column 1 of input.scss: \ \n ,\ \n1 | .example {\ \n | ^^^^^^^^^\ \n \'\ \nYou may not @extend selectors across media queries.\ \n ,\ \n9 | @extend .example;\ \n | ^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 9:13 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_674.rs000066400000000000000000000027771474765622100247010ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_674.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_674") } #[test] fn test() { assert_eq!( runner().err( "\ \n$base-path:\'../images/\';\ \n$base-attr:\'data-\';\n\ \n@function url($src, $path:\'\'){\ \n @return unquote(\'url(\'+$base-path + $path+ $src +\')\');\ \n}\ \n@function url2($src, $path:\'\'){\ \n @return unquote(\'url(\'+ $base-path + $path+ $src +\')\');\ \n}\ \n@function attr($arg1, $arg2:\'\'){\ \n @return unquote(\'attr(\'+$base-attr + $arg1 + $arg2 +\')\');\ \n}\n\ \ndiv {\ \n background: url(\'image.png\');\ \n background: url(\'image.png\',\'img/\');\ \n background: url2(\'image.png\',\'img/\');\n\ \n &:after {\ \n content: attr(value);\ \n content: attr(value, -extra);\ \n content: url(\'icon.png\');\ \n content: url(\'icon.png\',\'gfx/\');\ \n content: url2(\'icon.png\',\'gfx/\');\ \n }\ \n}\n" ), "Error: Invalid function name.\ \n ,\ \n5 | @function url($src, $path:\'\'){\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 5:1 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_683.rs000066400000000000000000000011201474765622100246560ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_683.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_683") } #[test] fn test() { assert_eq!( runner().ok( "foo {\ \n filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\"data:image/png;base64,ABCD\",sizingMethod=crop);\ \n}\n" ), "foo {\ \n filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\"data:image/png;base64,ABCD\",sizingMethod=crop);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_688.rs000066400000000000000000000065561474765622100247050ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_688.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_688") } #[test] fn test() { assert_eq!( runner().ok("test {\ \n /* Convert to px */\ \n px-to-px: 0px + 1px;\ \n pt-to-px: 0px + 1pt;\ \n pc-to-px: 0px + 1pc;\ \n in-to-px: 0px + 1in;\ \n mm-to-px: 0px + 1mm;\ \n cm-to-px: 0px + 1cm;\ \n /* Convert to pt */\ \n px-to-pt: 0pt + 1px;\ \n pt-to-pt: 0pt + 1pt;\ \n pc-to-pt: 0pt + 1pc;\ \n in-to-pt: 0pt + 1in;\ \n mm-to-pt: 0pt + 1mm;\ \n cm-to-pt: 0pt + 1cm;\ \n /* Convert to pc */\ \n px-to-pc: 0pc + 1px;\ \n pt-to-pc: 0pc + 1pt;\ \n pc-to-pc: 0pc + 1pc;\ \n in-to-pc: 0pc + 1in;\ \n mm-to-pc: 0pc + 1mm;\ \n cm-to-pc: 0pc + 1cm;\ \n /* Convert to in */\ \n px-to-in: 0in + 1px;\ \n pt-to-in: 0in + 1pt;\ \n pc-to-in: 0in + 1pc;\ \n in-to-in: 0in + 1in;\ \n mm-to-in: 0in + 1mm;\ \n cm-to-in: 0in + 1cm;\ \n /* Convert to mm */\ \n px-to-mm: 0mm + 1px;\ \n pt-to-mm: 0mm + 1pt;\ \n pc-to-mm: 0mm + 1pc;\ \n in-to-mm: 0mm + 1in;\ \n mm-to-mm: 0mm + 1mm;\ \n cm-to-mm: 0mm + 1cm; \ \n /* Convert to cm */\ \n px-to-cm: 0cm + 1px;\ \n pt-to-cm: 0cm + 1pt;\ \n pc-to-cm: 0cm + 1pc;\ \n in-to-cm: 0cm + 1in;\ \n mm-to-cm: 0cm + 1mm;\ \n cm-to-cm: 0cm + 1cm; \ \n}\n"), "test {\ \n /* Convert to px */\ \n px-to-px: 1px;\ \n pt-to-px: 1.3333333333px;\ \n pc-to-px: 16px;\ \n in-to-px: 96px;\ \n mm-to-px: 3.7795275591px;\ \n cm-to-px: 37.7952755906px;\ \n /* Convert to pt */\ \n px-to-pt: 0.75pt;\ \n pt-to-pt: 1pt;\ \n pc-to-pt: 12pt;\ \n in-to-pt: 72pt;\ \n mm-to-pt: 2.8346456693pt;\ \n cm-to-pt: 28.3464566929pt;\ \n /* Convert to pc */\ \n px-to-pc: 0.0625pc;\ \n pt-to-pc: 0.0833333333pc;\ \n pc-to-pc: 1pc;\ \n in-to-pc: 6pc;\ \n mm-to-pc: 0.2362204724pc;\ \n cm-to-pc: 2.3622047244pc;\ \n /* Convert to in */\ \n px-to-in: 0.0104166667in;\ \n pt-to-in: 0.0138888889in;\ \n pc-to-in: 0.1666666667in;\ \n in-to-in: 1in;\ \n mm-to-in: 0.0393700787in;\ \n cm-to-in: 0.3937007874in;\ \n /* Convert to mm */\ \n px-to-mm: 0.2645833333mm;\ \n pt-to-mm: 0.3527777778mm;\ \n pc-to-mm: 4.2333333333mm;\ \n in-to-mm: 25.4mm;\ \n mm-to-mm: 1mm;\ \n cm-to-mm: 10mm;\ \n /* Convert to cm */\ \n px-to-cm: 0.0264583333cm;\ \n pt-to-cm: 0.0352777778cm;\ \n pc-to-cm: 0.4233333333cm;\ \n in-to-cm: 2.54cm;\ \n mm-to-cm: 0.1cm;\ \n cm-to-cm: 1cm;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_690.rs000066400000000000000000000010021474765622100246530ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_690.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_690") } #[test] fn test() { assert_eq!( runner().ok("test {\ \n left: expression(callSomeFunc());\ \n content: expression(\"Smile :-)\");\ \n}\n"), "test {\ \n left: expression(callSomeFunc());\ \n content: expression(\"Smile :-)\");\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_694.rs000066400000000000000000000015031474765622100246650ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_694.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_694") } #[test] fn test() { assert_eq!( runner().ok("// test for libsass 694:\ \n// parser should be smarter about handling quoted quotes\n\ \n$str: \'{\' + \'\"foo\": \"bar\"\' + \'}\';\ \n$str2: \'\"hello world\"\';\ \n$str3: \"hello world\";\ \n.interpolation-test {\ \n test: \"#{$str}\";\ \n test: \"#{$str2}\";\ \n test: \"#{$str3}\";\ \n}\n"), ".interpolation-test {\ \n test: \'{\"foo\": \"bar\"}\';\ \n test: \'\"hello world\"\';\ \n test: \"hello world\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_699.rs000066400000000000000000000006671474765622100247040ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_699.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_699") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:color\";\ \n.selector {\ \n color: color.invert(rebeccapurple);\ \n}"), ".selector {\ \n color: #99cc66;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_700.rs000066400000000000000000000007041474765622100246530ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_700.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_700") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:color\";\ \n.selector {\ \n color: color.invert(transparent);\ \n}"), ".selector {\ \n color: rgba(255, 255, 255, 0);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_701.rs000066400000000000000000000022331474765622100246530ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_701.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_701") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:meta\";\n\ \n.test-1 {\ \n content: null;\ \n content: meta.inspect(null);\ \n content: meta.inspect(false);\ \n content: meta.inspect(true);\ \n content: meta.inspect(42);\ \n content: meta.inspect(42.3);\ \n content: meta.inspect(42px);\ \n content: meta.inspect(\"string\");\ \n $list: 1, 2, 3;\ \n content: meta.inspect($list);\ \n $map: ( a: 1, b: 2, c: 3 );\ \n content: meta.inspect($map);\ \n}\n"), ".test-1 {\ \n content: null;\ \n content: false;\ \n content: true;\ \n content: 42;\ \n content: 42.3;\ \n content: 42px;\ \n content: \"string\";\ \n content: 1, 2, 3;\ \n content: (a: 1, b: 2, c: 3);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_702.rs000066400000000000000000000010231474765622100246500ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_702.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_702") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:meta\";\ \n.foo {\ \n content: meta.function-exists(\"feature-exists\");\ \n content: meta.feature-exists(\"foo\");\ \n}\n"), ".foo {\ \n content: true;\ \n content: false;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_703.rs000066400000000000000000000022641474765622100246610ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_703.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_703") } #[test] fn test() { assert_eq!( runner().ok(".test-1 {\ \n @for $i from 1 through 3 {\ \n content: $i;\ \n }\ \n}\n\ \n.test-2 {\ \n @for $i from 3 through 1 {\ \n content: $i;\ \n }\ \n}\n\ \n.test-3 {\ \n @for $i from 1 to 3 {\ \n content: $i;\ \n }\ \n}\n\ \n.test-4 {\ \n @for $i from 3 to 1 {\ \n content: $i;\ \n }\ \n}\n"), ".test-1 {\ \n content: 1;\ \n content: 2;\ \n content: 3;\ \n}\ \n.test-2 {\ \n content: 3;\ \n content: 2;\ \n content: 1;\ \n}\ \n.test-3 {\ \n content: 1;\ \n content: 2;\ \n}\ \n.test-4 {\ \n content: 3;\ \n content: 2;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_708.rs000066400000000000000000000016001474765622100246570ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_708.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_708") } #[test] fn test() { assert_eq!( runner().ok("@function foobar($x, $y, $z : 3) {\ \n @return $x + $y * 2 + $z\ \n}\n\ \n.foobar {\ \n content: foobar($y:2, $x:4);\ \n content: foobar($y: 2, $x: 4);\ \n content: foobar($y : 2, $x : 4);\ \n content: foobar($y:2px, $x:4);\ \n content: foobar($y: 2px, $x: 4);\ \n content: foobar($y : 2px, $x : 4);\ \n}"), ".foobar {\ \n content: 11;\ \n content: 11;\ \n content: 11;\ \n content: 11px;\ \n content: 11px;\ \n content: 11px;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_712.rs000066400000000000000000000015031474765622100246540ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_712.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_712") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( ".foo {\ \n content: \'foo\';\ \n}\n\ \n@media print {\ \n .bar {\ \n @extend .foo;\ \n }\ \n}\n" ), "Error: From line 1, column 1 of input.scss: \ \n ,\ \n1 | .foo {\ \n | ^^^^^\ \n \'\ \nYou may not @extend selectors across media queries.\ \n ,\ \n7 | @extend .foo;\ \n | ^^^^^^^^^^^^\ \n \'\ \n input.scss 7:5 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_713/000077500000000000000000000000001474765622100243105ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_713/and.rs000066400000000000000000000011661474765622100254240ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_713/and.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("and") } #[test] #[ignore] // missing error fn test() { assert_eq!( runner().err( "@function and() {\ \n @return \"and\";\ \n}\n\ \ntest {\ \n and: and();\ \n}\n" ), "Error: Invalid function name.\ \n ,\ \n1 | @function and() {\ \n | ^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:1 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_713/mod.rs000066400000000000000000000003151474765622100254340ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_713" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_713") } mod and; mod not; mod or; rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_713/not.rs000066400000000000000000000011661474765622100254620ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_713/not.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("not") } #[test] #[ignore] // missing error fn test() { assert_eq!( runner().err( "@function not() {\ \n @return \"not\";\ \n}\n\ \ntest {\ \n not: not();\ \n}\n" ), "Error: Invalid function name.\ \n ,\ \n1 | @function not() {\ \n | ^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:1 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_713/or.rs000066400000000000000000000011561474765622100253010ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_713/or.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("or") } #[test] #[ignore] // missing error fn test() { assert_eq!( runner().err( "@function or() {\ \n @return \"or\";\ \n}\n\ \ntest {\ \n or: or();\ \n}\n" ), "Error: Invalid function name.\ \n ,\ \n1 | @function or() {\ \n | ^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:1 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_72.rs000066400000000000000000000014621474765622100245770ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_72.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_72") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok( "test {\r\ \n filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=\'#223344\', endColorstr=\'#112233\',GradientType=0 );\r\ \n}\r\ \n\r\ \n@mixin opacity($opacity) {\r\ \n opacity: $opacity / 100;\r\ \n filter: alpha(opacity=$opacity);\r\ \n}" ), "test {\ \n filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=\"#223344\", endColorstr=\"#112233\",GradientType=0 );\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_73.rs000066400000000000000000000007131474765622100245760ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_73.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_73") } #[test] fn test() { assert_eq!( runner().ok("@mixin box-shadow($shadow...) { \r\ \n -webkit-box-shadow: $shadow;\r\ \n -moz-box-shadow: $shadow;\r\ \n box-shadow: $shadow;\r\ \n}"), "" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_733.rs000066400000000000000000000011401474765622100246540ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_733.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_733") } #[test] fn test() { assert_eq!( runner().ok("@function getter() {\ \n @return 42px;\ \n}\n\ \ntest {\ \n content: getter()-1;\ \n content: getter()- 1;\ \n content: getter() -1;\ \n}\n"), "test {\ \n content: 41px;\ \n content: 41px;\ \n content: 42px -1;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_736.rs000066400000000000000000000017761474765622100246760ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_736.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_736") } #[test] fn test() { assert_eq!( runner().ok( "// libsass issue 736: @return does not cause function exit\ \n// https://github.com/sass/libsass/issues/736\n\ \n@function contains-true($list) {\ \n @each $bool in $list {\ \n @if $bool {\ \n @return \"found true\";\ \n }\ \n }\ \n @return \"nothing found\";\ \n}\n\ \n.test {\ \n out: contains-true(true false false);\ \n out: contains-true(false true false);\ \n out: contains-true(false false true);\ \n}\n" ), ".test {\ \n out: \"found true\";\ \n out: \"found true\";\ \n out: \"found true\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_738.rs000066400000000000000000000007521474765622100246710ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_738.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_738") } #[test] fn test() { assert_eq!( runner().ok(".foo {\ \n &--bar { color: red; }\ \n &--1bar { color: blue;}\ \n}\n"), ".foo--bar {\ \n color: red;\ \n}\ \n.foo--1bar {\ \n color: blue;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_740.rs000066400000000000000000000010441474765622100246550ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_740.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_740") } #[test] fn test() { assert_eq!( runner().ok("$foo: null;\ \n$foo: #fff !default;\ \n$bar: #000;\ \n$bar: #f00 !default;\n\ \nfoo {\ \n foo: $foo;\ \n bar: $bar;\ \n}\n"), "foo {\ \n foo: #fff;\ \n bar: #000;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_748.rs000066400000000000000000000027071474765622100246740ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_748.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_748") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok( "// problem: not expression is currently returning false on values other than true, false or null\n\ \n@function truthyfalsey($bool: null) {\ \n @if not $bool {\ \n @return falsey;\ \n } @else {\ \n @return truthy;\ \n }\ \n}\n\ \n.test {\ \n debug: truthyfalsey(true); // expect truthy\ \n debug: truthyfalsey(false); // expect falsey\ \n debug: truthyfalsey(); // expect falsey (default arg is null)\ \n debug: truthyfalsey(5); // expect truthy\ \n debug: truthyfalsey(string); // expect truthy\ \n debug: truthyfalsey((alpha: 1, bravo: 2)); // expect truthy\ \n debug: truthyfalsey(this is a list); // expect truthy\ \n debug: truthyfalsey(\'true\'); // expect truthy\ \n}\n" ), ".test {\ \n debug: truthy;\ \n debug: falsey;\ \n debug: falsey;\ \n debug: truthy;\ \n debug: truthy;\ \n debug: truthy;\ \n debug: truthy;\ \n debug: truthy;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_759.rs000066400000000000000000000015431474765622100246730ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_759.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_759") } #[test] fn test() { assert_eq!( runner().ok("$a: 10px !global !default;\ \n$b: 20px !default !global;\ \n$c: 30px !default !default !default !global !global !global;\ \n$d: 40px !global !global !global !default !default !default;\ \n$e: 50px !global !default !global !default !global !default;\n\ \nfoo {\ \n a: $a;\ \n b: $b;\ \n c: $c;\ \n d: $d;\ \n e: $e;\ \n}\n"), "foo {\ \n a: 10px;\ \n b: 20px;\ \n c: 30px;\ \n d: 40px;\ \n e: 50px;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_760.rs000066400000000000000000000007441474765622100246650ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_760.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_760") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:string\";\ \nfoo {\ \n quoted: string.slice(\"abcd\", 1, 0);\ \n unquoted: string.slice(abcd, 1, 0);\ \n}\n"), "foo {\ \n quoted: \"\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_763.rs000066400000000000000000000016051474765622100246650ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_763.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_763") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:string\";\ \nfoo {\ \n a: string.slice(\"abcd\", 1, 1);\ \n b: string.slice(\'abcd\', 1, 1);\ \n c: string.slice(abcd, 1, 1);\n\ \n d: string.insert(\"abcd\", \"X\", 1);\ \n e: string.insert(\"abcd\", \'X\', 1);\ \n f: string.insert(\'abcd\', \"X\", 1);\ \n g: string.insert(\'abcd\', \'X\', 1);\ \n}\n"), "foo {\ \n a: \"a\";\ \n b: \"a\";\ \n c: a;\ \n d: \"Xabcd\";\ \n e: \"Xabcd\";\ \n f: \"Xabcd\";\ \n g: \"Xabcd\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_77.rs000066400000000000000000000010251474765622100245770ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_77.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_77") } #[test] fn test() { assert_eq!( runner().ok("@mixin m {\r\ \n .m {\r\ \n color: red;\r\ \n @content;\r\ \n }\r\ \n}\r\ \ndiv.a {\r\ \n @include m;\r\ \n}"), "div.a .m {\ \n color: red;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_783.rs000066400000000000000000000124551474765622100246740ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_783.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_783") } #[test] fn test() { assert_eq!( runner().ok( "// $a: 12px / 1em;\ \n// $b: 6px / 1em;\ \n// $c: 10em;\ \n// $x: -9999em;\ \n// $aa: 1px * 1px;\n\ \na {\ \n $foo: 2em;\ \n $bar: 2em;\n\ \n foo: $foo; // 2em ✔\ \n bar: $bar; // 2em ✔\ \n // a: $foo * $bar; // 4em*em isn\'t a valid CSS value. ✔\ \n a: $foo / $bar; // 1 ✔\ \n a: $foo + $bar; // 4em ✔\ \n a: $foo - $bar; // 0em ✔\n\n\ \n $foo: 2px;\ \n $bar: 2em;\n\ \n foo: $foo; // 2px ✔\ \n bar: $bar; // 2em ✔\ \n // a: $foo * $bar; // 4em*px isn\'t a valid CSS value. ✔\ \n // a: $foo / $bar; // 1px/em isn\'t a valid CSS value. ✔\ \n // a: $foo + $bar; // Incompatible units: \'em\' and \'px\'. ✔\ \n // a: $foo - $bar; // Incompatible units: \'em\' and \'px\'. ✔\n\n\ \n $foo: 2em;\ \n $bar: 2px;\n\ \n foo: $foo; // 2em ✔\ \n bar: $bar; // 2px ✔\ \n // a: $foo * $bar; // 4em*px isn\'t a valid CSS value. ✔\ \n // a: $foo / $bar; // 1em/px isn\'t a valid CSS value. ✔\ \n // a: $foo + $bar; // Incompatible units: \'px\' and \'em\'. ✔\ \n // a: $foo - $bar; // Incompatible units: \'px\' and \'em\'. ✔\n\n\ \n $foo: 2px / 2em;\ \n $bar: 2px;\n\ \n // foo: $foo; // 1px/em isn\'t a valid CSS value. ✔\ \n bar: $bar; // 2px ✔\ \n // a: $foo * $bar; // 2px*px/em isn\'t a valid CSS value. ✔\ \n // a: $foo / $bar; // 0.5/em isn\'t a valid CSS value. ✔\ \n // a: $foo + $bar; // Incompatible units: \'\' and \'em\'.\ \n // a: $foo - $bar; // Incompatible units: \'\' and \'em\'.\n\n\ \n $foo: 2em / 2px;\ \n $bar: 2px;\n\ \n // foo: $foo; // 1em/px isn\'t a valid CSS value. ✔\ \n bar: $bar; // 2px ✔\ \n a: $foo * $bar; // 2em ✔\ \n // a: $foo / $bar; // 0.5em/px*px isn\'t a valid CSS value. ✔\ \n // a: $foo + $bar; // Incompatible units: \'px\' and \'em\'.\ \n // a: $foo - $bar; // Incompatible units: \'px\' and \'em\'.\n\n\ \n $foo: 2em / 2px;\ \n $bar: 2em / 2px;\n\ \n // foo: $foo; // 1em/px isn\'t a valid CSS value. ✔\ \n // bar: $bar; // 1em/px isn\'t a valid CSS value. ✔\ \n // a: $foo * $bar; // 1em*em/px*px isn\'t a valid CSS value. ✔\ \n a: $foo / $bar; // 1 ✔\ \n // a: $foo + $bar; // 2em/px isn\'t a valid CSS value. ✔\ \n // a: $foo - $bar; // 0em/px isn\'t a valid CSS value. ✔\n\n\ \n $foo: 2px / 2em;\ \n $bar: 2em / 2px;\n\ \n // foo: $foo; // 1px/em isn\'t a valid CSS value. ✔\ \n // bar: $bar; // 1em/px isn\'t a valid CSS value. ✔\ \n a: $foo * $bar; // 1 ✔\ \n // a: $foo / $bar; // 1px*px/em*em isn\'t a valid CSS value. ✔\ \n // a: $foo + $bar; // Incompatible units: \'em\' and \'px\'.\ \n // a: $foo - $bar; // Incompatible units: \'em\' and \'px\'.\n\n\ \n $foo: 2px;\ \n $bar: 2px / 2em;\n\ \n foo: $foo; // 2px ✔\ \n // bar: $bar; // 1px/em isn\'t a valid CSS value. ✔\ \n // a: $foo * $bar; // 2px*px/em isn\'t a valid CSS value. ✔\ \n a: $foo / $bar; // 2em ✔\ \n // a: $foo + $bar; // Incompatible units: \'em\' and \'\'.\ \n // a: $foo - $bar; // Incompatible units: \'em\' and \'\'.\n\n\ \n $foo: 2px;\ \n $bar: 2em / 2px;\n\ \n foo: $foo; // 2px ✔\ \n // bar: $bar; // 1em/px isn\'t a valid CSS value. ✔\ \n a: $foo * $bar; // 2em ✔\ \n // a: $foo / $bar; // 2px*px/em isn\'t a valid CSS value. ✔\ \n // a: $foo + $bar; // Incompatible units: \'em\' and \'px\'.\ \n // a: $foo - $bar; // Incompatible units: \'em\' and \'px\'.\ \n}\n" ), "a {\ \n foo: 2em;\ \n bar: 2em;\ \n a: 1;\ \n a: 4em;\ \n a: 0em;\ \n foo: 2px;\ \n bar: 2em;\ \n foo: 2em;\ \n bar: 2px;\ \n bar: 2px;\ \n bar: 2px;\ \n a: 2em;\ \n a: 1;\ \n a: 1;\ \n foo: 2px;\ \n a: 2em;\ \n foo: 2px;\ \n a: 2em;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_784.rs000066400000000000000000000007541474765622100246740ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_784.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_784") } #[test] fn test() { assert_eq!( runner().ok(".foo {\ \n @each $item in (a: 1, b: 2, c: 3) {\ \n each: $item;\ \n }\ \n}\n"), ".foo {\ \n each: a 1;\ \n each: b 2;\ \n each: c 3;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_803.rs000066400000000000000000000013131474765622100246540ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_803.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_803") } #[test] fn test() { assert_eq!( runner().ok( "\ \n$query-string: \"(min-width: 0) and (max-width: 599px), (min-width: 600px) and (max-width: 899px)\";\ \n@media #{$query-string} {\ \n .foo {\ \n content: bar;\ \n }\ \n}\n" ), "@media (min-width: 0) and (max-width: 599px), (min-width: 600px) and (max-width: 899px) {\ \n .foo {\ \n content: bar;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_813.rs000066400000000000000000000011071474765622100246560ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_813.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_813") } #[test] fn test() { assert_eq!( runner().ok("@function foo($one, $two) {\ \n @return $one + $two;\ \n}\n\ \n$nums: 1px 2px;\n\ \n.foo {\ \n left: foo($nums...);\ \n bottom: $nums 3px;\ \n}\n"), ".foo {\ \n left: 3px;\ \n bottom: 1px 2px 3px;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_815.rs000066400000000000000000000007641474765622100246700ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_815.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_815") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:string\";\ \nfoo {\ \n foo: string.slice(\"bar\", 1, 2);\ \n bar: string.slice(\"bar\", 3);\ \n}\n"), "foo {\ \n foo: \"ba\";\ \n bar: \"r\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_817.rs000066400000000000000000000015461474765622100246710ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_817.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_817") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n foo: url(\'foo/bar.baz\');\ \n foo: url(\"foo/bar.baz\");\ \n foo: url(foo/bar.baz);\ \n foo: foo(\'foo/bar.baz\', \"bar\", 55);\ \n foo: foo(\"foo/bar.baz\", \'bar\', 55);\ \n foo: foo(\"foo/bar.baz\", bar, 55); }\n"), "foo {\ \n foo: url(\"foo/bar.baz\");\ \n foo: url(\"foo/bar.baz\");\ \n foo: url(foo/bar.baz);\ \n foo: foo(\"foo/bar.baz\", \"bar\", 55);\ \n foo: foo(\"foo/bar.baz\", \"bar\", 55);\ \n foo: foo(\"foo/bar.baz\", bar, 55);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_820.rs000066400000000000000000000011601474765622100246530ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_820.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_820") } #[test] fn test() { assert_eq!( runner().ok( "@charset \"UTF-8\";\ \n/*! Force output of above line by adding a unicode character. ♫ */\ \nhtml, body {\ \n height: 100%; }\n" ), "@charset \"UTF-8\";\ \n/*! Force output of above line by adding a unicode character. ♫ */\ \nhtml, body {\ \n height: 100%;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_823.rs000066400000000000000000000013111474765622100246540ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_823.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_823") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%test {\ \n > {\ \n .red {\ \n color: #F00;\ \n }\ \n }\ \n}\n\ \np {\ \n @extend %test;\n\ \n > {\ \n a {\ \n @extend %test;\ \n }\ \n }\ \n}\n"), "p > a > .red, p > .red {\ \n color: #F00;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_828.rs000066400000000000000000000030401474765622100246620ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_828.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_828") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok( "foo {\ \n box-shadow: inset -1.5em 0 1.5em -0.75em rgba(0, 0, 0, 0.25);\ \n box-shadow: inset -1.5em 0 1.5em - 0.75em rgba(0, 0, 0, 0.25);\ \n box-shadow: inset -1.5em 0 1.5em- 0.75em rgba(0, 0, 0, 0.25);\ \n box-shadow: inset -1.5em 0 1.5em-0.75em rgba(0, 0, 0, 0.25);\ \n box-shadow: inset -1.5em 0 1.5em -.75em rgba(0, 0, 0, .25);\ \n box-shadow: inset -1.5em 0 1.5em - .75em rgba(0, 0, 0, .25);\ \n box-shadow: inset -1.5em 0 1.5em- .75em rgba(0, 0, 0, .25);\ \n box-shadow: inset -1.5em 0 1.5em-.75em rgba(0, 0, 0, .25);\ \n}\n" ), "foo {\ \n box-shadow: inset -1.5em 0 1.5em -0.75em rgba(0, 0, 0, 0.25);\ \n box-shadow: inset -1.5em 0 0.75em rgba(0, 0, 0, 0.25);\ \n box-shadow: inset -1.5em 0 1.5em- 0.75em rgba(0, 0, 0, 0.25);\ \n box-shadow: inset -1.5em 0 0.75em rgba(0, 0, 0, 0.25);\ \n box-shadow: inset -1.5em 0 1.5em -0.75em rgba(0, 0, 0, 0.25);\ \n box-shadow: inset -1.5em 0 0.75em rgba(0, 0, 0, 0.25);\ \n box-shadow: inset -1.5em 0 1.5em- 0.75em rgba(0, 0, 0, 0.25);\ \n box-shadow: inset -1.5em 0 0.75em rgba(0, 0, 0, 0.25);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_829.rs000066400000000000000000000017731474765622100246760ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_829.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_829") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok(".foo {\ \n @media (foo: bar), (bar: baz) {\ \n foo: bar;\n\ \n @media (foo: bar) {\ \n bar: baz;\ \n }\n\ \n .bar {\ \n baz: bam;\ \n }\ \n }\ \n }\n\n"), "@media (foo: bar), (bar: baz) {\ \n .foo {\ \n foo: bar;\ \n }\ \n}\ \n@media (foo: bar) and (foo: bar), (bar: baz) and (foo: bar) {\ \n .foo {\ \n bar: baz;\ \n }\ \n}\ \n@media (foo: bar), (bar: baz) {\ \n .foo .bar {\ \n baz: bam;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_83.rs000066400000000000000000000017551474765622100246060ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_83.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_83") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "@mixin colors($color) {\r\ \n border-color: $color;\r\ \n background-color: $color;\r\ \n @content;\r\ \n}\r\ \n.colors {\r\ \n @include colors {\r\ \n color: $color;\r\ \n }\r\ \n border-width: 10px;\r\ \n}" ), "Error: Missing argument $color.\ \n ,\ \n1 | @mixin colors($color) {\ \n | ============== declaration\ \n... |\ \n7 | @include colors {\ \n | ^^^^^^^^^^^^^^^ invocation\ \n \'\ \n input.scss 7:3 colors()\ \n input.scss 7:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_845.rs000066400000000000000000000002641474765622100246660ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_845.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_845") } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_857.rs000066400000000000000000000011521474765622100246660ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_857.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_857") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:list\";\ \n$list: \"item-1\" \"item-2\" \"item-3\";\n\ \n#hello {\ \n @if list.length($list) % 2 == 0 {\ \n color: blue;\ \n }\n\ \n @else {\ \n color: red;\ \n }\ \n}"), "#hello {\ \n color: red;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_859.rs000066400000000000000000000013011474765622100246640ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_859.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_859") } #[test] fn test() { assert_eq!( runner().ok("@media screen {\ \n .two {\ \n @at-root .one {\ \n background: blue;\ \n .three {\ \n color: red;\ \n }\ \n }\ \n }\ \n}\n"), "@media screen {\ \n .one {\ \n background: blue;\ \n }\ \n .one .three {\ \n color: red;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_86.rs000066400000000000000000000021011474765622100245730ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_86.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_86") } #[test] fn test() { assert_eq!( runner().ok( "@use \"sass:color\";\ \n@use \"sass:math\";\ \n@use \"sass:meta\";\ \n.color-functions {\r\ \n $color: red;\r\ \n hue: color.hue($color);\r\ \n hue-type: meta.type-of(color.hue($color));\r\ \n hue-unit: math.unit(color.hue($color));\r\ \n hue-comparable: math.compatible(color.hue($color), color.hue($color));\r\ \n\ttest-1: math.compatible(color.lightness(red), 1%);\r\ \n\ttest-2: math.compatible(color.saturation(red), 1%);\r\ \n}" ), ".color-functions {\ \n hue: 0deg;\ \n hue-type: number;\ \n hue-unit: \"deg\";\ \n hue-comparable: true;\ \n test-1: true;\ \n test-2: true;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_864.rs000066400000000000000000000006231474765622100246660ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_864.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_864") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:color\";\ \ndiv { color: color.adjust(#999, $saturation: -50%); }"), "div {\ \n color: #999999;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_87.rs000066400000000000000000000013521474765622100246030ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_87.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_87") } #[test] fn test() { assert_eq!( runner().ok("$bar: \"bar\";\r\ \n$foobar: \"foo#{$bar}\";\r\ \n#{$bar} {\r\ \n #{$bar}: #{$bar};\r\ \n #{$bar}: $bar;\r\ \n}\r\ \n#{$foobar} {\r\ \n #{$foobar}: #{$foobar};\r\ \n #{$foobar}: $foobar;\r\ \n}"), "bar {\ \n bar: bar;\ \n bar: \"bar\";\ \n}\ \nfoobar {\ \n foobar: foobar;\ \n foobar: \"foobar\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_870.rs000066400000000000000000000040621474765622100246640ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_870.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_870") } #[test] fn test() { assert_eq!( runner().ok( "$quoted-strings-csv: \"alpha\", \"beta\", \'gamma\', \'delta\';\ \n$quoted-strings-ssv: \"alpha\" \"beta\" \'gamma\' \'delta\';\n\ \n.csv {\ \n output: $quoted-strings-csv;\ \n output: #{$quoted-strings-csv};\ \n output: \"[#{$quoted-strings-csv}]\";\ \n output: \"#{$quoted-strings-csv}\";\ \n output: \"[\"#{$quoted-strings-csv}\"]\";\ \n output: \'#{$quoted-strings-csv}\';\ \n output: \"[\'#{$quoted-strings-csv}\']\";\ \n}\n\ \n.ssv {\ \n output: $quoted-strings-ssv;\ \n output: #{$quoted-strings-ssv};\ \n output: \"[#{$quoted-strings-ssv}]\";\ \n output: \"#{$quoted-strings-ssv}\";\ \n output: \"[\"#{$quoted-strings-ssv}\"]\";\ \n output: \'#{$quoted-strings-ssv}\';\ \n output: \"[\'#{$quoted-strings-ssv}\']\";\ \n}\n" ), ".csv {\ \n output: \"alpha\", \"beta\", \"gamma\", \"delta\";\ \n output: alpha, beta, gamma, delta;\ \n output: \"[alpha, beta, gamma, delta]\";\ \n output: \"alpha, beta, gamma, delta\";\ \n output: \"[\" alpha, beta, gamma, delta \"]\";\ \n output: \"alpha, beta, gamma, delta\";\ \n output: \"[\'alpha, beta, gamma, delta\']\";\ \n}\ \n.ssv {\ \n output: \"alpha\" \"beta\" \"gamma\" \"delta\";\ \n output: alpha beta gamma delta;\ \n output: \"[alpha beta gamma delta]\";\ \n output: \"alpha beta gamma delta\";\ \n output: \"[\" alpha beta gamma delta \"]\";\ \n output: \"alpha beta gamma delta\";\ \n output: \"[\'alpha beta gamma delta\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_871.rs000066400000000000000000000012061474765622100246620ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_871.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_871") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( ".bar {\ \n @extend .foo;\ \n color: green;\ \n}" ), "Error: The target selector was not found.\ \nUse \"@extend .foo !optional\" to avoid this error.\ \n ,\ \n2 | @extend .foo;\ \n | ^^^^^^^^^^^^\ \n \'\ \n input.scss 2:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_873.rs000066400000000000000000000016141474765622100246670ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_873.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_873") } #[test] fn test() { assert_eq!( runner().ok("$quoted: \"notification\";\ \n$unquoted: notification;\n\ \n@function func($var) {\ \n @return $var;\ \n}\n\ \nfoo {\ \n foo: func(notification);\ \n foo: #{notification};\ \n foo: #{$quoted};\ \n foo: $quoted;\ \n foo: #{$unquoted};\ \n foo: $unquoted;\ \n}\n"), "foo {\ \n foo: notification;\ \n foo: notification;\ \n foo: notification;\ \n foo: \"notification\";\ \n foo: notification;\ \n foo: notification;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_877.rs000066400000000000000000000070521474765622100246750ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_877.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_877") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:meta\";\ \n@function _test1() {\ \n @return \'hello\';\ \n}\n\ \n@function -test2() {\ \n @return \'hello\';\ \n}\n\ \n@function test() {\ \n @return \'world\';\ \n}\n\ \n@mixin _test1() {\ \n mixin: true;\ \n}\n\ \n@mixin -test2() {\ \n mixin: true;\ \n}\n\ \n@mixin test() {\ \n mixin: true;\ \n}\n\ \n$-test1: true;\ \n$_test2: true;\ \n$test: true;\n\ \n.test {\ \n function: meta.function-exists(\'_test1\');\ \n function: meta.function-exists(\'-test1\');\ \n function: meta.function-exists(\'_test2\');\ \n function: meta.function-exists(\'-test2\');\ \n function: meta.function-exists(\'test1\');\ \n function: meta.function-exists(\'test2\');\ \n function: meta.function-exists(\'test\');\ \n mixin: meta.mixin-exists(\'_test1\');\ \n mixin: meta.mixin-exists(\'-test1\');\ \n mixin: meta.mixin-exists(\'_test2\');\ \n mixin: meta.mixin-exists(\'-test2\');\ \n mixin: meta.mixin-exists(\'test1\');\ \n mixin: meta.mixin-exists(\'test2\');\ \n mixin: meta.mixin-exists(\'test\');\ \n variable: meta.variable-exists(\'_test1\');\ \n variable: meta.variable-exists(\'-test1\');\ \n variable: meta.variable-exists(\'_test2\');\ \n variable: meta.variable-exists(\'-test2\');\ \n variable: meta.variable-exists(\'test1\');\ \n variable: meta.variable-exists(\'test2\');\ \n variable: meta.variable-exists(\'test\');\ \n global-variable: meta.global-variable-exists(\'_test1\');\ \n global-variable: meta.global-variable-exists(\'-test1\');\ \n global-variable: meta.global-variable-exists(\'_test2\');\ \n global-variable: meta.global-variable-exists(\'-test2\');\ \n global-variable: meta.global-variable-exists(\'test1\');\ \n global-variable: meta.global-variable-exists(\'test2\');\ \n global-variable: meta.global-variable-exists(\'test\');\ \n}\n"), ".test {\ \n function: true;\ \n function: true;\ \n function: true;\ \n function: true;\ \n function: false;\ \n function: false;\ \n function: true;\ \n mixin: true;\ \n mixin: true;\ \n mixin: true;\ \n mixin: true;\ \n mixin: false;\ \n mixin: false;\ \n mixin: true;\ \n variable: true;\ \n variable: true;\ \n variable: true;\ \n variable: true;\ \n variable: false;\ \n variable: false;\ \n variable: true;\ \n global-variable: true;\ \n global-variable: true;\ \n global-variable: true;\ \n global-variable: true;\ \n global-variable: false;\ \n global-variable: false;\ \n global-variable: true;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_883.rs000066400000000000000000000011461474765622100246700ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_883.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_883") } #[test] fn test() { assert_eq!( runner().ok("div {\ \n @foo {\ \n font: a;\ \n }\ \n @bar {\ \n color: b;\ \n }\ \n}\n"), "@foo {\ \n div {\ \n font: a;\ \n }\ \n}\ \n@bar {\ \n div {\ \n color: b;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_884.rs000066400000000000000000000010551474765622100246700ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_884.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_884") } #[test] fn test() { assert_eq!( runner().ok("@function foo() {\ \n @return 2;\ \n}\n\ \n$foo: false;\ \n@if foo() % 2 == 0 {\ \n $foo: true;\ \n}\n\ \na {\ \n foo: $foo;\ \n}\n"), "a {\ \n foo: true;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_890.rs000066400000000000000000000007131474765622100246650ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_890.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_890") } #[test] fn test() { assert_eq!( runner().ok(".foo {\ \n border: {\ \n right: 10px solid /*here is a comment*/;\ \n }\ \n}\n"), ".foo {\ \n border-right: 10px solid;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_893.rs000066400000000000000000000006301474765622100246660ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_893.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_893") } #[test] fn test() { assert_eq!( runner().ok("$gutter: 20px;\n\ \n.row {\ \n margin: 0 -$gutter;\ \n}"), ".row {\ \n margin: -20px;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_894.rs000066400000000000000000000010051474765622100246640ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_894.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_894") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok( "a {/**/}\ \nb {content: \'something so I have a non-empty expected output\'}" ), "a { /**/ }\ \nb {\ \n content: \"something so I have a non-empty expected output\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_91.rs000066400000000000000000000021551474765622100246000ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_91.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_91") } #[test] fn test() { assert_eq!( runner().ok( "@mixin simple-media-query($max-width, $min-width) {\r\ \n @media only screen and (max-width: $max-width) and (min-width: $min-width) {\r\ \n @content;\r\ \n }\r\ \n}\r\ \n\r\ \n@mixin test($value) {\r\ \n border-color: $value;\r\ \n}\r\ \n\r\ \nbody \r\ \n{\r\ \n @include test(\"#ccc\");\r\ \n @include simple-media-query(900px, 400px) {\r\ \n border-color: black;\r\ \n }\r\ \n}" ), "body {\ \n border-color: \"#ccc\";\ \n}\ \n@media only screen and (max-width: 900px) and (min-width: 400px) {\ \n body {\ \n border-color: black;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_930.rs000066400000000000000000000015541474765622100246640ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_930.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_930") } #[test] fn test() { assert_eq!( runner().ok(".foo {\ \n &.bar {\ \n color: #F00;\ \n }\ \n}\n\ \n$class: \'baz\';\ \n.foo {\ \n &.#{$class} {\ \n color: #F00;\ \n }\ \n}\n\ \n$n: 1;\ \n.foo {\ \n &:nth-child(#{$n}) {\ \n color: #F00;\ \n }\ \n}\n"), ".foo.bar {\ \n color: #F00;\ \n}\ \n.foo.baz {\ \n color: #F00;\ \n}\ \n.foo:nth-child(1) {\ \n color: #F00;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_931.rs000066400000000000000000000017271474765622100246670ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_931.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_931") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok( "@mixin img-opacity($trans) {\ \n filter : alpha(opacity=($trans * 100));\ \n -ms-filter : \"progid:DXImageTransform.Microsoft.Alpha(Opacity=#{$trans * 100})\";\ \n -moz-opacity : $trans;\ \n -khtml-opacity : $trans;\ \n opacity : $trans;\ \n}\n\ \nimg {\ \n @include img-opacity(.5);\ \n}" ), "img {\ \n filter: alpha(opacity=50);\ \n -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)\";\ \n -moz-opacity: 0.5;\ \n -khtml-opacity: 0.5;\ \n opacity: 0.5;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_941.rs000066400000000000000000000007421474765622100246640ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_941.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_941") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok(".one, /* 1 */\ \n.two /* 2 */ { /* 3 */\ \n\tcolor: #F00; /* 4 */\ \n}\n"), ".one,\ \n.two { /* 3 */\ \n color: #F00; /* 4 */\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_942.rs000066400000000000000000000011551474765622100246640ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_942.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_942") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok("$v: \".foo \\\ \n.bar\";\n\ \n#{$v} {\ \n\tcolor: #F00;\ \n}\n\ \ndiv {\ \n\tcontent: \"foo\\\ \nbar\";\ \n}"), ".foo .bar {\ \n color: #F00;\ \n}\ \ndiv {\ \n content: \"foobar\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_943.rs000066400000000000000000000014411474765622100246630ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_943.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_943") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%dog {\ \n @media (min-width: 10px) {\ \n &:hover {\ \n display: none;\ \n }\ \n }\ \n}\n\ \n.puppy {\ \n @extend %dog;\ \n background-color: red;\ \n}"), "@media (min-width: 10px) {\ \n .puppy:hover {\ \n display: none;\ \n }\ \n}\ \n.puppy {\ \n background-color: red;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_945.rs000066400000000000000000000010211474765622100246570ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_945.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_945") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( ".a {\ \n b: c;\ \n d:\ \n}\n" ), "Error: Expected expression.\ \n ,\ \n3 | d:\ \n | ^\ \n \'\ \n input.scss 3:5 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_948.rs000066400000000000000000000005161474765622100246720ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_948.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_948") } #[test] fn test() { assert_eq!( runner().ok("foo { bar: 10 * 5#{px}; }"), "foo {\ \n bar: 50 px;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_976.rs000066400000000000000000000007201474765622100246700ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_976.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_976") } #[test] fn test() { assert_eq!( runner().ok(".debug {\ \n @debug-this {\ \n foo: bar;\ \n }\ \n}"), "@debug-this {\ \n .debug {\ \n foo: bar;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_978.rs000066400000000000000000000006601474765622100246750ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_978.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_978") } #[test] fn test() { assert_eq!( runner().ok(".foo {\ \n [baz=\"#{&}\"] {\ \n foo: bar;\ \n }\ \n}"), ".foo [baz=\".foo\"] {\ \n foo: bar;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_980.rs000066400000000000000000000015341474765622100246670ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_980.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_980") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:list\";\ \n@function foo($value, $default: 13, $args...) {\ \n $res: $value + $default;\ \n @if list.length($args) != 0 {\ \n $res: $res + list.nth($args, 1);\ \n }\ \n @return $res;\ \n}\n\ \n.test {\ \n value: foo(3); // expected: 16\ \n value: foo(3, 4); // expected: 7\ \n value: foo(3, 4, 5, 6); // expected: 12\ \n}\n"), ".test {\ \n value: 16;\ \n value: 7;\ \n value: 12;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_988.rs000066400000000000000000000016631474765622100247020ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_988.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_988") } #[test] fn test() { assert_eq!( runner().ok( "@use \"sass:string\";\ \n@function str-replace($string, $search, $replace: \'\') {\ \n $index: string.index($string, $search);\ \n @if $index {\ \n @return string.slice($string, 1, $index - 1) + $replace +\ \n str-replace(string.slice($string, $index + string.length($search)), $search, $replace);\ \n }\ \n @return $string;\ \n}\n\ \n$string: \'Foo Bar Baz Qux\';\ \n.foo {\ \n content: str-replace($string, \' \', \'-\');\ \n}" ), ".foo {\ \n content: \"Foo-Bar-Baz-Qux\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/issue_992.rs000066400000000000000000000006521474765622100246720ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues/issue_992.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_992") } #[test] fn test() { assert_eq!( runner().ok("$color: \'red\';\n\ \n.-text-#{$color}- {\ \n color: $color;\ \n}"), ".-text-red- {\ \n color: \"red\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_closed_issues/mod.rs000066400000000000000000000205141474765622100237150ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-closed-issues" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("libsass-closed-issues") } mod issue_2640; mod issue_2681; mod issue_100; mod issue_1007; mod issue_1016; mod issue_1021; mod issue_1025; mod issue_1030; mod issue_1036; mod issue_1043; mod issue_1060; mod issue_1061; mod issue_1063; mod issue_1074; mod issue_1075; mod issue_1079; mod issue_108; mod issue_1080; mod issue_1081; mod issue_1082; mod issue_1086; mod issue_1087; mod issue_1091; mod issue_1092; mod issue_1093; mod issue_1098; mod issue_1101; mod issue_1102; mod issue_1103; mod issue_1106; mod issue_1107; mod issue_1115; mod issue_112; mod issue_1121; mod issue_1127; mod issue_113; mod issue_1130; mod issue_1132; mod issue_1133; mod issue_1153; mod issue_1162; mod issue_1163; mod issue_1167; mod issue_1168; mod issue_1169; mod issue_1170; mod issue_1171; mod issue_1178; mod issue_1187; mod issue_1188; mod issue_1192; mod issue_1206; mod issue_1207; mod issue_1208; mod issue_1210; mod issue_1215; mod issue_1216; mod issue_1218; mod issue_1224; mod issue_1230; mod issue_1231; mod issue_1233; mod issue_1240; mod issue_1243; mod issue_1248; mod issue_1251; mod issue_1255; mod issue_1257; mod issue_1259; mod issue_1260; mod issue_1263; mod issue_1266; mod issue_1269; mod issue_1271; mod issue_1273; mod issue_1277; mod issue_1279; mod issue_1281; mod issue_1283; mod issue_1285; mod issue_1294; mod issue_1295; mod issue_1297; mod issue_1298; mod issue_1301; mod issue_1303; mod issue_1304; mod issue_1305; mod issue_131; mod issue_1322; mod issue_1323; mod issue_1328; mod issue_1331; mod issue_1332; mod issue_1333; mod issue_1336; mod issue_1355; mod issue_137; mod issue_1370; mod issue_1376; mod issue_1393; mod issue_1394; mod issue_1396; mod issue_1398; mod issue_1399; mod issue_1404; mod issue_1405; mod issue_1413; mod issue_1415; mod issue_1417; mod issue_1418; mod issue_1419; mod issue_1422; mod issue_143; mod issue_1432; mod issue_1434; mod issue_1437; mod issue_1438; mod issue_1440; mod issue_1441; mod issue_1448; mod issue_1452; mod issue_1459; mod issue_1482; mod issue_1484; mod issue_1486; mod issue_1487; mod issue_1488; mod issue_151; mod issue_152; mod issue_1526; mod issue_1527; mod issue_1535; mod issue_1537; mod issue_154; mod issue_1546; mod issue_1550; mod issue_1557; mod issue_1566; mod issue_1567; mod issue_1568; mod issue_1569; mod issue_1570; mod issue_1574; mod issue_1577; mod issue_1578; mod issue_1579; mod issue_1583; mod issue_1584; mod issue_1585; mod issue_1590; mod issue_1596; mod issue_1601; mod issue_1604; mod issue_1610; mod issue_1612; mod issue_1622; mod issue_1624; mod issue_1629; mod issue_1632; mod issue_1634; mod issue_1640; mod issue_1644; mod issue_1645; mod issue_1647; mod issue_1648; mod issue_1650; mod issue_1651; mod issue_1654; mod issue_1658; mod issue_1667; mod issue_1669; mod issue_167; mod issue_1670; mod issue_1671; mod issue_1672; mod issue_1673; mod issue_1681; mod issue_1683; mod issue_1685; mod issue_1706; mod issue_1709; mod issue_1710; mod issue_1715; mod issue_1720; mod issue_1722; mod issue_1723; mod issue_1726; mod issue_1729; mod issue_1732; mod issue_1733; mod issue_1739; mod issue_1741; mod issue_1752; mod issue_1757; mod issue_1765; mod issue_1766; mod issue_1768; mod issue_1770; mod issue_1776; mod issue_1786; mod issue_1792; mod issue_1793; mod issue_1794; mod issue_1796; mod issue_1797; mod issue_1798; mod issue_1801; mod issue_1803; mod issue_1804; mod issue_1812; mod issue_1813; mod issue_1819; mod issue_1822; mod issue_1825; mod issue_1839; mod issue_185; mod issue_1873; mod issue_1886; mod issue_1889; mod issue_1890; mod issue_1898; mod issue_1901; mod issue_1904; mod issue_1907; mod issue_1915; mod issue_1916; mod issue_192; mod issue_1923; mod issue_1926; mod issue_1927; mod issue_1931; mod issue_1940; mod issue_1941; mod issue_1944; mod issue_1945; mod issue_1947; mod issue_1960; mod issue_1969; mod issue_1971; mod issue_1977; mod issue_1991; mod issue_1993; mod issue_1994; mod issue_1996; mod issue_2000; mod issue_2006; mod issue_2007; mod issue_2009; mod issue_201; mod issue_2017; mod issue_2020; mod issue_2023; mod issue_2031; mod issue_2034; mod issue_2042; mod issue_2053; mod issue_2054; mod issue_2055; mod issue_2056; mod issue_2057; mod issue_2074; mod issue_2081; mod issue_2095; mod issue_2106; mod issue_2112; mod issue_2116; mod issue_2120; mod issue_2123; mod issue_2124; mod issue_2139; mod issue_2140; mod issue_2143; mod issue_2147; mod issue_2149; mod issue_2150; mod issue_2153; mod issue_2154; mod issue_2155; mod issue_2156; mod issue_2169; mod issue_2175; mod issue_2177; mod issue_2179; mod issue_2185; mod issue_2198; mod issue_2200; mod issue_2202; mod issue_2205; mod issue_221255; mod issue_221289; mod issue_2233; mod issue_224; mod issue_2243; mod issue_2246; mod issue_2260; mod issue_2261; mod issue_2289; mod issue_2291; mod issue_2295; mod issue_2303; mod issue_2304; mod issue_2307; mod issue_2309; mod issue_231; mod issue_2320; mod issue_2321; mod issue_2330; mod issue_2333; mod issue_2341; mod issue_2346; mod issue_2347; mod issue_2349; mod issue_2352; mod issue_2358; mod issue_2360; mod issue_2365; mod issue_2366; mod issue_2371; mod issue_2374; mod issue_2376; mod issue_238760; mod issue_239; mod issue_2394; mod issue_2399; mod issue_2429; mod issue_2444; // Ignoring "issue_2446", tests with expected error not implemented yet. // Ignoring "issue_245443", tests with expected error not implemented yet. mod issue_246; mod issue_2462; mod issue_2464; mod issue_2465; mod issue_2467; mod issue_2468; mod issue_2472; mod issue_2480; mod issue_2482; mod issue_2509; mod issue_2520; mod issue_254; mod issue_2560; mod issue_2569; mod issue_257; mod issue_2582; mod issue_2625; mod issue_2633; mod issue_2697; mod issue_274; mod issue_2779; mod issue_279; mod issue_2808; mod issue_2863; mod issue_2884; mod issue_289; mod issue_2959; mod issue_2975; mod issue_2980; mod issue_2994; mod issue_308; mod issue_309; mod issue_312; mod issue_338; mod issue_344; mod issue_346; mod issue_349; mod issue_368; mod issue_394; mod issue_424; mod issue_435; mod issue_439; mod issue_442; mod issue_45; mod issue_453; mod issue_456; mod issue_469; mod issue_478; mod issue_485; mod issue_487; mod issue_492; mod issue_495; mod issue_502; mod issue_506; mod issue_509; mod issue_510; mod issue_512; mod issue_534; mod issue_535; mod issue_548; mod issue_549; mod issue_550; mod issue_552; mod issue_553; mod issue_555; mod issue_556; mod issue_557; mod issue_558; mod issue_56; mod issue_574; mod issue_575; mod issue_577; mod issue_578; mod issue_579; mod issue_58; mod issue_59; mod issue_590; mod issue_592; mod issue_593; mod issue_595; mod issue_6; mod issue_602; mod issue_610; mod issue_613; mod issue_615; mod issue_622; mod issue_623; mod issue_628; mod issue_63; mod issue_639; mod issue_64; mod issue_641; mod issue_643; mod issue_644; mod issue_646; mod issue_652; mod issue_659; mod issue_660; mod issue_666; mod issue_67; mod issue_672; mod issue_673; mod issue_674; mod issue_683; mod issue_688; mod issue_690; mod issue_694; mod issue_699; mod issue_700; mod issue_701; mod issue_702; mod issue_703; mod issue_708; mod issue_712; mod issue_713; mod issue_72; mod issue_73; mod issue_733; mod issue_736; mod issue_738; mod issue_740; mod issue_748; mod issue_759; mod issue_760; mod issue_763; mod issue_77; mod issue_783; mod issue_784; mod issue_803; mod issue_813; mod issue_815; mod issue_817; mod issue_820; mod issue_823; mod issue_828; mod issue_829; mod issue_83; mod issue_845; mod issue_857; mod issue_859; mod issue_86; mod issue_864; mod issue_87; mod issue_870; mod issue_871; mod issue_873; mod issue_877; mod issue_883; mod issue_884; mod issue_890; mod issue_893; mod issue_894; mod issue_91; mod issue_930; mod issue_931; mod issue_941; mod issue_942; mod issue_943; mod issue_945; mod issue_948; mod issue_976; mod issue_978; mod issue_980; mod issue_988; mod issue_992; rsass-0.29.0/rsass/tests/spec/libsass_todo_issues/000077500000000000000000000000001474765622100222625ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_todo_issues/issue_1026.rs000066400000000000000000000012141474765622100244260ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-todo-issues/issue_1026.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1026") } #[test] fn test() { assert_eq!( runner().ok("div {\ \n a {\ \n /**\ \n * a\ \n * multiline\ \n * comment\ \n */\ \n top: 10px;\ \n }\ \n}\n"), "div a {\ \n /**\ \n * a\ \n * multiline\ \n * comment\ \n */\ \n top: 10px;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_todo_issues/issue_1096.rs000066400000000000000000000013031474765622100244340ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-todo-issues/issue_1096.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1096") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "// line-endings in this file must be CRLF\r\ \n@import url(\"foo\\\r\ \nbar\");\r\ \n@import url(\"foo\r\ \nbar\");\r\ \n@import url(foo\r\ \nbar);\r\n" ), "Error: Expected \".\ \n ,\ \n4 | @import url(\"foo\ \n | ^\ \n \'\ \n input.scss 4:17 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_todo_issues/issue_1694/000077500000000000000000000000001474765622100240755ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_todo_issues/issue_1694/mod.rs000066400000000000000000000003461474765622100252250ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-todo-issues/issue_1694" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1694") } mod quoted_right_dbl_paren; mod quoted_right_paren; rsass-0.29.0/rsass/tests/spec/libsass_todo_issues/issue_1694/quoted_right_dbl_paren.rs000066400000000000000000000010171474765622100311460ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-todo-issues/issue_1694/quoted-right-dbl-paren.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("quoted-right-dbl-paren") } #[test] fn test() { assert_eq!( runner().ok( "test {\ \n filter: progid:DXImageTransform.Microsoft.Alpha(opacity=20\\));\ \n}\n" ), "test {\ \n filter: progid:DXImageTransform.Microsoft.Alpha(opacity=20\\));\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_todo_issues/issue_1694/quoted_right_paren.rs000066400000000000000000000013061474765622100303260ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-todo-issues/issue_1694/quoted-right-paren.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("quoted-right-paren") } #[test] #[ignore] // missing error fn test() { assert_eq!( runner().err( "test {\ \n filter: progid:DXImageTransform.Microsoft.Alpha(opacity=20\\);\ \n}\n" ), "Error: expected \")\".\ \n ,\ \n2 | filter: progid:DXImageTransform.Microsoft.Alpha(opacity=20\\);\ \n | ^\ \n \'\ \n input.scss 2:63 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_todo_issues/issue_1732/000077500000000000000000000000001474765622100240665ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_todo_issues/issue_1732/invalid/000077500000000000000000000000001474765622100255145ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_todo_issues/issue_1732/invalid/mod.rs000066400000000000000000000003031474765622100266350ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-todo-issues/issue_1732/invalid" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("invalid") } mod ruleset; rsass-0.29.0/rsass/tests/spec/libsass_todo_issues/issue_1732/invalid/ruleset.rs000066400000000000000000000007371474765622100275540ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-todo-issues/issue_1732/invalid/ruleset.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("ruleset") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err("color: green;\n"), "Error: expected \"{\".\ \n ,\ \n1 | color: green;\ \n | ^\ \n \'\ \n input.scss 1:13 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_todo_issues/issue_1732/mod.rs000066400000000000000000000002761474765622100252200ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-todo-issues/issue_1732" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1732") } mod invalid; rsass-0.29.0/rsass/tests/spec/libsass_todo_issues/issue_1763.rs000066400000000000000000000013561474765622100244450ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-todo-issues/issue_1763.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("issue_1763") .mock_file("first.scss", "foo { bar: baz }\n") .mock_file("second.scss", "a { b: c }\n") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok( "@import \"first.css\", \"second.css\" (max-width: 400px);\ \n@import \"first.scss\", \"second.scss\" (max-width: 400px);\n" ), "@import \"first.css\";\ \n@import \"second.css\" (max-width: 400px);\ \n@import \"second.scss\" (max-width: 400px);\ \nfoo {\ \n bar: baz;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_todo_issues/issue_1798/000077500000000000000000000000001474765622100241025ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_todo_issues/issue_1798/mod.rs000066400000000000000000000002711474765622100252270ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-todo-issues/issue_1798" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1798") } mod t3; rsass-0.29.0/rsass/tests/spec/libsass_todo_issues/issue_1798/t3.rs000066400000000000000000000006301474765622100247750ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-todo-issues/issue_1798/3.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("3") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("a {\ \n content: \"#{ a /*#{\"}*/ }\";\ \n}\n"), "a {\ \n content: \"a\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_todo_issues/issue_1801/000077500000000000000000000000001474765622100240635ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_todo_issues/issue_1801/mod.rs000066400000000000000000000003111474765622100252030ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-todo-issues/issue_1801" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_1801") } mod simple_import_loop; rsass-0.29.0/rsass/tests/spec/libsass_todo_issues/issue_1801/simple_import_loop.rs000066400000000000000000000027621474765622100303540ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-todo-issues/issue_1801/simple-import-loop.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("simple-import-loop") .mock_file("_susy.scss", "@import 'susy';\n") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "@import \'susy\';\n" ), "DEPRECATION WARNING [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ \nMore info and automated migrator: https://sass-lang.com/d/import\n\ \n ,\ \n1 | @import \'susy\';\ \n | ^^^^^^\ \n \'\ \n input.scss 1:9 root stylesheet\n\ \nDEPRECATION WARNING [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ \nMore info and automated migrator: https://sass-lang.com/d/import\n\ \n ,\ \n1 | @import \'susy\';\ \n | ^^^^^^\ \n \'\ \n _susy.scss 1:9 @import\ \n input.scss 1:9 root stylesheet\n\ \nError: This file is already being loaded.\ \n ,--> _susy.scss\ \n1 | @import \'susy\';\ \n | ^^^^^^ new load\ \n \'\ \n ,--> input.scss\ \n1 | @import \'susy\';\ \n | ====== original load\ \n \'\ \n _susy.scss 1:9 @import\ \n input.scss 1:9 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_todo_issues/issue_2016.rs000066400000000000000000000012631474765622100244320ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-todo-issues/issue_2016.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2016") } #[test] #[ignore] // missing error fn test() { assert_eq!( runner().err( "$_: ___((Classes and IDs must follow a specific grammar. And this thing here doesn’t.));" ), "Error: Expected identifier.\ \n ,\ \n1 | $_: ___((Classes and IDs must follow a specific grammar. And this thing here doesn’t.));\ \n | ^\ \n \'\ \n input.scss 1:57 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_todo_issues/issue_2023/000077500000000000000000000000001474765622100240605ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_todo_issues/issue_2023/class_selector_id.rs000066400000000000000000000010441474765622100301060ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-todo-issues/issue_2023/class-selector-id.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("class-selector-id") } #[test] #[ignore] // missing error fn test() { assert_eq!( runner().err( ".3c {\r\ \n color: red;\r\ \n}\r\n" ), "Error: Expected identifier.\ \n ,\ \n1 | .3c {\ \n | ^\ \n \'\ \n input.scss 1:2 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_todo_issues/issue_2023/class_selector_nr.rs000066400000000000000000000010421474765622100301270ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-todo-issues/issue_2023/class-selector-nr.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("class-selector-nr") } #[test] #[ignore] // missing error fn test() { assert_eq!( runner().err( ".3 {\r\ \n color: red;\r\ \n}\r\n" ), "Error: Expected identifier.\ \n ,\ \n1 | .3 {\ \n | ^\ \n \'\ \n input.scss 1:2 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_todo_issues/issue_2023/mod.rs000066400000000000000000000004161474765622100252060ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-todo-issues/issue_2023" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2023") } mod class_selector_id; mod class_selector_nr; mod type_selector_id; mod type_selector_nr; rsass-0.29.0/rsass/tests/spec/libsass_todo_issues/issue_2023/type_selector_id.rs000066400000000000000000000010351474765622100277620ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-todo-issues/issue_2023/type-selector-id.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("type-selector-id") } #[test] #[ignore] // missing error fn test() { assert_eq!( runner().err( "1a {\r\ \n color: red;\r\ \n}\r\n" ), "Error: expected selector.\ \n ,\ \n1 | 1a {\ \n | ^\ \n \'\ \n input.scss 1:1 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_todo_issues/issue_2023/type_selector_nr.rs000066400000000000000000000010331474765622100300030ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-todo-issues/issue_2023/type-selector-nr.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("type-selector-nr") } #[test] #[ignore] // missing error fn test() { assert_eq!( runner().err( "1 {\r\ \n color: red;\r\ \n}\r\n" ), "Error: expected selector.\ \n ,\ \n1 | 1 {\ \n | ^\ \n \'\ \n input.scss 1:1 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_todo_issues/issue_2051.rs000066400000000000000000000014051474765622100244270ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-todo-issues/issue_2051.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2051") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( ":global(.thing) {\ \n color: red;\ \n}\n\ \n:global(.thing[disabled]) {\ \n @extend .thing;\ \n background: blue;\ \n}" ), "Error: The target selector was not found.\ \nUse \"@extend .thing !optional\" to avoid this error.\ \n ,\ \n6 | @extend .thing;\ \n | ^^^^^^^^^^^^^^\ \n \'\ \n input.scss 6:5 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_todo_issues/issue_2096.rs000066400000000000000000000006131474765622100244400ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-todo-issues/issue_2096.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2096") } #[test] fn test() { assert_eq!( runner().ok("@mixin foo() {\ \n @import \"https://foo\";\ \n}\ \n@include foo;\n"), "@import \"https://foo\";\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_todo_issues/issue_2235/000077500000000000000000000000001474765622100240655ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_todo_issues/issue_2235/empty.rs000066400000000000000000000007231474765622100255730ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-todo-issues/issue_2235/empty.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("empty") } #[test] fn test() { assert_eq!( runner().ok("@media all and (min-width: 100px) {\ \n @import \"https://example.org\";\ \n}\n"), "@media all and (min-width: 100px) {\ \n @import \"https://example.org\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_todo_issues/issue_2235/mod.rs000066400000000000000000000003141474765622100252100ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-todo-issues/issue_2235" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2235") } mod empty; mod not_empty; rsass-0.29.0/rsass/tests/spec/libsass_todo_issues/issue_2235/not_empty.rs000066400000000000000000000010601474765622100264460ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-todo-issues/issue_2235/not-empty.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("not-empty") } #[test] fn test() { assert_eq!( runner().ok("@media all and (min-width: 100px) {\ \n a { b: c }\ \n @import \"https://example.org\";\ \n}\n"), "@media all and (min-width: 100px) {\ \n a {\ \n b: c;\ \n }\ \n @import \"https://example.org\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_todo_issues/issue_2295/000077500000000000000000000000001474765622100240735ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_todo_issues/issue_2295/error/000077500000000000000000000000001474765622100252245ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_todo_issues/issue_2295/error/basic.rs000066400000000000000000000020121474765622100266460ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-todo-issues/issue_2295/error/basic.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("basic") .mock_file("include.scss", "display: none;\r\n") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( ".my-scope {\r\ \n @import \'include.scss\';\r\ \n}" ), "DEPRECATION WARNING [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ \nMore info and automated migrator: https://sass-lang.com/d/import\n\ \n ,\ \n2 | @import \'include.scss\';\ \n | ^^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:11 root stylesheet\n\ \nError: expected \"{\".\ \n ,\ \n1 | display: none;\ \n | ^\ \n \'\ \n include.scss 1:14 @import\ \n input.scss 2:11 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_todo_issues/issue_2295/error/mod.rs000066400000000000000000000003131474765622100263460ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-todo-issues/issue_2295/error" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("error") } mod basic; mod wrapped; rsass-0.29.0/rsass/tests/spec/libsass_todo_issues/issue_2295/error/wrapped.rs000066400000000000000000000020471474765622100272370ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-todo-issues/issue_2295/error/wrapped.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("wrapped") .mock_file("include.scss", "@if (true) {\r\n display: none;\r\n}") } #[test] #[ignore] // missing error fn test() { assert_eq!( runner().err( ".my-scope {\r\ \n @import \'include.scss\';\r\ \n}" ), "DEPRECATION WARNING [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.\n\ \nMore info and automated migrator: https://sass-lang.com/d/import\n\ \n ,\ \n2 | @import \'include.scss\';\ \n | ^^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:11 root stylesheet\n\ \nError: expected \"{\".\ \n ,\ \n2 | display: none;\ \n | ^\ \n \'\ \n include.scss 2:16 @import\ \n input.scss 2:11 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_todo_issues/issue_2295/mod.rs000066400000000000000000000002741474765622100252230ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-todo-issues/issue_2295" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2295") } mod error; rsass-0.29.0/rsass/tests/spec/libsass_todo_issues/issue_238764.rs000066400000000000000000000012701474765622100246150ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-todo-issues/issue_238764.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_238764") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "@mixin bar {\r\ \n @at-root @bar {a: b}\r\ \n}\r\ \n\r\ \n.foo {\r\ \n @include bar;\r\ \n}" ), "Error: expected selector.\ \n ,\ \n2 | @at-root @bar {a: b}\ \n | ^\ \n \'\ \n input.scss 2:12 bar()\ \n input.scss 6:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/libsass_todo_issues/issue_2818.rs000066400000000000000000000011541474765622100244430ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-todo-issues/issue_2818.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_2818") } #[test] fn test() { assert_eq!( runner().ok( "@use \"sass:color\";\ \n@use \"sass:meta\";\ \n$map: (\"lightness\": 10%, \"saturation\": 10%);\ \n$base: meta.call(meta.get-function(\'scale\', $module: \'color\'), #dedede, $map...);\ \ntest { color: $base; }\n" ), "test {\ \n color: rgb(228.27, 222.33, 222.33);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_todo_issues/mod.rs000066400000000000000000000017131474765622100234110ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-todo-issues" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("libsass-todo-issues") } mod issue_1026; mod issue_1096; mod issue_1694; mod issue_1732; mod issue_1763; mod issue_1798; mod issue_1801; mod issue_2016; mod issue_2023; mod issue_2051; mod issue_2096; // Ignoring "issue_221260.hrx", not expected to work yet. // Ignoring "issue_221262.hrx", not expected to work yet. // Ignoring "issue_221264.hrx", not expected to work yet. // Ignoring "issue_221267", tests with expected error not implemented yet. // Ignoring "issue_221286", tests with expected error not implemented yet. // Ignoring "issue_221292.hrx", not expected to work yet. mod issue_2235; mod issue_2295; mod issue_238764; // Ignoring "issue_245442", tests with expected error not implemented yet. // Ignoring "issue_245446", tests with expected error not implemented yet. mod issue_2818; rsass-0.29.0/rsass/tests/spec/libsass_todo_tests/000077500000000000000000000000001474765622100221115ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_todo_tests/errors/000077500000000000000000000000001474765622100234255ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_todo_tests/errors/import/000077500000000000000000000000001474765622100247375ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_todo_tests/errors/import/mod.rs000066400000000000000000000002701474765622100260630ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-todo-tests/errors/import" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("import") } mod url; rsass-0.29.0/rsass/tests/spec/libsass_todo_tests/errors/import/url/000077500000000000000000000000001474765622100255415ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_todo_tests/errors/import/url/mixin/000077500000000000000000000000001474765622100266655ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_todo_tests/errors/import/url/mixin/control_else/000077500000000000000000000000001474765622100313555ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_todo_tests/errors/import/url/mixin/control_else/inside.rs000066400000000000000000000012241474765622100331750ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-todo-tests/errors/import/url/mixin/control-else/inside.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("inside") } #[test] fn test() { assert_eq!( runner().ok("@mixin do_import() {\r\ \n @if (false) {\r\ \n } @else {\r\ \n @import url(\"http://www.libsass.org\");\r\ \n }\r\ \n}\r\ \n\r\ \nfoo {\r\ \n @include do_import();\r\ \n}"), "foo {\ \n @import url(\"http://www.libsass.org\");\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_todo_tests/errors/import/url/mixin/control_else/mod.rs000066400000000000000000000003301474765622100324760ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-todo-tests/errors/import/url/mixin/control-else" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("control-else") } mod inside; rsass-0.29.0/rsass/tests/spec/libsass_todo_tests/errors/import/url/mixin/control_if/000077500000000000000000000000001474765622100310235ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_todo_tests/errors/import/url/mixin/control_if/inside.rs000066400000000000000000000011631474765622100326450ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-todo-tests/errors/import/url/mixin/control-if/inside.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("inside") } #[test] fn test() { assert_eq!( runner().ok("@mixin do_import() {\r\ \n @if (true) {\r\ \n @import url(\"http://www.libsass.org\");\r\ \n }\r\ \n}\r\ \n\r\ \nfoo {\r\ \n @include do_import();\r\ \n}"), "foo {\ \n @import url(\"http://www.libsass.org\");\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/libsass_todo_tests/errors/import/url/mixin/control_if/mod.rs000066400000000000000000000003241474765622100321470ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-todo-tests/errors/import/url/mixin/control-if" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("control-if") } mod inside; rsass-0.29.0/rsass/tests/spec/libsass_todo_tests/errors/import/url/mixin/mod.rs000066400000000000000000000003331474765622100300110ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-todo-tests/errors/import/url/mixin" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("mixin") } mod control_else; mod control_if; rsass-0.29.0/rsass/tests/spec/libsass_todo_tests/errors/import/url/mod.rs000066400000000000000000000002731474765622100266700ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-todo-tests/errors/import/url" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("url") } mod mixin; rsass-0.29.0/rsass/tests/spec/libsass_todo_tests/errors/mod.rs000066400000000000000000000003021474765622100245450ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-todo-tests/errors" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("errors") } mod import; mod unicode; rsass-0.29.0/rsass/tests/spec/libsass_todo_tests/errors/unicode/000077500000000000000000000000001474765622100250535ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_todo_tests/errors/unicode/invalid/000077500000000000000000000000001474765622100265015ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/libsass_todo_tests/errors/unicode/invalid/mod.rs000066400000000000000000000005031474765622100276240ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-todo-tests/errors/unicode/invalid" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("invalid") } // Ignoring "after", tests with expected error not implemented yet. // Ignoring "before", tests with expected error not implemented yet. rsass-0.29.0/rsass/tests/spec/libsass_todo_tests/errors/unicode/mod.rs000066400000000000000000000002761474765622100262050ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-todo-tests/errors/unicode" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("unicode") } mod invalid; rsass-0.29.0/rsass/tests/spec/libsass_todo_tests/mod.rs000066400000000000000000000002711474765622100232360ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/libsass-todo-tests" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("libsass-todo-tests") } mod errors; rsass-0.29.0/rsass/tests/spec/main.rs000066400000000000000000000015271474765622100175010ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec" //! version 1dafbb0a2, 2025-01-29 16:41:38 -0800. //! See for source material.\n //! The following tests are excluded from conversion: //! ["directives/extend", "libsass-todo-issues/issue_221260.hrx", "libsass-todo-issues/issue_221262.hrx", "libsass-todo-issues/issue_221264.hrx", "libsass-todo-issues/issue_221292.hrx", "libsass/unicode-bom/utf-16-big", "libsass/unicode-bom/utf-16-little", "non_conformant/scss/huge.hrx", "non_conformant/scss/multiline-var.hrx"] mod testrunner; use testrunner::{runner, TestRunner}; mod callable; mod core_functions; mod css; mod directives; mod expressions; mod libsass; mod libsass_closed_issues; mod libsass_todo_issues; mod libsass_todo_tests; mod non_conformant; mod operators; mod parser; mod values; mod variables; rsass-0.29.0/rsass/tests/spec/non_conformant/000077500000000000000000000000001474765622100212225ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/basic/000077500000000000000000000000001474765622100223035ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/basic/mod.rs000066400000000000000000000032371474765622100234350ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("basic") } mod t00_empty; mod t01_simple_css; mod t02_simple_nesting; mod t03_simple_variable; mod t04_basic_variables; mod t05_empty_levels; mod t06_nesting_and_comments; mod t07_nested_simple_selector_groups; mod t08_selector_combinators; mod t09_selector_groups_and_combinators; mod t10_classes_and_ids; mod t11_attribute_selectors; mod t12_pseudo_classes_and_elements; mod t13_back_references; mod t14_imports; mod t15_arithmetic_and_lists; mod t17_basic_mixins; mod t18_mixin_scope; mod t19_full_mixin_craziness; mod t20_scoped_variables; mod t21_one_builtin_function; mod t22_colors_with_alpha; mod t23_basic_value_interpolation; mod t24_namespace_properties; mod t25_basic_string_interpolation; mod t26_selector_interpolation; mod t27_media_queries; mod t28_url; mod t29_if; mod t30_if_in_function; mod t31_if_in_mixin; mod t32_percentages; mod t33_ambiguous_imports; mod t35_varargs_false; mod t36_extra_commas_in_selectors; mod t37_url_expressions; mod t38_expressions_in_at_directives; mod t39_dash_match_attribute_selector; mod t40_pseudo_class_identifier_starting_with_n; mod t41_slashy_urls; mod t42_css_imports; mod t44_bem_selectors; mod t49_interpolants_in_css_imports; mod t50_wrapped_pseudo_selectors; mod t51_trailing_commas_in_list; mod t52_interchangeable_hyphens_underscores; mod t53_escaped_quotes; mod t54_adjacent_identifiers_with_hyphens; mod t55_variable_exists; mod t56_global_variable_exists; mod t57_function_exists; mod t58_mixin_exists; mod t59_if_expression; rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t00_empty.rs000066400000000000000000000003571474765622100244770ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/00_empty.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("00_empty") } #[test] fn test() { assert_eq!(runner().ok("\n"), ""); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t01_simple_css.rs000066400000000000000000000005571474765622100255050ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/01_simple_css.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("01_simple_css") } #[test] fn test() { assert_eq!( runner().ok("a {\ \n color: blue;\ \n}"), "a {\ \n color: blue;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t02_simple_nesting.rs000066400000000000000000000006551474765622100263640ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/02_simple_nesting.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("02_simple_nesting") } #[test] fn test() { assert_eq!( runner().ok("div {\ \n img {\ \n border: 0px;\ \n }\ \n}"), "div img {\ \n border: 0px;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t03_simple_variable.rs000066400000000000000000000006311474765622100264750ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/03_simple_variable.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("03_simple_variable") } #[test] fn test() { assert_eq!( runner().ok("$color: red;\n\ \na {\ \n color: $color;\ \n}"), "a {\ \n color: red;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t04_basic_variables.rs000066400000000000000000000016131474765622100264520ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/04_basic_variables.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("04_basic_variables") } #[test] fn test() { assert_eq!( runner().ok("$color: \"black\";\ \n$color: red;\ \n$background: \"blue\";\n\ \na {\ \n color: $color;\ \n background: $background;\ \n}\n\ \n$y: before;\n\ \n$x: 1 2 $y;\n\ \nfoo {\ \n a: $x;\ \n}\n\ \n$y: after;\n\ \nfoo {\ \n a: $x;\ \n}"), "a {\ \n color: red;\ \n background: \"blue\";\ \n}\ \nfoo {\ \n a: 1 2 before;\ \n}\ \nfoo {\ \n a: 1 2 before;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t05_empty_levels.rs000066400000000000000000000032311474765622100260500ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/05_empty_levels.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("05_empty_levels") } #[test] fn test() { assert_eq!( runner().ok("div {\ \n span {\ \n color: red;\ \n background: blue;\ \n }\ \n}\n\ \ndiv {\ \n color: gray;\ \n empty {\ \n span {\ \n color: red;\ \n background: blue;\ \n }\ \n }\ \n}\n\ \nempty1 {\ \n empty2 {\ \n div {\ \n blah: blah;\ \n }\ \n }\ \n}\n\ \nempty1 {\ \n empty2 {\ \n div {\ \n bloo: blee;\ \n empty3 {\ \n span {\ \n blah: blah;\ \n blah: blah;\ \n }\ \n }\ \n }\ \n }\ \n}\n"), "div span {\ \n color: red;\ \n background: blue;\ \n}\ \ndiv {\ \n color: gray;\ \n}\ \ndiv empty span {\ \n color: red;\ \n background: blue;\ \n}\ \nempty1 empty2 div {\ \n blah: blah;\ \n}\ \nempty1 empty2 div {\ \n bloo: blee;\ \n}\ \nempty1 empty2 div empty3 span {\ \n blah: blah;\ \n blah: blah;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t06_nesting_and_comments.rs000066400000000000000000000070051474765622100275420ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/06_nesting_and_comments.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("06_nesting_and_comments") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok("$blah: bloo blee;\ \n$blip: \"a \'red\' and \\\"blue\\\" value\";\n\ \n/* top level comment -- should be preserved */\ \ndiv {\ \n /* another comment that should be preserved */\ \n color: red;\ \n background: blue;\ \n $blux: hux; // gone!\ \n span {\ \n font-weight: bold;\ \n a {\ \n text-decoration: none; /* where will this comment go? */\ \n color: green;\ \n /* what about this comment? */ border: 1px $blah red;\ \n }\ \n /* yet another comment that should be preserved */\ \n display: inline-block;\ \n } // gone!\ \n /* the next selector should be indented two spaces */\ \n empty {\ \n not_empty {\ \n blah: blah; // gone!\ \n bloo: bloo;\ \n }\ \n }\ \n p { /* comment after open brace goes in */\ \n padding: 10px 8%;\ \n -webkit-box-sizing: $blux;\ \n } /* comment after close brace goes out */\ \n margin: 10px 5px;\ \n h1 {\ \n color: $blip;\ \n }\ \n}\ \n/* last comment, top level again --\ \n compare the indentation! */\n\ \ndiv {\ \n f: g;\ \n empty {\ \n span {\ \n a: b;\ \n }\ \n }\ \n empty_with_comment {\ \n /* hey now */\ \n span {\ \n c: d;\ \n }\ \n }\ \n}"), "/* top level comment -- should be preserved */\ \ndiv {\ \n /* another comment that should be preserved */\ \n color: red;\ \n background: blue;\ \n /* the next selector should be indented two spaces */\ \n /* comment after close brace goes out */\ \n margin: 10px 5px;\ \n}\ \ndiv span {\ \n font-weight: bold;\ \n /* yet another comment that should be preserved */\ \n display: inline-block;\ \n}\ \ndiv span a {\ \n text-decoration: none; /* where will this comment go? */\ \n color: green;\ \n /* what about this comment? */\ \n border: 1px bloo blee red;\ \n}\ \ndiv empty not_empty {\ \n blah: blah;\ \n bloo: bloo;\ \n}\ \ndiv p { /* comment after open brace goes in */\ \n padding: 10px 8%;\ \n -webkit-box-sizing: hux;\ \n}\ \ndiv h1 {\ \n color: \"a \'red\' and \\\"blue\\\" value\";\ \n}\ \n/* last comment, top level again --\ \n compare the indentation! */\ \ndiv {\ \n f: g;\ \n}\ \ndiv empty span {\ \n a: b;\ \n}\ \ndiv empty_with_comment {\ \n /* hey now */\ \n}\ \ndiv empty_with_comment span {\ \n c: d;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t07_nested_simple_selector_groups.rs000066400000000000000000000035221474765622100314770ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/07_nested_simple_selector_groups.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("07_nested_simple_selector_groups") } #[test] fn test() { assert_eq!( runner().ok( "a, b {\ \n color: red;\ \n background: blue;\ \n}\n\ \nc, d {\ \n color: gray;\ \n e, f {\ \n background: blue;\ \n padding: 10px 5px;\ \n }\ \n g, h {\ \n blah: blah;\ \n bloo: bloo;\ \n }\ \n i, j {\ \n foo: goo;\ \n k, l {\ \n m, n, o {\ \n wow: we are far inside;\ \n but: it still works;\ \n }\ \n hoo: boo;\ \n }\ \n }\ \n}" ), "a, b {\ \n color: red;\ \n background: blue;\ \n}\ \nc, d {\ \n color: gray;\ \n}\ \nc e, c f, d e, d f {\ \n background: blue;\ \n padding: 10px 5px;\ \n}\ \nc g, c h, d g, d h {\ \n blah: blah;\ \n bloo: bloo;\ \n}\ \nc i, c j, d i, d j {\ \n foo: goo;\ \n}\ \nc i k, c i l, c j k, c j l, d i k, d i l, d j k, d j l {\ \n hoo: boo;\ \n}\ \nc i k m, c i k n, c i k o, c i l m, c i l n, c i l o, c j k m, c j k n, c j k o, c j l m, c j l n, c j l o, d i k m, d i k n, d i k o, d i l m, d i l n, d i l o, d j k m, d j k n, d j k o, d j l m, d j l n, d j l o {\ \n wow: we are far inside;\ \n but: it still works;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t08_selector_combinators.rs000066400000000000000000000012651474765622100275700ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/08_selector_combinators.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("08_selector_combinators") } #[test] fn test() { assert_eq!( runner().ok("a + b > c {\ \n d e {\ \n color: blue;\ \n background: white;\ \n }\ \n color: red;\ \n background: gray;\ \n}"), "a + b > c {\ \n color: red;\ \n background: gray;\ \n}\ \na + b > c d e {\ \n color: blue;\ \n background: white;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t09_selector_groups_and_combinators.rs000066400000000000000000000013521474765622100320070ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/09_selector_groups_and_combinators.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("09_selector_groups_and_combinators") } #[test] fn test() { assert_eq!( runner().ok("a + b, c {\ \n blah: blah;\ \n bleh: bleh;\ \n d e, f ~ g + h, > i {\ \n bloo: bloo;\ \n blee: blee;\ \n }\ \n}"), "a + b, c {\ \n blah: blah;\ \n bleh: bleh;\ \n}\ \na + b d e, a + b f ~ g + h, a + b > i, c d e, c f ~ g + h, c > i {\ \n bloo: bloo;\ \n blee: blee;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t10_classes_and_ids.rs000066400000000000000000000014401474765622100264520ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/10_classes_and_ids.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("10_classes_and_ids") } #[test] fn test() { assert_eq!( runner().ok( "a + b, .class {\ \n blah: blah;\ \n bleh: bleh;\ \n d #id, f ~ g.other + h, > i#grar {\ \n bloo: bloo;\ \n blee: blee;\ \n }\ \n}" ), "a + b, .class {\ \n blah: blah;\ \n bleh: bleh;\ \n}\ \na + b d #id, a + b f ~ g.other + h, a + b > i#grar, .class d #id, .class f ~ g.other + h, .class > i#grar {\ \n bloo: bloo;\ \n blee: blee;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t11_attribute_selectors.rs000066400000000000000000000011611474765622100274230ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/11_attribute_selectors.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("11_attribute_selectors") } #[test] fn test() { assert_eq!( runner().ok("[hey = \'ho\'], a > b {\ \n blah: blah;\ \n c, [hoo *= \"ha\" ] {\ \n bloo: bloo;\ \n }\ \n}"), "[hey=ho], a > b {\ \n blah: blah;\ \n}\ \n[hey=ho] c, [hey=ho] [hoo*=ha], a > b c, a > b [hoo*=ha] {\ \n bloo: bloo;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t12_pseudo_classes_and_elements.rs000066400000000000000000000027421474765622100310760ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/12_pseudo_classes_and_elements.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("12_pseudo_classes_and_elements") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok( "a b {\ \n color: red;\ \n :first-child, :nth-of-type( -2n+1 ) {\ \n .foo#bar:nth-child(even) {\ \n hoo: goo;\ \n }\ \n blah: bloo;\ \n ::after {\ \n content: \"glux\";\ \n color: green;\ \n }\ \n :not(.foo) {\ \n hoo: boo;\ \n }\ \n a { b: c; }\ \n }\ \n}" ), "a b {\ \n color: red;\ \n}\ \na b :first-child, a b :nth-of-type(-2n+1) {\ \n blah: bloo;\ \n}\ \na b :first-child .foo#bar:nth-child(even), a b :nth-of-type(-2n+1) .foo#bar:nth-child(even) {\ \n hoo: goo;\ \n}\ \na b :first-child ::after, a b :nth-of-type(-2n+1) ::after {\ \n content: \"glux\";\ \n color: green;\ \n}\ \na b :first-child :not(.foo), a b :nth-of-type(-2n+1) :not(.foo) {\ \n hoo: boo;\ \n}\ \na b :first-child a, a b :nth-of-type(-2n+1) a {\ \n b: c;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t13_back_references.rs000066400000000000000000000011011474765622100264320ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/13_back_references.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("13_back_references") } #[test] fn test() { assert_eq!( runner().ok("hey, ho {\ \n & > boo, foo &.goo {\ \n bloo: bloo;\ \n }\ \n blah: blah;\ \n}"), "hey, ho {\ \n blah: blah;\ \n}\ \nhey > boo, foo hey.goo, ho > boo, foo ho.goo {\ \n bloo: bloo;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t14_imports.rs000066400000000000000000000025561474765622100250460ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/14_imports.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("14_imports") .mock_file("a.scss", "div {\n span {\n moo: goo;\n }\n}\n\n$x: boo;") .mock_file("b.scss", "hoo {\n mux: scooba-dee-doo;\n flux: gooboo $x;\n @import \"d.scss\";\n}") .mock_file("d.scss", "d {\n inside: d now;\n}") .mock_file("sub/c.scss", "blux {\n hey: another thing;\n ho: will this work;\n}") } #[test] fn test() { assert_eq!( runner().ok("@import \"a.scss\";\n\ \nfoo {\ \n blah: blah;\ \n goo {\ \n blee: blee;\ \n @import \"../14_imports/b.scss\";\ \n hello: world;\ \n }\ \n @import \"sub/c.scss\";\ \n}"), "div span {\ \n moo: goo;\ \n}\ \nfoo {\ \n blah: blah;\ \n}\ \nfoo goo {\ \n blee: blee;\ \n hello: world;\ \n}\ \nfoo goo hoo {\ \n mux: scooba-dee-doo;\ \n flux: gooboo boo;\ \n}\ \nfoo goo hoo d {\ \n inside: d now;\ \n}\ \nfoo blux {\ \n hey: another thing;\ \n ho: will this work;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t15_arithmetic_and_lists.rs000066400000000000000000000054651474765622100275450ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/15_arithmetic_and_lists.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("15_arithmetic_and_lists") } #[test] fn test() { assert_eq!( runner().ok( "$stuff: 1 2 3;\n\ \n$three: 3;\n\ \ndiv {\ \n a: 1 + 2;\ \n b: 3 + 3/4;\ \n c: 1/2 + 1/2;\ \n /* shouldn\'t eval the following \"300\" */\ \n d: 300;\ \n /* increasingly jacked-up edge cases that combine arithmetic with lists */\ \n e: 1 + (5/10 2 3);\ \n f: 1 + ((2+(3 4) 5) 6);\ \n g: 1 + ((1+(14/7 8) 9) 6);\ \n /* shouldn\'t perform the following division */\ \n h: 15 / 3 / 5;\ \n /* should perform the following division now */\ \n i: (15 / 3 / 5);\ \n /* this too */\ \n j: (15 / 3) / 5;\ \n /* and this */\ \n k: 15 / $three;\ \n l: 15 / 5 / $three;\ \n m: 1/2, $stuff url(\"www.foo.com/blah.png\") blah blah;\ \n n: 1 2 3, $stuff 4 5 (6, 7 8 9);\ \n o: 3px + 3px + 3px;\ \n p: 4 + 1px;\ \n q: (20pt / 10pt);\ \n r: 16em * 4;\ \n s: (5em / 2);\ \n t: 1 + (2 + (3/4 + (4/5 6/7)));\n\ \n // Arithmetic operations in Sass should never fail, since we implicitly use\ \n // floating-point for all numbers.\ \n one-over-zero: (1 / 0);\ \n zero-over-zero: (0 / 0);\ \n one-mod-zero: 1 % 0;\ \n zero-mod-zero: 0 % 0;\ \n}\n" ), "div {\ \n a: 3;\ \n b: 3.75;\ \n c: 1;\ \n /* shouldn\'t eval the following \"300\" */\ \n d: 300;\ \n /* increasingly jacked-up edge cases that combine arithmetic with lists */\ \n e: 15/10 2 3;\ \n f: 123 4 5 6;\ \n g: 1114/7 8 9 6;\ \n /* shouldn\'t perform the following division */\ \n h: 15/3/5;\ \n /* should perform the following division now */\ \n i: 1;\ \n /* this too */\ \n j: 1;\ \n /* and this */\ \n k: 5;\ \n l: 1;\ \n m: 1/2, 1 2 3 url(\"www.foo.com/blah.png\") blah blah;\ \n n: 1 2 3, 1 2 3 4 5 6, 7 8 9;\ \n o: 9px;\ \n p: 5px;\ \n q: 2;\ \n r: 64em;\ \n s: 2.5em;\ \n t: 120.754/5 6/7;\ \n one-over-zero: calc(infinity);\ \n zero-over-zero: calc(NaN);\ \n one-mod-zero: calc(NaN);\ \n zero-mod-zero: calc(NaN);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t17_basic_mixins.rs000066400000000000000000000034151474765622100260170ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/17_basic_mixins.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("17_basic_mixins") } #[test] fn test() { assert_eq!( runner().ok("@mixin foo($x, $y) {\ \n hugabug: $y $x;\ \n}\n\ \n@mixin bar($a, $b: flug) {\ \n flugablug: $a $b glug;\ \n}\n\ \n@mixin hux() {\ \n no: parameters here;\ \n div, span {\ \n some: nested stuff;\ \n foo, bar {\ \n more: stuff so forth;\ \n blah: blah;\ \n }\ \n }\ \n /* end of hux */\ \n}\n\ \na {\ \n hey: ho;\ \n @include foo(second, third);\ \n @include foo($y: kwd-y, $x: kwd-x);\ \n goo: boo hoo;\ \n @include hux;\ \n @include bar(pug);\ \n @include bar(pug, mug);\ \n}\n\n\ \n$x: from a variable;\n\ \ndiv {\ \n blah: blah $x blah;\ \n}"), "a {\ \n hey: ho;\ \n hugabug: third second;\ \n hugabug: kwd-y kwd-x;\ \n goo: boo hoo;\ \n no: parameters here;\ \n /* end of hux */\ \n flugablug: pug flug glug;\ \n flugablug: pug mug glug;\ \n}\ \na div, a span {\ \n some: nested stuff;\ \n}\ \na div foo, a div bar, a span foo, a span bar {\ \n more: stuff so forth;\ \n blah: blah;\ \n}\ \ndiv {\ \n blah: blah from a variable blah;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t18_mixin_scope.rs000066400000000000000000000021571474765622100256670ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/18_mixin_scope.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("18_mixin_scope") } #[test] fn test() { assert_eq!( runner().ok("$x: global x;\ \n$y: global y;\n\ \n@mixin foo($x) {\ \n f-a: $x;\ \n f-b: $y;\ \n $x: local x changed by foo;\ \n $y: global y changed by foo !global;\ \n $z: new local z;\ \n f-a: $x;\ \n f-b: $y;\ \n f-c: $z;\ \n}\n\ \ndiv {\ \n a: $x;\ \n b: $y;\ \n @include foo(arg);\ \n a: $x;\ \n b: $y;\ \n}\n"), "div {\ \n a: global x;\ \n b: global y;\ \n f-a: arg;\ \n f-b: global y;\ \n f-a: local x changed by foo;\ \n f-b: global y changed by foo;\ \n f-c: new local z;\ \n a: global x;\ \n b: global y changed by foo;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t19_full_mixin_craziness.rs000066400000000000000000000115731474765622100276040ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/19_full_mixin_craziness.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("19_full_mixin_craziness") } #[test] fn test() { assert_eq!( runner().ok( "$x: global-x;\ \n$y: global-y;\ \n$z: global-z;\n\ \n@mixin foo($x, $y) {\ \n /* begin foo */\ \n margin: $x $y;\ \n blip {\ \n hey: now;\ \n }\ \n /* end foo */\ \n}\n\ \n@mixin foogoo($x, $y, $z) {\ \n margin: $x $y $z;\ \n}\n\ \n@mixin hux($y) {\ \n /* begin hux */\ \n color: $y;\ \n @include foo(called-from-hux, $y: $y);\ \n /* end hux */\ \n}\n\ \ndiv {\ \n @include foo(1, 2);\ \n @include foo(1, 3);\ \n @include foogoo(1, 2, $z: zee);\ \n @include foogoo(1, $y /* blah */ : kwd-y, $z: kwd-z);\ \n}\n\ \ndiv {\ \n @include hux($y: $y);\ \n}\n\ \n$y: different-global-y;\n\ \ndiv {\ \n @include hux(calling-hux-again);\ \n}\n\ \n@mixin bung() {\ \n blah: original-bung;\ \n}\n\ \ndiv {\ \n @include bung();\ \n}\n\ \n@mixin bung() {\ \n blah: redefined-bung;\ \n}\n\ \ndiv {\ \n @include bung();\ \n}\n\ \ndiv {\ \n /* calls to nullary mixins may omit the empty argument list */\ \n @include bung;\ \n}\n\ \ndiv {\ \n @include foo($x: kwdarg1, $y: kwdarg2);\ \n}\n\ \n@mixin ruleset() {\ \n hoo {\ \n color: boo;\ \n }\ \n}\n\ \n@include ruleset();\n\ \n$da: default argument;\n\ \n@mixin default_args($x, $y: $da) {\ \n blah: $x $y;\ \n}\ \n$da: some other default;\n\ \ndiv {\ \n @include default_args(boogoo);\ \n}\n\ \n@mixin original() {\ \n value: original;\ \n}\n\ \ndiv {\ \n @include original();\ \n}\n\ \n@mixin original() {\ \n value: no longer original;\ \n}\n\ \ndiv {\ \n @include original();\ \n}\n\ \n@mixin set-x($x) {\ \n $x: changed local x;\ \n arg: $x;\ \n $y: changed global y !global;\ \n blarg: $y;\ \n}\n\ \ndiv {\ \n @include set-x(blah);\ \n a: $x;\ \n b: $y;\ \n}\n" ), "div {\ \n /* begin foo */\ \n margin: 1 2;\ \n /* end foo */\ \n /* begin foo */\ \n margin: 1 3;\ \n /* end foo */\ \n margin: 1 2 zee;\ \n margin: 1 kwd-y kwd-z;\ \n}\ \ndiv blip {\ \n hey: now;\ \n}\ \ndiv blip {\ \n hey: now;\ \n}\ \ndiv {\ \n /* begin hux */\ \n color: global-y;\ \n /* begin foo */\ \n margin: called-from-hux global-y;\ \n /* end foo */\ \n /* end hux */\ \n}\ \ndiv blip {\ \n hey: now;\ \n}\ \ndiv {\ \n /* begin hux */\ \n color: calling-hux-again;\ \n /* begin foo */\ \n margin: called-from-hux calling-hux-again;\ \n /* end foo */\ \n /* end hux */\ \n}\ \ndiv blip {\ \n hey: now;\ \n}\ \ndiv {\ \n blah: original-bung;\ \n}\ \ndiv {\ \n blah: redefined-bung;\ \n}\ \ndiv {\ \n /* calls to nullary mixins may omit the empty argument list */\ \n blah: redefined-bung;\ \n}\ \ndiv {\ \n /* begin foo */\ \n margin: kwdarg1 kwdarg2;\ \n /* end foo */\ \n}\ \ndiv blip {\ \n hey: now;\ \n}\ \nhoo {\ \n color: boo;\ \n}\ \ndiv {\ \n blah: boogoo some other default;\ \n}\ \ndiv {\ \n value: original;\ \n}\ \ndiv {\ \n value: no longer original;\ \n}\ \ndiv {\ \n arg: changed local x;\ \n blarg: changed global y;\ \n a: global-x;\ \n b: changed global y;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t20_scoped_variables.rs000066400000000000000000000020041474765622100266370ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/20_scoped_variables.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("20_scoped_variables") } #[test] fn test() { assert_eq!( runner().ok("@mixin foo() {\ \n /* begin foo */\ \n /* assigning to $x */\ \n $x: inside foo;\ \n x: $x;\ \n /* end foo */\ \n}\n\ \nouter {\ \n /* assigning to $x */\ \n $x: inside outer scope;\ \n blah: blah;\ \n inner {\ \n @include foo();\ \n x: $x;\ \n }\ \n}"), "outer {\ \n /* assigning to $x */\ \n blah: blah;\ \n}\ \nouter inner {\ \n /* begin foo */\ \n /* assigning to $x */\ \n x: inside foo;\ \n /* end foo */\ \n x: inside outer scope;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t21_one_builtin_function.rs000066400000000000000000000010121474765622100275450ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/21_one_builtin_function.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("21_one_builtin_function") } #[test] fn test() { assert_eq!( runner().ok("div {\ \n color: rgb(255, $blue: 0, $green: 255);\ \n background: rgb(123, 45, 6);\ \n}\n"), "div {\ \n color: rgb(255, 255, 0);\ \n background: rgb(123, 45, 6);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t22_colors_with_alpha.rs000066400000000000000000000027151474765622100270460ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/22_colors_with_alpha.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("22_colors_with_alpha") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:color\";\ \n$x: rgb(0, 255, 255);\n\ \ndiv {\ \n color: rgb(255, $blue: 0, $green: 255);\ \n background: rgb(123, 45, 6);\ \n grah: rgba(#f0e, $alpha: .5);\ \n blah: rgba(1,2,3,.6);\ \n \ \n floo: $x;\ \n bloo: rgba($x, 0.7);\ \n groo: $x;\ \n \ \n $x: rgb(123, 45, 6);\ \n \ \n hoo: color.red($x);\ \n moo: color.green($x);\ \n poo: color.blue($x);\ \n \ \n goo: color.mix(rgba(255, 0, 0, 0.5), #00f);\ \n \ \n boo: color.invert(#123456);\ \n}\n"), "div {\ \n color: rgb(255, 255, 0);\ \n background: rgb(123, 45, 6);\ \n grah: rgba(255, 0, 238, 0.5);\ \n blah: rgba(1, 2, 3, 0.6);\ \n floo: rgb(0, 255, 255);\ \n bloo: rgba(0, 255, 255, 0.7);\ \n groo: rgb(0, 255, 255);\ \n hoo: 123;\ \n moo: 45;\ \n poo: 6;\ \n goo: rgba(63.75, 0, 191.25, 0.75);\ \n boo: #edcba9;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t23_basic_value_interpolation.rs000066400000000000000000000013661474765622100305730ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/23_basic_value_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("23_basic_value_interpolation") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:meta\";\ \ndiv {\ \n a: hello#{world};\ \n a: hello #{world};\ \n b: 12#{3};\ \n b: meta.type-of(12#{3});\ \n b: #{12 + 111};\ \n b: meta.type-of(#{12 + 111});\ \n}"), "div {\ \n a: helloworld;\ \n a: hello world;\ \n b: 12 3;\ \n b: list;\ \n b: 123;\ \n b: string;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t24_namespace_properties.rs000066400000000000000000000023751474765622100275610ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/24_namespace_properties.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("24_namespace_properties") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:meta\";\ \ndiv {\ \n a: {\ \n p1: q;\ \n b: {\ \n p2: q;\ \n }\ \n p3: q;\ \n }\ \n}\n\ \nfoo {\ \n bar: baz {\ \n bip: bop;\ \n bing: meta.type-of(\"hello\");\ \n bang: 1 + 2;\ \n bung: bap;\ \n bong: bup {\ \n x: x;\ \n y: y;\ \n z: z;\ \n }\ \n }\ \n}\n"), "div {\ \n a-p1: q;\ \n a-b-p2: q;\ \n a-p3: q;\ \n}\ \nfoo {\ \n bar: baz;\ \n bar-bip: bop;\ \n bar-bing: string;\ \n bar-bang: 3;\ \n bar-bung: bap;\ \n bar-bong: bup;\ \n bar-bong-x: x;\ \n bar-bong-y: y;\ \n bar-bong-z: z;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t25_basic_string_interpolation.rs000066400000000000000000000010371474765622100307620ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/25_basic_string_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("25_basic_string_interpolation") } #[test] fn test() { assert_eq!( runner().ok( "@use \"sass:math\";\ \ndiv {\ \n blah: \"hello #{2+2} world #{math.unit(23px)} #{\'bloo\\n\'} blah\";\ \n}" ), "div {\ \n blah: \"hello 4 world px bloon blah\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t26_selector_interpolation.rs000066400000000000000000000015751474765622100301430ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/26_selector_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("26_selector_interpolation") } #[test] fn test() { assert_eq!( runner().ok( "@use \"sass:list\";\ \n$x: oo, ba;\ \n$y: az, hu;\n\ \nf#{$x}r {\ \n p: 1;\ \n b#{$y}x {\ \n q: 2;\ \n mumble#{list.length($x) + list.length($y)} {\ \n r: 3;\ \n }\ \n }\ \n}" ), "foo, bar {\ \n p: 1;\ \n}\ \nfoo baz, foo hux, bar baz, bar hux {\ \n q: 2;\ \n}\ \nfoo baz mumble4, foo hux mumble4, bar baz mumble4, bar hux mumble4 {\ \n r: 3;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t27_media_queries.rs000066400000000000000000000022601474765622100261610ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/27_media_queries.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("27_media_queries") } #[test] fn test() { assert_eq!( runner().ok( "a b c {\ \n blee: blee;\ \n d e f {\ \n blah: blah;\ \n bloo: bloo;\ \n }\ \n g h, i j {\ \n @media print and (foo: 1 2 3), (bar: 3px hux(muz)), not screen {\ \n hey: ho;\ \n k l m {\ \n hee: fee;\ \n }\ \n }\ \n }\ \n blah: blah;\ \n}\n\n\n" ), "a b c {\ \n blee: blee;\ \n blah: blah;\ \n}\ \na b c d e f {\ \n blah: blah;\ \n bloo: bloo;\ \n}\ \n@media print and (foo: 1 2 3), (bar: 3px hux(muz)), not screen {\ \n a b c g h, a b c i j {\ \n hey: ho;\ \n }\ \n a b c g h k l m, a b c i j k l m {\ \n hee: fee;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t28_url.rs000066400000000000000000000047201474765622100241530ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/28_url.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("28_url") } #[test] fn test() { assert_eq!( runner().ok( "$x: pop;\ \n$y: 123;\n\n\n\ \ndiv {\ \n foo: url(bloo/blah.css);\ \n bar: url(http://foo/bar/hux.css);\ \n foo: url(fudge#{$x}.css);\ \n bar: url(\"http://fudge#{$x}/styles.css\");\ \n hux: url(http://box_#{$y}////fudge#{$x}.css);\ \n @each $i in (1 2 3 4 5) {\ \n hux: url(http://box_#{$y}////fudge#{$x}.css);\ \n foo: url(http://blah.com/bar-#{$i}.css);\ \n bar: url(http://fonts.googleapis.com/css?family=Karla:400,700,400italic|Anonymous+Pro:400,700,400italic);\ \n }\ \n gloo: url(\"hey#{1+2}.css\");\ \n floo: url(hadoop-#{$y+321}.css);\ \n}\n" ), "div {\ \n foo: url(bloo/blah.css);\ \n bar: url(http://foo/bar/hux.css);\ \n foo: url(fudgepop.css);\ \n bar: url(\"http://fudgepop/styles.css\");\ \n hux: url(http://box_123////fudgepop.css);\ \n hux: url(http://box_123////fudgepop.css);\ \n foo: url(http://blah.com/bar-1.css);\ \n bar: url(http://fonts.googleapis.com/css?family=Karla:400,700,400italic|Anonymous+Pro:400,700,400italic);\ \n hux: url(http://box_123////fudgepop.css);\ \n foo: url(http://blah.com/bar-2.css);\ \n bar: url(http://fonts.googleapis.com/css?family=Karla:400,700,400italic|Anonymous+Pro:400,700,400italic);\ \n hux: url(http://box_123////fudgepop.css);\ \n foo: url(http://blah.com/bar-3.css);\ \n bar: url(http://fonts.googleapis.com/css?family=Karla:400,700,400italic|Anonymous+Pro:400,700,400italic);\ \n hux: url(http://box_123////fudgepop.css);\ \n foo: url(http://blah.com/bar-4.css);\ \n bar: url(http://fonts.googleapis.com/css?family=Karla:400,700,400italic|Anonymous+Pro:400,700,400italic);\ \n hux: url(http://box_123////fudgepop.css);\ \n foo: url(http://blah.com/bar-5.css);\ \n bar: url(http://fonts.googleapis.com/css?family=Karla:400,700,400italic|Anonymous+Pro:400,700,400italic);\ \n gloo: url(\"hey3.css\");\ \n floo: url(hadoop-444.css);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t29_if.rs000066400000000000000000000026731474765622100237550ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/29_if.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("29_if") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:list\";\ \n@use \"sass:meta\";\ \n$x: a, b, 1+2;\n\ \n@if meta.type-of(list.nth($x, 3)) == number {\ \n div {\ \n background: gray;\ \n }\ \n}\n\ \n@if meta.type-of(list.nth($x, 2)) == number {\ \n div {\ \n background: gray;\ \n }\ \n}\ \n@else if meta.type-of(list.nth($x, 2)) == string {\ \n div {\ \n background: blue;\ \n }\ \n}\n\ \n@if meta.type-of(list.nth($x, 2)) == number {\ \n div {\ \n background: gray;\ \n }\ \n}\ \n@else if meta.type-of(list.nth($x, 2)) == color {\ \n div {\ \n background: blue;\ \n }\ \n}\ \n@else {\ \n div {\ \n background: red;\ \n }\ \n}"), "div {\ \n background: gray;\ \n}\ \ndiv {\ \n background: blue;\ \n}\ \ndiv {\ \n background: red;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t30_if_in_function.rs000066400000000000000000000017561474765622100263410ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/30_if_in_function.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("30_if_in_function") } #[test] fn test() { assert_eq!( runner().ok("$x: true;\n\ \n@function foobar() {\ \n @if $x {\ \n $x: false !global;\ \n @return foo;\ \n }\ \n @else {\ \n $x: true !global;\ \n @return bar;\ \n }\ \n}\n\ \ndiv {\ \n content: foobar();\ \n content: foobar();\ \n content: foobar();\ \n content: foobar();\ \n $x: false !global;\ \n content: foobar();\ \n}\n"), "div {\ \n content: foo;\ \n content: bar;\ \n content: foo;\ \n content: bar;\ \n content: bar;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t31_if_in_mixin.rs000066400000000000000000000016451474765622100256360ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/31_if_in_mixin.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("31_if_in_mixin") } #[test] fn test() { assert_eq!( runner().ok("$x: true;\n\ \n@mixin foobar() {\ \n @if $x {\ \n $x: false !global;\ \n content: foo;\ \n }\ \n @else {\ \n $x: true !global;\ \n content: bar;\ \n }\ \n}\n\ \ndiv {\ \n @include foobar();\ \n @include foobar();\ \n @include foobar();\ \n $x: true !global;\ \n @include foobar();\ \n}\n"), "div {\ \n content: foo;\ \n content: bar;\ \n content: foo;\ \n content: foo;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t32_percentages.rs000066400000000000000000000017041474765622100256430ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/32_percentages.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("32_percentages") } #[test] fn test() { assert_eq!( runner().ok("div {\ \n width: 10% + 20%;\ \n height: 10% - 20%;\ \n width: 10% + 10;\ \n width: 10 + 10%;\ \n height: 10% - 10;\ \n height: 10 - 10%;\ \n blah: (20% / 4%);\ \n flah: 12 * 75%;\ \n grah: 75% * 12;\ \n // hwah: (24 / 8%);\ \n nyah: (35% / 7);\ \n}"), "div {\ \n width: 30%;\ \n height: -10%;\ \n width: 20%;\ \n width: 20%;\ \n height: 0%;\ \n height: 0%;\ \n blah: 5;\ \n flah: 900%;\ \n grah: 900%;\ \n nyah: 5%;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t33_ambiguous_imports.rs000066400000000000000000000015021474765622100271100ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/33_ambiguous_imports.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("33_ambiguous_imports") .mock_file("blir/_fudge.scss", "fudge {\n color: brown;\n}") .mock_file("dir.scss", "@use \"sass:meta\";\ndir {\n color: blue;\n}\n\n@include meta.load-css(\"blir/fudge\");") .mock_file("dir/whatever", "") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:meta\";\ \nmain {\ \n color: red;\ \n}\n\ \n@include meta.load-css(\"dir\");"), "main {\ \n color: red;\ \n}\ \ndir {\ \n color: blue;\ \n}\ \nfudge {\ \n color: brown;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t35_varargs_false.rs000066400000000000000000000011551474765622100261650ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/35_varargs_false.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("35_varargs_false") } #[test] fn test() { assert_eq!( runner().ok("@mixin foo($args...) {\ \n @each $arg in $args {\ \n @if $arg {\ \n thing: $arg;\ \n }\ \n }\ \n}\n\ \ndiv {\ \n @include foo(a, b, false);\ \n}\n"), "div {\ \n thing: a;\ \n thing: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t36_extra_commas_in_selectors.rs000066400000000000000000000006421474765622100306020ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/36_extra_commas_in_selectors.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("36_extra_commas_in_selectors") } #[test] fn test() { assert_eq!( runner().ok("div,, , span, ,, {\ \n color: red;\ \n}"), "div, span {\ \n color: red;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t37_url_expressions.rs000066400000000000000000000017231474765622100266150ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/37_url_expressions.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("37_url_expressions") } #[test] fn test() { assert_eq!( runner().ok("$x: true;\ \n$file-1x: \"budge.png\";\n\ \n@function fudge($str) {\ \n @return \"assets/fudge/\" + $str;\ \n}\n\ \ndiv {\ \n blah: url(foo + bar);\ \n blah: url(fn(\"s\"));\ \n blah: url(if(true, \"red.png\", \"blue.png\"));\ \n blah: url(hello-#{world}.png);\ \n blah: url(if($x, fudge(\"#{$file-1x}\"), \"#{$file-1x}\"));\ \n}"), "div {\ \n blah: url(foobar);\ \n blah: url(fn(\"s\"));\ \n blah: url(\"red.png\");\ \n blah: url(hello-world.png);\ \n blah: url(\"assets/fudge/budge.png\");\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t38_expressions_in_at_directives.rs000066400000000000000000000011031474765622100313170ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/38_expressions_in_at_directives.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("38_expressions_in_at_directives") } #[test] fn test() { assert_eq!( runner().ok("$x: 1;\ \n$y: 2;\n\ \n@foo $x $y, hux {\ \n bar {\ \n whatever: whatever;\ \n }\ \n}\n"), "@foo $x $y, hux {\ \n bar {\ \n whatever: whatever;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t39_dash_match_attribute_selector.rs000066400000000000000000000006671474765622100314370ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/39_dash_match_attribute_selector.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("39_dash_match_attribute_selector") } #[test] fn test() { assert_eq!( runner().ok("div[class|=\"blah\"] {\ \n color: blue;\ \n}"), "div[class|=blah] {\ \n color: blue;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t40_pseudo_class_identifier_starting_with_n.rs000066400000000000000000000006771474765622100335230ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/40_pseudo_class_identifier_starting_with_n.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("40_pseudo_class_identifier_starting_with_n") } #[test] fn test() { assert_eq!( runner().ok("div:lang(nb) {\ \n color: blue;\ \n}"), "div:lang(nb) {\ \n color: blue;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t41_slashy_urls.rs000066400000000000000000000010051474765622100257050ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/41_slashy_urls.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("41_slashy_urls") } #[test] fn test() { assert_eq!( runner().ok("div {\ \n blah: url(//some/absolute/path);\ \n blee: url(/*looks-like-a*/comment);\ \n}"), "div {\ \n blah: url(//some/absolute/path);\ \n blee: url(/*looks-like-a*/comment);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t42_css_imports.rs000066400000000000000000000013331474765622100257070ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/42_css_imports.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("42_css_imports") } #[test] fn test() { assert_eq!( runner().ok("div {\ \n color: red;\ \n}\n\ \n@import \"hux\\ bux.css\";\ \n@import \"foo.css\";\n\ \nspan {\ \n color: blue;\ \n}\n\ \n@import \"bar.css\";"), "@import \"hux\\ bux.css\";\ \n@import \"foo.css\";\ \n@import \"bar.css\";\ \ndiv {\ \n color: red;\ \n}\ \nspan {\ \n color: blue;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t44_bem_selectors.rs000066400000000000000000000016211474765622100261720ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/44_bem_selectors.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("44_bem_selectors") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok("div {\n\ \n &_foo {\ \n blah: blah;\ \n }\ \n &--modifier {\ \n blach: blah;\ \n }\ \n &hux {\ \n blah: blah;\ \n }\ \n &div.foo#bar[hux] {\ \n blah: blah;\ \n }\n\ \n}"), "div_foo {\ \n blah: blah;\ \n}\ \ndiv--modifier {\ \n blach: blah;\ \n}\ \ndivhux {\ \n blah: blah;\ \n}\ \ndivdiv.foo#bar[hux] {\ \n blah: blah;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t49_interpolants_in_css_imports.rs000066400000000000000000000013111474765622100312020ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/49_interpolants_in_css_imports.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("49_interpolants_in_css_imports") } #[test] fn test() { assert_eq!( runner().ok( "$google-protocol: \"http\"; // choose http or https\ \n$google-webfont: \"Open+Sans:400italic,700italic,400,700|Oswald\"; // pull string after ?family= from step 3\n\ \n@import url(\"#{$google-protocol}://fonts.googleapis.com/css?family=#{$google-webfont}\");" ), "@import url(\"http://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700|Oswald\");\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t50_wrapped_pseudo_selectors.rs000066400000000000000000000022231474765622100304440ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/50_wrapped_pseudo_selectors.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("50_wrapped_pseudo_selectors") } #[test] fn test() { assert_eq!( runner().ok( "div {\ \n :-moz-any(ol p.blah, ul, menu, dir) :-moz-any(ol span + h1, ul, menu, dir) ul {\ \n list-style-type: square;\ \n }\ \n :-moz-any(ol span + h1, ul, menu, dir) ul {\ \n list-style-type: square;\ \n }\ \n :foo(p div) {\ \n hi: hi;\ \n }\ \n :foo(ol) {\ \n hi: hi;\ \n }\ \n}\n" ), "div :-moz-any(ol p.blah, ul, menu, dir) :-moz-any(ol span + h1, ul, menu, dir) ul {\ \n list-style-type: square;\ \n}\ \ndiv :-moz-any(ol span + h1, ul, menu, dir) ul {\ \n list-style-type: square;\ \n}\ \ndiv :foo(p div) {\ \n hi: hi;\ \n}\ \ndiv :foo(ol) {\ \n hi: hi;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t51_trailing_commas_in_list.rs000066400000000000000000000013561474765622100302400ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/51_trailing_commas_in_list.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("51_trailing_commas_in_list") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:list\";\ \n@use \"sass:meta\";\ \n$mylist: (alpha, beta, gamma, );\ \n$my-single-item-list: (alpha,);\ \n.test { \ \n out1: list.length($mylist);\ \n blah: meta.type-of(list.nth($mylist,3));\ \n out: list.length($my-single-item-list); \ \n}"), ".test {\ \n out1: 3;\ \n blah: string;\ \n out: 1;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t52_interchangeable_hyphens_underscores.rs000066400000000000000000000044261474765622100326360ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/52_interchangeable_hyphens_underscores.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("52_interchangeable_hyphens_underscores") } #[test] fn test() { assert_eq!( runner().ok("$my-cool-var: \"hello\";\ \n@mixin my-cool-mixin($yada-yada) {\ \n blah: blah;\ \n hi: $yada_yada;\ \n}\ \n@function my-cool-function($cool_arg) {\ \n @return $cool-arg;\ \n}\n\ \ndiv {\ \n @include my_cool-mixin($yada_yada: \"hi\");\ \n @include my_cool-mixin($my_cool-var);\ \n foo: my-cool_function($cool-arg: \"boop\");\ \n foo: my-cool_function($my-cool_var);\ \n bar: $my_cool_var;\ \n}\n\ \n@each $my_cool_var in a, b, c {\ \n div {\ \n color: $my-cool-var;\ \n }\ \n}\n\ \n@for $my_cool_var from 1 to 10 {\ \n div {\ \n color: $my-cool-var;\ \n }\ \n}\n\n\ \n@function blah_blah() {\ \n @return blah;\ \n}\n\ \ndiv {\ \n foo: blah-blah();\ \n}"), "div {\ \n blah: blah;\ \n hi: \"hi\";\ \n blah: blah;\ \n hi: \"hello\";\ \n foo: \"boop\";\ \n foo: \"hello\";\ \n bar: \"hello\";\ \n}\ \ndiv {\ \n color: a;\ \n}\ \ndiv {\ \n color: b;\ \n}\ \ndiv {\ \n color: c;\ \n}\ \ndiv {\ \n color: 1;\ \n}\ \ndiv {\ \n color: 2;\ \n}\ \ndiv {\ \n color: 3;\ \n}\ \ndiv {\ \n color: 4;\ \n}\ \ndiv {\ \n color: 5;\ \n}\ \ndiv {\ \n color: 6;\ \n}\ \ndiv {\ \n color: 7;\ \n}\ \ndiv {\ \n color: 8;\ \n}\ \ndiv {\ \n color: 9;\ \n}\ \ndiv {\ \n foo: blah;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t53_escaped_quotes.rs000066400000000000000000000036361474765622100263600ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/53_escaped_quotes.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("53_escaped_quotes") } #[test] fn test() { assert_eq!( runner().ok("[data-icon=\'test-1\']:before {\ \n content:\'\\\\\';\ \n}\n\ \n[data-icon=\'test-2\']:before {\ \n content:\'\\\'\';\ \n}\n\ \n[data-icon=\'test-3\']:before {\ \n content:\"\\\"\";\ \n}\n\ \n[data-icon=\'test-4\']:before {\ \n content:\'\\\\\';\ \n}\n\ \n[data-icon=\'test-5\']:before {\ \n content:\'\\\'\';\ \n}\n\ \n[data-icon=\'test-6\']:before {\ \n content:\"\\\"\";\ \n}\n\ \n$open-quote: «;\ \n$close-quote: »;\n\ \n$open-quote: \\201C;\ \n$close-quote: \\201D;\n\ \n.\\E9motion { \ \nblah: hi; }\ \n.\\E9 dition { \ \nblah: hi; }\ \n.\\0000E9dition { \ \nblah: hi; }"), "@charset \"UTF-8\";\ \n[data-icon=test-1]:before {\ \n content: \"\\\\\";\ \n}\ \n[data-icon=test-2]:before {\ \n content: \"\'\";\ \n}\ \n[data-icon=test-3]:before {\ \n content: \'\"\';\ \n}\ \n[data-icon=test-4]:before {\ \n content: \"\\\\\";\ \n}\ \n[data-icon=test-5]:before {\ \n content: \"\'\";\ \n}\ \n[data-icon=test-6]:before {\ \n content: \'\"\';\ \n}\ \n.émotion {\ \n blah: hi;\ \n}\ \n.édition {\ \n blah: hi;\ \n}\ \n.édition {\ \n blah: hi;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t54_adjacent_identifiers_with_hyphens.rs000066400000000000000000000014351474765622100322770ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/54_adjacent_identifiers_with_hyphens.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("54_adjacent_identifiers_with_hyphens") } #[test] fn test() { assert_eq!( runner().ok("input {\ \n outline: 5px auto -webkit-focus-ring-color;\ \n foo: random -hello-this-is-dog;\ \n bar: rando -two-or-more -things-that-start -with-hyphens;\ \n baz: foo - bar;\ \n}"), "input {\ \n outline: 5px auto -webkit-focus-ring-color;\ \n foo: random -hello-this-is-dog;\ \n bar: rando -two-or-more -things-that-start -with-hyphens;\ \n baz: foo-bar;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t55_variable_exists.rs000066400000000000000000000037541474765622100265430ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/55_variable_exists.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("55_variable_exists") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:meta\";\ \n@function exists($name) {\ \n @return meta.variable-exists($name);\ \n}\n\ \n@function f() {\ \n $foo: hi;\ \n @return g();\ \n}\n\ \n@function g() {\ \n @return meta.variable-exists(foo);\ \n}\n\ \ndiv {\ \n foo: meta.variable-exists(x);\ \n foo: meta.variable-exists(\"x\");\n\ \n span {\ \n $x: false;\n\ \n foo: meta.variable-exists(x);\ \n foo: meta.variable-exists(\"x\");\ \n foo: meta.variable-exists(y);\ \n foo: meta.variable-exists(\"y\");\ \n foo: exists(x);\ \n foo: exists(\"x\");\n\ \n p {\ \n foo: meta.variable-exists(x);\ \n foo: meta.variable-exists(\"x\");\ \n foo: exists(x);\ \n foo: exists(\"x\");\ \n foo: meta.variable-exists(y);\ \n foo: meta.variable-exists(\"y\");\ \n foo: f();\ \n $y: blah;\ \n }\ \n }\n\ \n}"), "div {\ \n foo: false;\ \n foo: false;\ \n}\ \ndiv span {\ \n foo: true;\ \n foo: true;\ \n foo: false;\ \n foo: false;\ \n foo: false;\ \n foo: false;\ \n}\ \ndiv span p {\ \n foo: true;\ \n foo: true;\ \n foo: false;\ \n foo: false;\ \n foo: false;\ \n foo: false;\ \n foo: false;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t56_global_variable_exists.rs000066400000000000000000000051021474765622100300510ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/56_global_variable_exists.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("56_global_variable_exists") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:meta\";\ \n@function exists($name) {\ \n @return meta.global-variable-exists($name);\ \n}\n\ \n@function f() {\ \n $foo: hi;\ \n @return g();\ \n}\n\ \n@function g() {\ \n @return meta.global-variable-exists(foo);\ \n}\n\ \n$z: hi;\n\ \ndiv {\ \n foo: meta.global-variable-exists(x); \ \n foo: meta.global-variable-exists(\"x\"); \ \n foo: meta.global-variable-exists(z);\ \n foo: meta.global-variable-exists(\"z\"); \n\ \n span {\ \n $x: false;\n\ \n foo: meta.global-variable-exists(x);\ \n foo: meta.global-variable-exists(\"x\"); \ \n foo: meta.global-variable-exists(y);\ \n foo: meta.global-variable-exists(\"y\"); \n\ \n foo: meta.global-variable-exists(z);\ \n foo: meta.global-variable-exists(\"z\"); \n\ \n p {\ \n foo: meta.global-variable-exists(x);\ \n foo: meta.global-variable-exists(\"x\"); \ \n foo: exists(x);\ \n foo: exists(\"x\"); \ \n foo: meta.global-variable-exists(z);\ \n foo: meta.global-variable-exists(\"z\"); \ \n foo: meta.global-variable-exists(y);\ \n foo: meta.global-variable-exists(\"y\"); \ \n foo: f();\ \n $y: blah;\ \n //TODO: check for shadowing\ \n }\ \n }\n\ \n}\n"), "div {\ \n foo: false;\ \n foo: false;\ \n foo: true;\ \n foo: true;\ \n}\ \ndiv span {\ \n foo: false;\ \n foo: false;\ \n foo: false;\ \n foo: false;\ \n foo: true;\ \n foo: true;\ \n}\ \ndiv span p {\ \n foo: false;\ \n foo: false;\ \n foo: false;\ \n foo: false;\ \n foo: true;\ \n foo: true;\ \n foo: false;\ \n foo: false;\ \n foo: false;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t57_function_exists.rs000066400000000000000000000074671474765622100266120ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/57_function_exists.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("57_function_exists") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:meta\";\ \n@function exists($name) {\ \n @return meta.function-exists($name);\ \n}\n\ \n@function f() {\ \n $foo: hi;\ \n @return g();\ \n}\n\ \n@function g() {\ \n @return meta.function-exists(foo);\ \n}\n\ \n@function h() {\ \n @return meta.function-exists(lighten);\ \n}\n\ \ndiv {\ \n foo: meta.function-exists(lighten); \ \n foo: meta.function-exists(\"lighten\"); \ \n foo: meta.function-exists(exists);\ \n foo: meta.function-exists(\"exists\"); \ \n foo: meta.function-exists(f);\ \n foo: meta.function-exists(\"f\"); \ \n foo: meta.function-exists(g);\ \n foo: meta.function-exists(\"g\"); \ \n foo: meta.function-exists(nope);\ \n foo: meta.function-exists(\"nope\"); \ \n foo: g();\ \n foo: f();\ \n foo: h();\n\n\ \n span {\ \n foo: meta.function-exists(lighten); \ \n foo: meta.function-exists(\"lighten\"); \ \n foo: meta.function-exists(exists);\ \n foo: meta.function-exists(\"exists\"); \ \n foo: meta.function-exists(f);\ \n foo: meta.function-exists(\"f\"); \ \n foo: meta.function-exists(g);\ \n foo: meta.function-exists(\"g\"); \ \n foo: meta.function-exists(nope);\ \n foo: meta.function-exists(\"nope\"); \ \n foo: g();\ \n foo: f();\ \n foo: h();\ \n p {\ \n foo: meta.function-exists(lighten); \ \n foo: meta.function-exists(\"lighten\"); \ \n foo: meta.function-exists(exists);\ \n foo: meta.function-exists(\"exists\"); \ \n foo: meta.function-exists(f);\ \n foo: meta.function-exists(\"f\"); \ \n foo: meta.function-exists(g);\ \n foo: meta.function-exists(\"g\"); \ \n foo: meta.function-exists(nope);\ \n foo: meta.function-exists(\"nope\"); \ \n foo: g();\ \n foo: f();\ \n foo: h();\ \n }\ \n }\n\ \n}\n"), "div {\ \n foo: true;\ \n foo: true;\ \n foo: true;\ \n foo: true;\ \n foo: true;\ \n foo: true;\ \n foo: true;\ \n foo: true;\ \n foo: false;\ \n foo: false;\ \n foo: false;\ \n foo: false;\ \n foo: true;\ \n}\ \ndiv span {\ \n foo: true;\ \n foo: true;\ \n foo: true;\ \n foo: true;\ \n foo: true;\ \n foo: true;\ \n foo: true;\ \n foo: true;\ \n foo: false;\ \n foo: false;\ \n foo: false;\ \n foo: false;\ \n foo: true;\ \n}\ \ndiv span p {\ \n foo: true;\ \n foo: true;\ \n foo: true;\ \n foo: true;\ \n foo: true;\ \n foo: true;\ \n foo: true;\ \n foo: true;\ \n foo: false;\ \n foo: false;\ \n foo: false;\ \n foo: false;\ \n foo: true;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t58_mixin_exists.rs000066400000000000000000000067741474765622100261120ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/58_mixin_exists.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("58_mixin_exists") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:meta\";\ \n@function exists($name) {\ \n @return meta.mixin-exists($name);\ \n}\n\ \n@function f() {\ \n $foo: hi;\ \n @return g();\ \n}\n\ \n@function g() {\ \n @return meta.mixin-exists(foo);\ \n}\n\ \n@function h() {\ \n @return meta.mixin-exists(lighten);\ \n}\n\ \n@mixin red-text { color: red; }\ \n@mixin blue-text { color: red; }\ \n@mixin green-text { color: red; }\n\ \ndiv {\ \n foo: meta.mixin-exists(red-text); \ \n foo: meta.mixin-exists(\"red-text\"); \ \n foo: meta.mixin-exists(blue-text); \ \n foo: meta.mixin-exists(\"blue-text\"); \ \n foo: meta.mixin-exists(green-text); \ \n foo: meta.mixin-exists(\"green-text\"); \ \n foo: meta.mixin-exists(nope);\ \n foo: meta.mixin-exists(\"nope\");\ \n foo: g();\ \n foo: f();\ \n foo: h();\n\n\ \n span {\ \n foo: meta.mixin-exists(red-text); \ \n foo: meta.mixin-exists(\"red-text\"); \ \n foo: meta.mixin-exists(blue-text); \ \n foo: meta.mixin-exists(\"blue-text\"); \ \n foo: meta.mixin-exists(green-text); \ \n foo: meta.mixin-exists(\"green-text\"); \ \n foo: meta.mixin-exists(nope);\ \n foo: meta.mixin-exists(\"nope\");\ \n foo: g();\ \n foo: f();\ \n foo: h();\ \n p {\ \n foo: meta.mixin-exists(red-text); \ \n foo: meta.mixin-exists(\"red-text\"); \ \n foo: meta.mixin-exists(blue-text); \ \n foo: meta.mixin-exists(\"blue-text\"); \ \n foo: meta.mixin-exists(green-text); \ \n foo: meta.mixin-exists(\"green-text\"); \ \n foo: meta.mixin-exists(nope);\ \n foo: meta.mixin-exists(\"nope\");\ \n foo: g();\ \n foo: f();\ \n foo: h();\ \n }\ \n }\n\ \n}"), "div {\ \n foo: true;\ \n foo: true;\ \n foo: true;\ \n foo: true;\ \n foo: true;\ \n foo: true;\ \n foo: false;\ \n foo: false;\ \n foo: false;\ \n foo: false;\ \n foo: false;\ \n}\ \ndiv span {\ \n foo: true;\ \n foo: true;\ \n foo: true;\ \n foo: true;\ \n foo: true;\ \n foo: true;\ \n foo: false;\ \n foo: false;\ \n foo: false;\ \n foo: false;\ \n foo: false;\ \n}\ \ndiv span p {\ \n foo: true;\ \n foo: true;\ \n foo: true;\ \n foo: true;\ \n foo: true;\ \n foo: true;\ \n foo: false;\ \n foo: false;\ \n foo: false;\ \n foo: false;\ \n foo: false;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/basic/t59_if_expression.rs000066400000000000000000000015171474765622100262330ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/basic/59_if_expression.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("59_if_expression") } #[test] fn test() { assert_eq!( runner().ok( "@use \"sass:string\";\ \n$x: 0;\ \n$if-false: whatever;\n\ \ndiv {\ \n foo: if($if-true: hey, $if-false: ho, $condition: true);\ \n foo: if($if-true: hey, $if-false: ho, $condition: false);\ \n foo: if($x != 0, if($x, true, false), string.unquote(\"x is zero\"));\ \n foo: if(false, 1/0, $if-false: $if-false);\ \n}" ), "div {\ \n foo: hey;\ \n foo: ho;\ \n foo: x is zero;\ \n foo: whatever;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/colors/000077500000000000000000000000001474765622100225235ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/colors/basic.rs000066400000000000000000000014561474765622100241600ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/colors/basic.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("basic") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:string\";\ \np {\ \n color: rgb(255, 128, 0);\ \n color: red green blue;\ \n color: (red) (green) (blue);\ \n color: red + hux;\ \n color: string.unquote(\"red\") + green;\ \n foo: rgb(200, 150%, 170%);\ \n}"), "p {\ \n color: rgb(255, 128, 0);\ \n color: red green blue;\ \n color: red green blue;\ \n color: redhux;\ \n color: redgreen;\ \n foo: rgb(200, 255, 255);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/colors/change_color.rs000066400000000000000000000014701474765622100255160ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/colors/change-color.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("change-color") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok( "@use \"sass:color\";\ \np {\ \n color: color.change(#102030, $blue: 5);\ \n color: color.change(#102030, $alpha: .325);\ \n color: color.change(#102030, $red: 120, $blue: 5);\ \n color: color.change(hsl(25, 100%, 80%), $lightness: 40%, $alpha: 0.8);\ \n}" ), "p {\ \n color: #102005;\ \n color: rgba(16, 32, 48, 0.325);\ \n color: #782005;\ \n color: hsla(25, 100%, 40%, 0.8);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/colors/mod.rs000066400000000000000000000003021474765622100236430ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/colors" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("colors") } mod basic; mod change_color; rsass-0.29.0/rsass/tests/spec/non_conformant/errors/000077500000000000000000000000001474765622100225365ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/errors/extend/000077500000000000000000000000001474765622100240255ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/errors/extend/mod.rs000066400000000000000000000003131474765622100251470ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/extend" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("extend") } mod placeholder; mod selector; rsass-0.29.0/rsass/tests/spec/non_conformant/errors/extend/placeholder/000077500000000000000000000000001474765622100263075ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/errors/extend/placeholder/missing.rs000066400000000000000000000012271474765622100303300ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/extend/placeholder/missing.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("missing") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( ".baz {\ \n @extend %foo;\ \n color: green;\ \n}\n" ), "Error: The target selector was not found.\ \nUse \"@extend %foo !optional\" to avoid this error.\ \n ,\ \n2 | @extend %foo;\ \n | ^^^^^^^^^^^^\ \n \'\ \n input.scss 2:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/extend/placeholder/mod.rs000066400000000000000000000003451474765622100274360ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/extend/placeholder" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("placeholder") } mod missing; mod optional; mod simple; rsass-0.29.0/rsass/tests/spec/non_conformant/errors/extend/placeholder/optional.rs000066400000000000000000000007241474765622100305050ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/extend/placeholder/optional.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("optional") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".baz {\r\ \n @extend %foo !optional;\r\ \n color: green;\r\ \n}\r\n"), ".baz {\ \n color: green;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/extend/placeholder/simple.rs000066400000000000000000000011131474765622100301420ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/extend/placeholder/simple.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("simple") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%foo {color: blue}\r\ \n%bar {color: red}\r\ \n.baz {\r\ \n @extend %foo;\r\ \n color: green;\r\ \n}\r\n"), ".baz {\ \n color: blue;\ \n}\ \n.baz {\ \n color: green;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/extend/selector/000077500000000000000000000000001474765622100256455ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/errors/extend/selector/missing.rs000066400000000000000000000012241474765622100276630ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/extend/selector/missing.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("missing") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( ".baz {\ \n @extend .foo;\ \n color: green;\ \n}\n" ), "Error: The target selector was not found.\ \nUse \"@extend .foo !optional\" to avoid this error.\ \n ,\ \n2 | @extend .foo;\ \n | ^^^^^^^^^^^^\ \n \'\ \n input.scss 2:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/extend/selector/mod.rs000066400000000000000000000003371474765622100267750ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/extend/selector" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("selector") } mod missing; mod optional; mod simple; rsass-0.29.0/rsass/tests/spec/non_conformant/errors/extend/selector/optional.rs000066400000000000000000000007211474765622100300400ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/extend/selector/optional.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("optional") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".baz {\r\ \n @extend .foo !optional;\r\ \n color: green;\r\ \n}\r\n"), ".baz {\ \n color: green;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/extend/selector/simple.rs000066400000000000000000000012111474765622100274770ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/extend/selector/simple.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("simple") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".foo {color: blue}\r\ \n.bar {color: red}\r\ \n.baz {\r\ \n @extend .foo;\r\ \n color: green;\r\ \n}\r\n"), ".foo, .baz {\ \n color: blue;\ \n}\ \n.bar {\ \n color: red;\ \n}\ \n.baz {\ \n color: green;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/fn_change_color_1.rs000066400000000000000000000013031474765622100264270ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/fn-change-color-1.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("fn-change-color-1") } #[test] fn test() { assert_eq!( runner().err( "@use \"sass:color\";\ \nfoo {\r\ \n test: color.change(red, $red: 0.5, $hue: 0.2);\r\ \n}" ), "Error: $hue: Color space rgb doesn\'t have a channel with this name.\ \n ,\ \n3 | test: color.change(red, $red: 0.5, $hue: 0.2);\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 3:9 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/fn_debug/000077500000000000000000000000001474765622100243075ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/errors/fn_debug/mod.rs000066400000000000000000000003301474765622100254300ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/fn-debug" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("fn-debug") } mod property; mod ruleset; mod simple; rsass-0.29.0/rsass/tests/spec/non_conformant/errors/fn_debug/property.rs000066400000000000000000000007101474765622100265370ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/fn-debug/property.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("property") } #[test] fn test() { assert_eq!( runner().ok("a {\r\ \n b: {\r\ \n @debug \"debug\";\r\ \n foo: bar;\r\ \n }\r\ \n}"), "a {\ \n b-foo: bar;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/fn_debug/ruleset.rs000066400000000000000000000006211474765622100263370ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/fn-debug/ruleset.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("ruleset") } #[test] fn test() { assert_eq!( runner().ok("a {\r\ \n @debug \"debug\";\r\ \n foo: bar;\r\ \n}"), "a {\ \n foo: bar;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/fn_debug/simple.rs000066400000000000000000000004041474765622100261440ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/fn-debug/simple.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("simple") } #[test] fn test() { assert_eq!(runner().ok("@debug \"debug\";"), ""); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/fn_error/000077500000000000000000000000001474765622100243525ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/errors/fn_error/mod.rs000066400000000000000000000003301474765622100254730ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/fn-error" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("fn-error") } mod property; mod ruleset; mod simple; rsass-0.29.0/rsass/tests/spec/non_conformant/errors/fn_error/property.rs000066400000000000000000000011331474765622100266020ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/fn-error/property.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("property") } #[test] fn test() { assert_eq!( runner().err( "a {\r\ \n b: {\r\ \n @error \"error\";\r\ \n foo: bar;\r\ \n }\r\ \n}" ), "Error: \"error\"\ \n ,\ \n3 | @error \"error\";\ \n | ^^^^^^^^^^^^^^\ \n \'\ \n input.scss 3:5 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/fn_error/ruleset.rs000066400000000000000000000010421474765622100264000ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/fn-error/ruleset.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("ruleset") } #[test] fn test() { assert_eq!( runner().err( "a {\r\ \n @error \"error\";\r\ \n foo: bar;\r\ \n}" ), "Error: \"error\"\ \n ,\ \n2 | @error \"error\";\ \n | ^^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/fn_error/simple.rs000066400000000000000000000006741474765622100262200ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/fn-error/simple.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("simple") } #[test] fn test() { assert_eq!( runner().err("@error \"error\";"), "Error: \"error\"\ \n ,\ \n1 | @error \"error\";\ \n | ^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:1 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/fn_varargs/000077500000000000000000000000001474765622100246665ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/errors/fn_varargs/at_start.rs000066400000000000000000000007661474765622100270660ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/fn-varargs/at-start.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("at-start") } #[test] fn test() { assert_eq!( runner().err("@function test($rest...,$param) {}"), "Error: expected \")\".\ \n ,\ \n1 | @function test($rest...,$param) {}\ \n | ^\ \n \'\ \n input.scss 1:25 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/fn_varargs/mod.rs000066400000000000000000000003671474765622100260210ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/fn-varargs" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("fn-varargs") } mod at_start; mod multiple; mod with_default; mod with_optional; rsass-0.29.0/rsass/tests/spec/non_conformant/errors/fn_varargs/multiple.rs000066400000000000000000000007751474765622100271000ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/fn-varargs/multiple.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("multiple") } #[test] fn test() { assert_eq!( runner().err("@function test($param...,$rest...) {}"), "Error: expected \")\".\ \n ,\ \n1 | @function test($param...,$rest...) {}\ \n | ^\ \n \'\ \n input.scss 1:26 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/fn_varargs/with_default.rs000066400000000000000000000010121474765622100277050ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/fn-varargs/with-default.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("with-default") } #[test] fn test() { assert_eq!( runner().err("@function test($param...:\"default\") {}"), "Error: expected \")\".\ \n ,\ \n1 | @function test($param...:\"default\") {}\ \n | ^\ \n \'\ \n input.scss 1:25 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/fn_varargs/with_optional.rs000066400000000000000000000005071474765622100301160ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/fn-varargs/with-optional.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("with-optional") } #[test] fn test() { assert_eq!( runner().ok("@function test($param:\"default\",$rest...) {}"), "" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/000077500000000000000000000000001474765622100240505ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/file/000077500000000000000000000000001474765622100247675ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/file/control_else.rs000066400000000000000000000012531474765622100300260ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/file/control-else.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("control-else") .mock_file("_include.scss", "") } #[test] #[ignore] // missing error fn test() { assert_eq!( runner().err( "@if (false) {\r\ \n} @else {\r\ \n @import \'_include\';\r\ \n}\r\n" ), "Error: This at-rule is not allowed here.\ \n ,\ \n3 | @import \'_include\';\ \n | ^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 3:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/file/control_if.rs000066400000000000000000000012121474765622100274670ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/file/control-if.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("control-if") .mock_file("_include.scss", "") } #[test] #[ignore] // missing error fn test() { assert_eq!( runner().err( "@if (true) {\r\ \n @import \'_include\';\r\ \n}\r\n" ), "Error: This at-rule is not allowed here.\ \n ,\ \n2 | @import \'_include\';\ \n | ^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/file/mixin/000077500000000000000000000000001474765622100261135ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/file/mixin/control_else/000077500000000000000000000000001474765622100306035ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/file/mixin/control_else/inside.rs000066400000000000000000000015361474765622100324310ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/file/mixin/control-else/inside.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("inside") .mock_file("_include.scss", "") } #[test] #[ignore] // missing error fn test() { assert_eq!( runner().err( "@mixin do_import() {\r\ \n @if (false) {\r\ \n } @else {\r\ \n @import \'_include\';\r\ \n }\r\ \n}\r\ \n\r\ \nfoo {\r\ \n @include do_import();\r\ \n}" ), "Error: This at-rule is not allowed here.\ \n ,\ \n4 | @import \'_include\';\ \n | ^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 4:5 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/file/mixin/control_else/mod.rs000066400000000000000000000003431474765622100317300ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/file/mixin/control-else" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("control-else") } mod inside; mod outside; rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/file/mixin/control_else/outside.rs000066400000000000000000000014541474765622100326310ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/file/mixin/control-else/outside.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("outside") .mock_file("_include.scss", "") } #[test] #[ignore] // missing error fn test() { assert_eq!( runner().err( "@mixin do_import() {\r\ \n @import \'_include\';\r\ \n}\r\ \n\r\ \n@if (false) {\r\ \n} @else {\r\ \n @include do_import();\r\ \n}\r\n" ), "Error: This at-rule is not allowed here.\ \n ,\ \n2 | @import \'_include\';\ \n | ^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/file/mixin/control_if/000077500000000000000000000000001474765622100302515ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/file/mixin/control_if/inside.rs000066400000000000000000000014751474765622100321010ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/file/mixin/control-if/inside.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("inside") .mock_file("_include.scss", "") } #[test] #[ignore] // missing error fn test() { assert_eq!( runner().err( "@mixin do_import() {\r\ \n @if (true) {\r\ \n @import \'_include\';\r\ \n }\r\ \n}\r\ \n\r\ \nfoo {\r\ \n @include do_import();\r\ \n}" ), "Error: This at-rule is not allowed here.\ \n ,\ \n3 | @import \'_include\';\ \n | ^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 3:5 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/file/mixin/control_if/mod.rs000066400000000000000000000003371474765622100314010ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/file/mixin/control-if" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("control-if") } mod inside; mod outside; rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/file/mixin/control_if/outside.rs000066400000000000000000000014111474765622100322700ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/file/mixin/control-if/outside.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("outside") .mock_file("_include.scss", "") } #[test] #[ignore] // missing error fn test() { assert_eq!( runner().err( "@mixin do_import() {\r\ \n @import \'_include\';\r\ \n}\r\ \n\r\ \n@if (true) {\r\ \n @include do_import();\r\ \n}" ), "Error: This at-rule is not allowed here.\ \n ,\ \n2 | @import \'_include\';\ \n | ^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/file/mixin/mod.rs000066400000000000000000000003451474765622100272420ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/file/mixin" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("mixin") } mod control_else; mod control_if; mod simple; rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/file/mixin/simple/000077500000000000000000000000001474765622100274045ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/file/mixin/simple/inside.rs000066400000000000000000000020151474765622100312230ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/file/mixin/simple/inside.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("inside") .mock_file("_include.scss", "") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "@use \"sass:string\";\ \n@mixin import-google-fonts() {\r\ \n @import url(\"http://fonts.googleapis.com/css?family=#{$family}\");\r\ \n}\r\ \nfoo {\r\ \n $family: string.unquote(\"Droid+Sans\");\r\ \n @include import-google-fonts();\r\ \n}" ), "Error: Undefined variable.\ \n ,\ \n3 | @import url(\"http://fonts.googleapis.com/css?family=#{$family}\");\ \n | ^^^^^^^\ \n \'\ \n input.scss 3:57 import-google-fonts()\ \n input.scss 7:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/file/mixin/simple/mod.rs000066400000000000000000000003271474765622100305330ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/file/mixin/simple" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("simple") } mod inside; mod outside; rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/file/mixin/simple/outside.rs000066400000000000000000000013041474765622100314240ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/file/mixin/simple/outside.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("outside") .mock_file("_include.scss", "") } #[test] fn test() { assert_eq!( runner().ok( "@use \"sass:string\";\ \n@mixin import-google-fonts() {\r\ \n @import url(\"http://fonts.googleapis.com/css?family=#{$family}\");\r\ \n}\r\ \n$family: string.unquote(\"Droid+Sans\");\r\ \n@include import-google-fonts();" ), "@import url(\"http://fonts.googleapis.com/css?family=Droid+Sans\");\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/file/mod.rs000066400000000000000000000003721474765622100261160ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/file" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("file") } mod control_else; mod control_if; mod test_loop; mod mixin; mod simple; rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/file/simple.rs000066400000000000000000000013761474765622100266350ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/file/simple.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("simple") } #[test] fn test() { assert_eq!( runner().ok( "@import \"hey1.css\", \"cookie.css\", url(\"hey2.css\"), \"fudge.css\";\n\ \n$foo:\"goodbye\";\ \ndiv[name=\"hello\"] {\ \n color: blue;\ \n}\n\ \n@import \"bludge.css\";" ), "@import \"hey1.css\";\ \n@import \"cookie.css\";\ \n@import url(\"hey2.css\");\ \n@import \"fudge.css\";\ \n@import \"bludge.css\";\ \ndiv[name=hello] {\ \n color: blue;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/file/test_loop/000077500000000000000000000000001474765622100267775ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/file/test_loop/each.rs000066400000000000000000000012101474765622100302370ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/file/loop/each.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("each") .mock_file("_include.scss", "") } #[test] #[ignore] // missing error fn test() { assert_eq!( runner().err( "@each $i in (1) {\r\ \n @import \'_include\';\r\ \n}\r\n" ), "Error: This at-rule is not allowed here.\ \n ,\ \n2 | @import \'_include\';\ \n | ^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/file/test_loop/mod.rs000066400000000000000000000003351474765622100301250ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/file/loop" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("loop") } mod each; mod test_for; mod test_while; rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/file/test_loop/test_for.rs000066400000000000000000000012171474765622100311730ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/file/loop/for.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("for") .mock_file("_include.scss", "") } #[test] #[ignore] // missing error fn test() { assert_eq!( runner().err( "@for $i from 1 through 2 {\r\ \n @import \'_include\';\r\ \n}\r\n" ), "Error: This at-rule is not allowed here.\ \n ,\ \n2 | @import \'_include\';\ \n | ^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/file/test_loop/test_while.rs000066400000000000000000000013231474765622100315130ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/file/loop/while.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("while") .mock_file("_include.scss", "") } #[test] #[ignore] // missing error fn test() { assert_eq!( runner().err( "$count: 0;\r\ \n@while ($count < 1) {\r\ \n @import \'_include\';\r\ \n $count: $count + 1;\r\ \n}\r\n" ), "Error: This at-rule is not allowed here.\ \n ,\ \n3 | @import \'_include\';\ \n | ^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 3:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/miss/000077500000000000000000000000001474765622100250235ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/miss/control_else.rs000066400000000000000000000011701474765622100300600ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/miss/control-else.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("control-else") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "@if (false) {\r\ \n} @else {\r\ \n @import \'_include\';\r\ \n}\r\n" ), "Error: This at-rule is not allowed here.\ \n ,\ \n3 | @import \'_include\';\ \n | ^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 3:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/miss/control_if.rs000066400000000000000000000011271474765622100275300ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/miss/control-if.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("control-if") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "@if (true) {\r\ \n @import \'_include\';\r\ \n}\r\n" ), "Error: This at-rule is not allowed here.\ \n ,\ \n2 | @import \'_include\';\ \n | ^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/miss/mixin/000077500000000000000000000000001474765622100261475ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/miss/mixin/control_else/000077500000000000000000000000001474765622100306375ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/miss/mixin/control_else/inside.rs000066400000000000000000000014531474765622100324630ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/miss/mixin/control-else/inside.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("inside") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "@mixin do_import() {\r\ \n @if (false) {\r\ \n } @else {\r\ \n @import \'_include\';\r\ \n }\r\ \n}\r\ \n\r\ \nfoo {\r\ \n @include do_import();\r\ \n}" ), "Error: This at-rule is not allowed here.\ \n ,\ \n4 | @import \'_include\';\ \n | ^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 4:5 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/miss/mixin/control_else/mod.rs000066400000000000000000000003431474765622100317640ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/miss/mixin/control-else" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("control-else") } mod inside; mod outside; rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/miss/mixin/control_else/outside.rs000066400000000000000000000013711474765622100326630ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/miss/mixin/control-else/outside.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("outside") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "@mixin do_import() {\r\ \n @import \'_include\';\r\ \n}\r\ \n\r\ \n@if (false) {\r\ \n} @else {\r\ \n @include do_import();\r\ \n}\r\n" ), "Error: This at-rule is not allowed here.\ \n ,\ \n2 | @import \'_include\';\ \n | ^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/miss/mixin/control_if/000077500000000000000000000000001474765622100303055ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/miss/mixin/control_if/inside.rs000066400000000000000000000014121474765622100321240ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/miss/mixin/control-if/inside.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("inside") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "@mixin do_import() {\r\ \n @if (true) {\r\ \n @import \'_include\';\r\ \n }\r\ \n}\r\ \n\r\ \nfoo {\r\ \n @include do_import();\r\ \n}" ), "Error: This at-rule is not allowed here.\ \n ,\ \n3 | @import \'_include\';\ \n | ^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 3:5 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/miss/mixin/control_if/mod.rs000066400000000000000000000003371474765622100314350ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/miss/mixin/control-if" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("control-if") } mod inside; mod outside; rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/miss/mixin/control_if/outside.rs000066400000000000000000000013261474765622100323310ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/miss/mixin/control-if/outside.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("outside") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "@mixin do_import() {\r\ \n @import \'_include\';\r\ \n}\r\ \n\r\ \n@if (true) {\r\ \n @include do_import();\r\ \n}" ), "Error: This at-rule is not allowed here.\ \n ,\ \n2 | @import \'_include\';\ \n | ^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/miss/mixin/mod.rs000066400000000000000000000003451474765622100272760ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/miss/mixin" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("mixin") } mod control_else; mod control_if; mod simple; rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/miss/mixin/simple/000077500000000000000000000000001474765622100274405ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/miss/mixin/simple/inside.rs000066400000000000000000000017341474765622100312660ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/miss/mixin/simple/inside.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("inside") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "@use \"sass:string\";\ \n@mixin import-google-fonts() {\r\ \n @import url(\"http://fonts.googleapis.com/css?family=#{$family}\");\r\ \n}\r\ \nfoo {\r\ \n $family: string.unquote(\"Droid+Sans\");\r\ \n @include import-google-fonts();\r\ \n}" ), "Error: Undefined variable.\ \n ,\ \n3 | @import url(\"http://fonts.googleapis.com/css?family=#{$family}\");\ \n | ^^^^^^^\ \n \'\ \n input.scss 3:57 import-google-fonts()\ \n input.scss 7:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/miss/mixin/simple/mod.rs000066400000000000000000000003271474765622100305670ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/miss/mixin/simple" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("simple") } mod inside; mod outside; rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/miss/mixin/simple/outside.rs000066400000000000000000000012231474765622100314600ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/miss/mixin/simple/outside.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("outside") } #[test] fn test() { assert_eq!( runner().ok( "@use \"sass:string\";\ \n@mixin import-google-fonts() {\r\ \n @import url(\"http://fonts.googleapis.com/css?family=#{$family}\");\r\ \n}\r\ \n$family: string.unquote(\"Droid+Sans\");\r\ \n@include import-google-fonts();" ), "@import url(\"http://fonts.googleapis.com/css?family=Droid+Sans\");\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/miss/mod.rs000066400000000000000000000003721474765622100261520ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/miss" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("miss") } mod control_else; mod control_if; mod test_loop; mod mixin; mod simple; rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/miss/simple.rs000066400000000000000000000013761474765622100266710ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/miss/simple.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("simple") } #[test] fn test() { assert_eq!( runner().ok( "@import \"hey1.css\", \"cookie.css\", url(\"hey2.css\"), \"fudge.css\";\n\ \n$foo:\"goodbye\";\ \ndiv[name=\"hello\"] {\ \n color: blue;\ \n}\n\ \n@import \"bludge.css\";" ), "@import \"hey1.css\";\ \n@import \"cookie.css\";\ \n@import url(\"hey2.css\");\ \n@import \"fudge.css\";\ \n@import \"bludge.css\";\ \ndiv[name=hello] {\ \n color: blue;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/miss/test_loop/000077500000000000000000000000001474765622100270335ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/miss/test_loop/each.rs000066400000000000000000000011251474765622100303000ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/miss/loop/each.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("each") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "@each $i in (1) {\r\ \n @import \'_include\';\r\ \n}\r\n" ), "Error: This at-rule is not allowed here.\ \n ,\ \n2 | @import \'_include\';\ \n | ^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/miss/test_loop/mod.rs000066400000000000000000000003351474765622100301610ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/miss/loop" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("loop") } mod each; mod test_for; mod test_while; rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/miss/test_loop/test_for.rs000066400000000000000000000011341474765622100312250ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/miss/loop/for.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("for") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "@for $i from 1 through 2 {\r\ \n @import \'_include\';\r\ \n}\r\n" ), "Error: This at-rule is not allowed here.\ \n ,\ \n2 | @import \'_include\';\ \n | ^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/miss/test_loop/test_while.rs000066400000000000000000000012401474765622100315450ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/miss/loop/while.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("while") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "$count: 0;\r\ \n@while ($count < 1) {\r\ \n @import \'_include\';\r\ \n $count: $count + 1;\r\ \n}\r\n" ), "Error: This at-rule is not allowed here.\ \n ,\ \n3 | @import \'_include\';\ \n | ^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 3:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/mod.rs000066400000000000000000000003121474765622100251710ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("import") } mod file; mod miss; mod url; rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/url/000077500000000000000000000000001474765622100246525ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/url/control_else.rs000066400000000000000000000006771474765622100277220ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/url/control-else.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("control-else") } #[test] fn test() { assert_eq!( runner().ok("@if (false) {\r\ \n} @else {\r\ \n @import url(\"http://www.libsass.org\");\r\ \n}\r\n"), "@import url(\"http://www.libsass.org\");\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/url/control_if.rs000066400000000000000000000006361474765622100273630ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/url/control-if.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("control-if") } #[test] fn test() { assert_eq!( runner().ok("@if (true) {\r\ \n @import url(\"http://www.libsass.org\");\r\ \n}\r\n"), "@import url(\"http://www.libsass.org\");\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/url/mixin/000077500000000000000000000000001474765622100257765ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/url/mixin/control_else/000077500000000000000000000000001474765622100304665ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/url/mixin/control_else/mod.rs000066400000000000000000000003251474765622100316130ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/url/mixin/control-else" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("control-else") } mod outside; rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/url/mixin/control_else/outside.rs000066400000000000000000000011001474765622100325000ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/url/mixin/control-else/outside.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("outside") } #[test] fn test() { assert_eq!( runner().ok("@mixin do_import() {\r\ \n @import url(\"http://www.libsass.org\");\r\ \n}\r\ \n\r\ \n@if (false) {\r\ \n} @else {\r\ \n @include do_import();\r\ \n}\r\n"), "@import url(\"http://www.libsass.org\");\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/url/mixin/control_if/000077500000000000000000000000001474765622100301345ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/url/mixin/control_if/mod.rs000066400000000000000000000003211474765622100312550ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/url/mixin/control-if" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("control-if") } mod outside; rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/url/mixin/control_if/outside.rs000066400000000000000000000010351474765622100321550ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/url/mixin/control-if/outside.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("outside") } #[test] fn test() { assert_eq!( runner().ok("@mixin do_import() {\r\ \n @import url(\"http://www.libsass.org\");\r\ \n}\r\ \n\r\ \n@if (true) {\r\ \n @include do_import();\r\ \n}"), "@import url(\"http://www.libsass.org\");\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/url/mixin/mod.rs000066400000000000000000000003441474765622100271240ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/url/mixin" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("mixin") } mod control_else; mod control_if; mod simple; rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/url/mixin/simple/000077500000000000000000000000001474765622100272675ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/url/mixin/simple/inside.rs000066400000000000000000000017331474765622100311140ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/url/mixin/simple/inside.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("inside") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "@use \"sass:string\";\ \n@mixin import-google-fonts() {\r\ \n @import url(\"http://fonts.googleapis.com/css?family=#{$family}\");\r\ \n}\r\ \nfoo {\r\ \n $family: string.unquote(\"Droid+Sans\");\r\ \n @include import-google-fonts();\r\ \n}" ), "Error: Undefined variable.\ \n ,\ \n3 | @import url(\"http://fonts.googleapis.com/css?family=#{$family}\");\ \n | ^^^^^^^\ \n \'\ \n input.scss 3:57 import-google-fonts()\ \n input.scss 7:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/url/mixin/simple/mod.rs000066400000000000000000000003261474765622100304150ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/url/mixin/simple" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("simple") } mod inside; mod outside; rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/url/mixin/simple/outside.rs000066400000000000000000000012221474765622100313060ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/url/mixin/simple/outside.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("outside") } #[test] fn test() { assert_eq!( runner().ok( "@use \"sass:string\";\ \n@mixin import-google-fonts() {\r\ \n @import url(\"http://fonts.googleapis.com/css?family=#{$family}\");\r\ \n}\r\ \n$family: string.unquote(\"Droid+Sans\");\r\ \n@include import-google-fonts();" ), "@import url(\"http://fonts.googleapis.com/css?family=Droid+Sans\");\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/url/mod.rs000066400000000000000000000003701474765622100257770ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/url" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("url") } mod control_else; mod control_if; mod test_loop; mod mixin; mod simple; rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/url/simple.rs000066400000000000000000000013751474765622100265170ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/url/simple.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("simple") } #[test] fn test() { assert_eq!( runner().ok( "@import \"hey1.css\", \"cookie.css\", url(\"hey2.css\"), \"fudge.css\";\n\ \n$foo:\"goodbye\";\ \ndiv[name=\"hello\"] {\ \n color: blue;\ \n}\n\ \n@import \"bludge.css\";" ), "@import \"hey1.css\";\ \n@import \"cookie.css\";\ \n@import url(\"hey2.css\");\ \n@import \"fudge.css\";\ \n@import \"bludge.css\";\ \ndiv[name=hello] {\ \n color: blue;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/url/test_loop/000077500000000000000000000000001474765622100266625ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/url/test_loop/each.rs000066400000000000000000000006341474765622100301330ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/url/loop/each.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("each") } #[test] fn test() { assert_eq!( runner().ok("@each $i in (1) {\r\ \n @import url(\"http://www.libsass.org\");\r\ \n}\r\n"), "@import url(\"http://www.libsass.org\");\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/url/test_loop/mod.rs000066400000000000000000000003341474765622100300070ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/url/loop" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("loop") } mod each; mod test_for; mod test_while; rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/url/test_loop/test_for.rs000066400000000000000000000007301474765622100310550ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/url/loop/for.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("for") } #[test] fn test() { assert_eq!( runner().ok("@for $i from 1 through 2 {\r\ \n @import url(\"http://www.libsass.org\");\r\ \n}\r\n"), "@import url(\"http://www.libsass.org\");\ \n@import url(\"http://www.libsass.org\");\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/import/url/test_loop/test_while.rs000066400000000000000000000007471474765622100314070ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/import/url/loop/while.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("while") } #[test] fn test() { assert_eq!( runner().ok("$count: 0;\r\ \n@while ($count < 1) {\r\ \n @import url(\"http://www.libsass.org\");\r\ \n $count: $count + 1;\r\ \n}\r\n"), "@import url(\"http://www.libsass.org\");\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/interpolation/000077500000000000000000000000001474765622100254255ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/errors/interpolation/error_1.rs000066400000000000000000000007141474765622100273460ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/interpolation/error-1.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("error-1") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err("\'#{)\'{\n"), "Error: Expected expression.\ \n ,\ \n1 | \'#{)\'{\ \n | ^^\ \n \'\ \n input.scss 1:2 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/interpolation/mod.rs000066400000000000000000000003061474765622100265510ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/interpolation" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("interpolation") } mod error_1; rsass-0.29.0/rsass/tests/spec/non_conformant/errors/invalid_operation/000077500000000000000000000000001474765622100262445ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/errors/invalid_operation/gt.rs000066400000000000000000000010331474765622100272210ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/invalid-operation/gt.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("gt") } #[test] fn test() { assert_eq!( runner().err( "test {\r\ \n err: 2px > red;\r\ \n}" ), "Error: Undefined operation \"2px > red\".\ \n ,\ \n2 | err: 2px > red;\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 2:8 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/invalid_operation/gte.rs000066400000000000000000000010411474765622100273650ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/invalid-operation/gte.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("gte") } #[test] fn test() { assert_eq!( runner().err( "test {\r\ \n err: 2px >= red;\r\ \n}" ), "Error: Undefined operation \"2px >= red\".\ \n ,\ \n2 | err: 2px >= red;\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 2:8 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/invalid_operation/lt.rs000066400000000000000000000010331474765622100272260ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/invalid-operation/lt.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("lt") } #[test] fn test() { assert_eq!( runner().err( "test {\r\ \n err: 2px < red;\r\ \n}" ), "Error: Undefined operation \"2px < red\".\ \n ,\ \n2 | err: 2px < red;\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 2:8 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/invalid_operation/lte.rs000066400000000000000000000010411474765622100273720ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/invalid-operation/lte.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("lte") } #[test] fn test() { assert_eq!( runner().err( "test {\r\ \n err: 2px <= red;\r\ \n}" ), "Error: Undefined operation \"2px <= red\".\ \n ,\ \n2 | err: 2px <= red;\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 2:8 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/invalid_operation/mod.rs000066400000000000000000000004261474765622100273730ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/invalid-operation" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("invalid-operation") } mod gt; mod gte; mod lt; mod lte; mod test_mod; mod plus; mod sub; mod times; rsass-0.29.0/rsass/tests/spec/non_conformant/errors/invalid_operation/plus.rs000066400000000000000000000010371474765622100275760ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/invalid-operation/plus.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("plus") } #[test] fn test() { assert_eq!( runner().err( "test {\r\ \n err: 2px + red;\r\ \n}" ), "Error: Undefined operation \"2px + red\".\ \n ,\ \n2 | err: 2px + red;\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 2:8 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/invalid_operation/sub.rs000066400000000000000000000010671474765622100274070ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/invalid-operation/sub.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("sub") } #[test] fn test() { assert_eq!( runner().err( "test {\r\ \n err: 2px - 2px*2px;\r\ \n}" ), "Error: 2px and calc(4px * 1px) have incompatible units.\ \n ,\ \n2 | err: 2px - 2px*2px;\ \n | ^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:8 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/invalid_operation/test_mod.rs000066400000000000000000000010351474765622100304270ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/invalid-operation/mod.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("mod") } #[test] fn test() { assert_eq!( runner().err( "test {\r\ \n err: 2px % red;\r\ \n}" ), "Error: Undefined operation \"2px % red\".\ \n ,\ \n2 | err: 2px % red;\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 2:8 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/invalid_operation/times.rs000066400000000000000000000010411474765622100277270ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/invalid-operation/times.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("times") } #[test] fn test() { assert_eq!( runner().err( "test {\r\ \n err: 2px * red;\r\ \n}" ), "Error: Undefined operation \"2px * red\".\ \n ,\ \n2 | err: 2px * red;\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 2:8 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/invalid_parent/000077500000000000000000000000001474765622100255355ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/errors/invalid_parent/function_in_each.rs000066400000000000000000000011361474765622100313770ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/invalid-parent/function-in-each.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("function-in-each") } #[test] fn test() { assert_eq!( runner().err( "@each $item in (a, b) {\r\ \n @function foo() {}\r\ \n}" ), "Error: Functions may not be declared in control directives.\ \n ,\ \n2 | @function foo() {}\ \n | ^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/invalid_parent/function_in_for.rs000066400000000000000000000011371474765622100312660ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/invalid-parent/function-in-for.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("function-in-for") } #[test] fn test() { assert_eq!( runner().err( "@for $i from 1 through 1 {\r\ \n @function foo() {}\r\ \n}" ), "Error: Functions may not be declared in control directives.\ \n ,\ \n2 | @function foo() {}\ \n | ^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/invalid_parent/function_in_function.rs000066400000000000000000000011171474765622100323230ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/invalid-parent/function-in-function.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("function-in-function") } #[test] fn test() { assert_eq!( runner().err( "@function foo () {\r\ \n @function bar() {}\r\ \n}" ), "Error: This at-rule is not allowed here.\ \n ,\ \n2 | @function bar() {}\ \n | ^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/invalid_parent/function_in_if.rs000066400000000000000000000011171474765622100310740ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/invalid-parent/function-in-if.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("function-in-if") } #[test] fn test() { assert_eq!( runner().err( "@if (true) {\r\ \n @function foo() {}\r\ \n}" ), "Error: Functions may not be declared in control directives.\ \n ,\ \n2 | @function foo() {}\ \n | ^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/invalid_parent/function_in_mixin.rs000066400000000000000000000012441474765622100316230ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/invalid-parent/function-in-mixin.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("function-in-mixin") } #[test] fn test() { assert_eq!( runner().err( "@mixin mix() {\r\ \n @function foo() {}\r\ \n}\r\ \nfoo {\r\ \n bar: include mix();\r\ \n}" ), "Error: Mixins may not contain function declarations.\ \n ,\ \n2 | @function foo() {}\ \n | ^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/invalid_parent/function_in_while.rs000066400000000000000000000011311474765622100316020ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/invalid-parent/function-in-while.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("function-in-while") } #[test] fn test() { assert_eq!( runner().err( "@while (false) {\r\ \n @function foo() {}\r\ \n}" ), "Error: Functions may not be declared in control directives.\ \n ,\ \n2 | @function foo() {}\ \n | ^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/invalid_parent/mixin_in_each.rs000066400000000000000000000011141474765622100306720ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/invalid-parent/mixin-in-each.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("mixin-in-each") } #[test] fn test() { assert_eq!( runner().err( "@each $item in (a, b) {\r\ \n @mixin foo() {}\r\ \n}" ), "Error: Mixins may not be declared in control directives.\ \n ,\ \n2 | @mixin foo() {}\ \n | ^^^^^^^^^^^^\ \n \'\ \n input.scss 2:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/invalid_parent/mixin_in_for.rs000066400000000000000000000011151474765622100305610ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/invalid-parent/mixin-in-for.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("mixin-in-for") } #[test] fn test() { assert_eq!( runner().err( "@for $i from 1 through 1 {\r\ \n @mixin foo() {}\r\ \n}" ), "Error: Mixins may not be declared in control directives.\ \n ,\ \n2 | @mixin foo() {}\ \n | ^^^^^^^^^^^^\ \n \'\ \n input.scss 2:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/invalid_parent/mixin_in_function.rs000066400000000000000000000011001474765622100316120ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/invalid-parent/mixin-in-function.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("mixin-in-function") } #[test] fn test() { assert_eq!( runner().err( "@function foo () {\r\ \n @mixin bar() {}\r\ \n}" ), "Error: This at-rule is not allowed here.\ \n ,\ \n2 | @mixin bar() {}\ \n | ^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/invalid_parent/mixin_in_if.rs000066400000000000000000000010751474765622100303760ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/invalid-parent/mixin-in-if.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("mixin-in-if") } #[test] fn test() { assert_eq!( runner().err( "@if (true) {\r\ \n @mixin foo() {}\r\ \n}" ), "Error: Mixins may not be declared in control directives.\ \n ,\ \n2 | @mixin foo() {}\ \n | ^^^^^^^^^^^^\ \n \'\ \n input.scss 2:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/invalid_parent/mixin_in_mixin.rs000066400000000000000000000012221474765622100311160ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/invalid-parent/mixin-in-mixin.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("mixin-in-mixin") } #[test] fn test() { assert_eq!( runner().err( "@mixin mix() {\r\ \n @mixin foo() {}\r\ \n}\r\ \nfoo {\r\ \n bar: include mix();\r\ \n}" ), "Error: Mixins may not contain mixin declarations.\ \n ,\ \n2 | @mixin foo() {}\ \n | ^^^^^^^^^^^^\ \n \'\ \n input.scss 2:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/invalid_parent/mixin_in_while.rs000066400000000000000000000011071474765622100311040ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/invalid-parent/mixin-in-while.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("mixin-in-while") } #[test] fn test() { assert_eq!( runner().err( "@while (false) {\r\ \n @mixin foo() {}\r\ \n}" ), "Error: Mixins may not be declared in control directives.\ \n ,\ \n2 | @mixin foo() {}\ \n | ^^^^^^^^^^^^\ \n \'\ \n input.scss 2:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/invalid_parent/mod.rs000066400000000000000000000010051474765622100266560ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/invalid-parent" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("invalid-parent") } mod function_in_each; mod function_in_for; mod function_in_function; mod function_in_if; mod function_in_mixin; mod function_in_while; mod mixin_in_each; mod mixin_in_for; mod mixin_in_function; mod mixin_in_if; mod mixin_in_mixin; mod mixin_in_while; mod return_in_mixin; mod return_in_root; mod return_in_ruleset; rsass-0.29.0/rsass/tests/spec/non_conformant/errors/invalid_parent/return_in_mixin.rs000066400000000000000000000012201474765622100313070ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/invalid-parent/return-in-mixin.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("return-in-mixin") } #[test] fn test() { assert_eq!( runner().err( "@mixin mix() {\r\ \n @return 42;\r\ \n}\r\ \n\r\ \nfoo {\r\ \n @include mix();\r\ \n}" ), "Error: This at-rule is not allowed here.\ \n ,\ \n2 | @return 42;\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 2:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/invalid_parent/return_in_root.rs000066400000000000000000000007321474765622100311550ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/invalid-parent/return-in-root.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("return-in-root") } #[test] fn test() { assert_eq!( runner().err("@return 42;"), "Error: This at-rule is not allowed here.\ \n ,\ \n1 | @return 42;\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:1 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/invalid_parent/return_in_ruleset.rs000066400000000000000000000010541474765622100316530ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/invalid-parent/return-in-ruleset.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("return-in-ruleset") } #[test] fn test() { assert_eq!( runner().err( "ruleset {\r\ \n @return 42;\r\ \n}" ), "Error: This at-rule is not allowed here.\ \n ,\ \n2 | @return 42;\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 2:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/mod.rs000066400000000000000000000005231474765622100236630ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("errors") } mod extend; mod fn_change_color_1; mod fn_debug; mod fn_error; mod fn_varargs; mod import; mod interpolation; mod invalid_operation; mod invalid_parent; mod unicode; rsass-0.29.0/rsass/tests/spec/non_conformant/errors/unicode/000077500000000000000000000000001474765622100241645ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/errors/unicode/mod.rs000066400000000000000000000002711474765622100253110ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/unicode" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("unicode") } mod report; rsass-0.29.0/rsass/tests/spec/non_conformant/errors/unicode/report/000077500000000000000000000000001474765622100254775ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/errors/unicode/report/after.rs000066400000000000000000000007501474765622100271500ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/unicode/report/after.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("after") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err("foo{;öüäöüäöü"), "Error: expected \"{\".\ \n ,\ \n1 | foo{;öüäöüäöü\ \n | ^\ \n \'\ \n input.scss 1:14 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/unicode/report/before.rs000066400000000000000000000007471474765622100273170ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/unicode/report/before.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("before") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err("öüäöüäöü{a:c"), "Error: expected \"}\".\ \n ,\ \n1 | öüäöüäöü{a:c\ \n | ^\ \n \'\ \n input.scss 1:13 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/errors/unicode/report/mod.rs000066400000000000000000000003131474765622100266210ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/errors/unicode/report" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("report") } mod after; mod before; rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/000077500000000000000000000000001474765622100237335ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/compound_unification_in_not.rs000066400000000000000000000014331474765622100320640ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/compound-unification-in-not.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("compound-unification-in-not") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok( "// Make sure compound selectors are unified when two :not()s are extended.\ \n// :not() is special here because it\'s the only selector that\'s extended by\ \n// adding to the compound selector, rather than creating a new selector list.\ \n.a {@extend .c}\ \n.b {@extend .d}\ \n:not(.c):not(.d) {x: y}\n" ), ":not(.c):not(.a):not(.d):not(.b) {\ \n x: y;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/does_not_move_page_block_in_media.rs000066400000000000000000000010031474765622100331260ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/does_not_move_page_block_in_media.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("does_not_move_page_block_in_media") } #[test] fn test() { assert_eq!( runner().ok("@media screen {\ \n a { x:y; }\ \n @page {}\ \n}"), "@media screen {\ \n a {\ \n x: y;\ \n }\ \n @page {}\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/escaped_selector.rs000066400000000000000000000014341474765622100276070ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/escaped_selector.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("escaped_selector") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok( "// Escapes in selectors\' identifiers should be normalized before `@extend` is\ \n// applied.\ \n.foo {escape: none}\ \n\\.foo {escape: slash dot}\ \n\\2E foo {escape: hex}\n\ \n.bar {@extend \\02e foo}\n" ), ".foo {\ \n escape: none;\ \n}\ \n\\.foo, .bar {\ \n escape: slash dot;\ \n}\ \n\\.foo, .bar {\ \n escape: hex;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/extend_extender.rs000066400000000000000000000011771474765622100274740ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/extend-extender.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("extend-extender") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok( "// For implementations like Dart Sass that process extensions as they occur,\ \n// extending rules that contain their own extends needs special handling.\ \n.b {@extend .a}\ \n.c {@extend .b}\ \n.a {x: y}\n" ), ".a, .b, .c {\ \n x: y;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/extend_loop.rs000066400000000000000000000071641474765622100266310ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/extend-loop.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("extend-loop") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok( "// Make sure extend loops are handled correctly. Test in all different orderings\ \n// so we can be sure this works for implementations like Dart Sass where extend\ \n// order matters.\n\ \n@media order1 {\ \n .x1.y1.a1 {x: y; @extend .b1}\ \n .z1.b1 {x: y; @extend .c1}\ \n .c1 {x: y; @extend .a1}\ \n}\n\ \n@media order2 {\ \n .x2.y2.a2 {x: y; @extend .b2}\ \n .c2 {x: y; @extend .a2}\ \n .z2.b2 {x: y; @extend .c2}\ \n}\n\ \n@media order3 {\ \n .z3.b3 {x: y; @extend .c3}\ \n .x3.y3.a3 {x: y; @extend .b3}\ \n .c3 {x: y; @extend .a3}\ \n}\n\ \n@media order4 {\ \n .z4.b4 {x: y; @extend .c4}\ \n .c4 {x: y; @extend .a4}\ \n .x4.y4.a4 {x: y; @extend .b4}\ \n}\n\ \n@media order5 {\ \n .c5 {x: y; @extend .a5}\ \n .z5.b5 {x: y; @extend .c5}\ \n .x5.y5.a5 {x: y; @extend .b5}\ \n}\n\ \n@media order6 {\ \n .c6 {x: y; @extend .a6}\ \n .x6.y6.a6 {x: y; @extend .b6}\ \n .z6.b6 {x: y; @extend .c6}\ \n}\n" ), "@media order1 {\ \n .x1.y1.a1, .x1.y1.c1, .x1.y1.z1.b1 {\ \n x: y;\ \n }\ \n .z1.b1, .z1.x1.y1.a1, .z1.x1.y1.c1, .z1.x1.y1.b1 {\ \n x: y;\ \n }\ \n .c1, .z1.b1, .z1.x1.y1.a1, .z1.x1.y1.c1, .z1.x1.y1.b1 {\ \n x: y;\ \n }\ \n}\ \n@media order2 {\ \n .x2.y2.a2, .x2.y2.c2, .x2.y2.z2.b2 {\ \n x: y;\ \n }\ \n .c2, .z2.b2, .z2.x2.y2.a2, .z2.x2.y2.c2, .z2.x2.y2.b2 {\ \n x: y;\ \n }\ \n .z2.b2, .z2.x2.y2.a2, .z2.x2.y2.c2, .z2.x2.y2.b2 {\ \n x: y;\ \n }\ \n}\ \n@media order3 {\ \n .z3.b3, .z3.x3.y3.a3, .z3.x3.y3.c3, .z3.x3.y3.b3 {\ \n x: y;\ \n }\ \n .x3.y3.a3, .x3.y3.c3, .x3.y3.z3.b3 {\ \n x: y;\ \n }\ \n .c3, .z3.b3, .z3.x3.y3.a3, .z3.x3.y3.c3, .z3.x3.y3.b3 {\ \n x: y;\ \n }\ \n}\ \n@media order4 {\ \n .z4.b4, .z4.x4.y4.a4, .z4.x4.y4.c4, .z4.x4.y4.b4 {\ \n x: y;\ \n }\ \n .c4, .z4.b4, .z4.x4.y4.a4, .z4.x4.y4.c4, .z4.x4.y4.b4 {\ \n x: y;\ \n }\ \n .x4.y4.a4, .x4.y4.c4, .x4.y4.z4.b4 {\ \n x: y;\ \n }\ \n}\ \n@media order5 {\ \n .c5, .z5.b5, .z5.x5.y5.a5, .z5.x5.y5.c5, .z5.x5.y5.b5 {\ \n x: y;\ \n }\ \n .z5.b5, .z5.x5.y5.a5, .z5.x5.y5.c5, .z5.x5.y5.b5 {\ \n x: y;\ \n }\ \n .x5.y5.a5, .x5.y5.c5, .x5.y5.z5.b5 {\ \n x: y;\ \n }\ \n}\ \n@media order6 {\ \n .c6, .z6.b6, .z6.x6.y6.a6, .z6.x6.y6.c6, .z6.x6.y6.b6 {\ \n x: y;\ \n }\ \n .x6.y6.a6, .x6.y6.c6, .x6.y6.z6.b6 {\ \n x: y;\ \n }\ \n .z6.b6, .z6.x6.y6.a6, .z6.x6.y6.c6, .z6.x6.y6.b6 {\ \n x: y;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/extend_result_of_extend.rs000066400000000000000000000011141474765622100312160ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/extend-result-of-extend.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("extend-result-of-extend") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok( "// The result of :not(.c) being extended should itself be extendable.\ \n.a {@extend :not(.b)}\ \n.b {@extend .c}\ \n:not(.c) {x: y}\n" ), ":not(.c):not(.b), .a:not(.c) {\ \n x: y;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/extend_self.rs000066400000000000000000000007161474765622100266050ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/extend-self.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("extend-self") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("// This shouldn\'t change the selector.\ \n.c, .a .b .c, .a .c .b {x: y; @extend .c}\n"), ".c, .a .b .c, .a .c .b {\ \n x: y;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/fake_pseudo_element_order/000077500000000000000000000000001474765622100311245ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/fake_pseudo_element_order/after.rs000066400000000000000000000006361474765622100326000ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/fake-pseudo-element-order/after.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("after") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%a:after {x: y}\ \nb:c {@extend %a}\n"), "b:c:after {\ \n x: y;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/fake_pseudo_element_order/before.rs000066400000000000000000000006421474765622100327360ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/fake-pseudo-element-order/before.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("before") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%a:before {x: y}\ \nb:c {@extend %a}\n"), "b:c:before {\ \n x: y;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/fake_pseudo_element_order/first_letter.rs000066400000000000000000000006721474765622100342050ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/fake-pseudo-element-order/first-letter.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("first-letter") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%a:first-letter {x: y}\ \nb:c {@extend %a}\n"), "b:c:first-letter {\ \n x: y;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/fake_pseudo_element_order/first_line.rs000066400000000000000000000006621474765622100336340ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/fake-pseudo-element-order/first-line.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("first-line") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%a:first-line {x: y}\ \nb:c {@extend %a}\n"), "b:c:first-line {\ \n x: y;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/fake_pseudo_element_order/mod.rs000066400000000000000000000004231474765622100322500ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/fake-pseudo-element-order" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("fake-pseudo-element-order") } mod after; mod before; mod first_letter; mod first_line; rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/issue_146.rs000066400000000000000000000012521474765622100260230ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/issue_146.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("issue_146") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%btn-style-default {\ \n background: green;\ \n &:hover{\ \n background: black;\ \n }\ \n}\n\ \nbutton {\ \n @extend %btn-style-default;\ \n}"), "button {\ \n background: green;\ \n}\ \nbutton:hover {\ \n background: black;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/mod.rs000066400000000000000000000310141474765622100250570ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("extend-tests") } mod t001_test_basic; mod t002_test_basic; mod t003_test_basic; mod t004_test_basic; mod t005_test_multiple_targets; mod t006_test_multiple_extendees; mod t007_test_multiple_extends_with_single_extender_and_single_target; mod t008_test_multiple_extends_with_single_extender_and_single_target; mod t009_test_multiple_extends_with_multiple_extenders_and_single_target; mod t010_test_multiple_extends_with_multiple_extenders_and_single_target; mod t011_test_chained_extends; mod t012_test_dynamic_extendee; mod t013_test_dynamic_extendee; mod t014_test_nested_target; mod t015_test_target_with_child; mod t016_test_class_unification; mod t017_test_class_unification; mod t018_test_id_unification; mod t019_test_id_unification; mod t020_test_universal_unification_with_simple_target; mod t021_test_universal_unification_with_simple_target; mod t022_test_universal_unification_with_simple_target; mod t023_test_universal_unification_with_simple_target; mod t024_test_universal_unification_with_simple_target; mod t025_test_universal_unification_with_namespaceless_universal_target; mod t026_test_universal_unification_with_namespaceless_universal_target; mod t027_test_universal_unification_with_namespaceless_universal_target; mod t028_test_universal_unification_with_namespaceless_universal_target; mod t029_test_universal_unification_with_namespaceless_universal_target; mod t030_test_universal_unification_with_namespaceless_universal_target; mod t031_test_universal_unification_with_namespaced_universal_target; mod t032_test_universal_unification_with_namespaced_universal_target; mod t033_test_universal_unification_with_namespaced_universal_target; mod t034_test_universal_unification_with_namespaceless_element_target; mod t035_test_universal_unification_with_namespaceless_element_target; mod t036_test_universal_unification_with_namespaceless_element_target; mod t037_test_universal_unification_with_namespaceless_element_target; mod t038_test_universal_unification_with_namespaceless_element_target; mod t039_test_universal_unification_with_namespaceless_element_target; mod t040_test_universal_unification_with_namespaced_element_target; mod t041_test_universal_unification_with_namespaced_element_target; mod t042_test_universal_unification_with_namespaced_element_target; mod t043_test_element_unification_with_simple_target; mod t044_test_element_unification_with_simple_target; mod t045_test_element_unification_with_simple_target; mod t046_test_element_unification_with_simple_target; mod t047_test_element_unification_with_namespaceless_universal_target; mod t048_test_element_unification_with_namespaceless_universal_target; mod t049_test_element_unification_with_namespaceless_universal_target; mod t050_test_element_unification_with_namespaceless_universal_target; mod t051_test_element_unification_with_namespaceless_universal_target; mod t052_test_element_unification_with_namespaceless_universal_target; mod t053_test_element_unification_with_namespaced_universal_target; mod t054_test_element_unification_with_namespaced_universal_target; mod t055_test_element_unification_with_namespaced_universal_target; mod t056_test_element_unification_with_namespaceless_element_target; mod t057_test_element_unification_with_namespaceless_element_target; mod t058_test_element_unification_with_namespaceless_element_target; mod t059_test_element_unification_with_namespaceless_element_target; mod t060_test_element_unification_with_namespaceless_element_target; mod t061_test_element_unification_with_namespaceless_element_target; mod t062_test_element_unification_with_namespaced_element_target; mod t063_test_element_unification_with_namespaced_element_target; mod t064_test_element_unification_with_namespaced_element_target; mod t065_test_attribute_unification; mod t066_test_attribute_unification; mod t067_test_attribute_unification; mod t068_test_attribute_unification; mod t069_test_attribute_unification; mod t070_test_pseudo_unification; mod t071_test_pseudo_unification; mod t072_test_pseudo_unification; mod t073_test_pseudo_unification; mod t074_test_pseudo_unification; mod t075_test_pseudo_unification; mod t076_test_pseudo_unification; mod t077_test_pseudo_unification; mod t078_test_pseudoelement_remains_at_end_of_selector; mod t079_test_pseudoelement_remains_at_end_of_selector; mod t080_test_pseudoclass_remains_at_end_of_selector; mod t081_test_pseudoclass_remains_at_end_of_selector; mod t082_test_not_remains_at_end_of_selector; mod t083_test_pseudoelement_goes_lefter_than_pseudoclass; mod t084_test_pseudoelement_goes_lefter_than_pseudoclass; mod t085_test_pseudoelement_goes_lefter_than_not; mod t086_1_test_pseudoelement_goes_lefter_than_not; mod t086_test_pseudoelement_goes_lefter_than_not; mod t087_test_negation_unification; mod t088_test_negation_unification; mod t089_test_negation_unification; mod t091_test_redundant_selector_elimination; mod t094_test_long_extendee_runs_unification; mod t095_test_long_extender; mod t096_test_long_extender_runs_unification; mod t097_test_nested_extender; mod t098_test_nested_extender_runs_unification; mod t099_test_nested_extender_alternates_parents; mod t100_test_nested_extender_unifies_identical_parents; mod t101_test_nested_extender_unifies_common_substring; mod t102_test_nested_extender_unifies_common_subseq; mod t103_test_nested_extender_chooses_first_subseq; mod t104_test_nested_extender_counts_extended_subselectors; mod t105_test_nested_extender_counts_extended_superselectors; mod t106_test_nested_extender_with_child_selector; mod t107_test_nested_extender_finds_common_selectors_around_child_selector; mod t108_test_nested_extender_finds_common_selectors_around_child_selector; mod t109_test_nested_extender_finds_common_selectors_around_adjacent_sibling; mod t110_test_nested_extender_finds_common_selectors_around_adjacent_sibling; mod t111_test_nested_extender_finds_common_selectors_around_adjacent_sibling; mod t112_test_nested_extender_finds_common_selectors_around_sibling_selector; mod t113_test_nested_extender_finds_common_selectors_around_sibling_selector; mod t114_test_nested_extender_finds_common_selectors_around_sibling_selector; mod t118_test_nested_extender_with_early_child_selectors_doesnt_subseq_them; mod t119_test_nested_extender_with_early_child_selectors_doesnt_subseq_them; mod t120_test_nested_extender_with_child_selector_unifies; mod t121_test_nested_extender_with_child_selector_unifies; mod t122_test_nested_extender_with_child_selector_unifies; mod t123_test_nested_extender_with_early_child_selector; mod t124_test_nested_extender_with_early_child_selector; mod t125_test_nested_extender_with_early_child_selector; mod t126_test_nested_extender_with_early_child_selector; mod t127_test_nested_extender_with_early_child_selector; mod t128_test_nested_extender_with_sibling_selector; mod t129_test_nested_extender_with_hacky_selector; mod t130_test_nested_extender_with_hacky_selector; mod t131_test_nested_extender_merges_with_same_selector; mod t132_test_nested_extender_with_child_selector_merges_with_same_selector; mod t133_test_combinator_unification_for_hacky_combinators; mod t134_test_combinator_unification_for_hacky_combinators; mod t135_test_combinator_unification_for_hacky_combinators; mod t136_test_combinator_unification_for_hacky_combinators; mod t137_test_combinator_unification_for_hacky_combinators; mod t138_test_combinator_unification_for_hacky_combinators; mod t139_test_combinator_unification_for_hacky_combinators; mod t140_test_combinator_unification_double_tilde; mod t141_test_combinator_unification_double_tilde; mod t142_test_combinator_unification_double_tilde; mod t143_test_combinator_unification_double_tilde; mod t144_test_combinator_unification_tilde_plus; mod t145_test_combinator_unification_tilde_plus; mod t146_test_combinator_unification_tilde_plus; mod t147_test_combinator_unification_tilde_plus; mod t148_test_combinator_unification_tilde_plus; mod t149_test_combinator_unification_tilde_plus; mod t150_test_combinator_unification_tilde_plus; mod t151_test_combinator_unification_tilde_plus; mod t152_test_combinator_unification_angle_sibling; mod t153_test_combinator_unification_angle_sibling; mod t154_test_combinator_unification_angle_sibling; mod t155_test_combinator_unification_angle_sibling; mod t156_test_combinator_unification_double_angle; mod t157_test_combinator_unification_double_angle; mod t158_test_combinator_unification_double_angle; mod t159_test_combinator_unification_double_angle; mod t160_test_combinator_unification_double_plus; mod t161_test_combinator_unification_double_plus; mod t162_test_combinator_unification_double_plus; mod t163_test_combinator_unification_double_plus; mod t164_test_combinator_unification_angle_space; mod t165_test_combinator_unification_angle_space; mod t166_test_combinator_unification_angle_space; mod t167_test_combinator_unification_angle_space; mod t168_test_combinator_unification_angle_space; mod t169_test_combinator_unification_angle_space; mod t170_test_combinator_unification_plus_space; mod t171_test_combinator_unification_plus_space; mod t172_test_combinator_unification_plus_space; mod t173_test_combinator_unification_plus_space; mod t174_test_combinator_unification_plus_space; mod t175_test_combinator_unification_plus_space; mod t176_test_combinator_unification_nested; mod t177_test_combinator_unification_nested; mod t178_test_combinator_unification_with_newlines; mod t179_test_extend_self_loop; mod t180_test_basic_extend_loop; mod t181_test_three_level_extend_loop; mod t182_test_nested_extend_loop; mod t183_test_multiple_extender_merges_with_superset_selector; mod t184_test_control_flow_if; mod t185_test_control_flow_for; mod t186_test_control_flow_while; mod t187_test_basic_placeholder_selector; mod t188_test_unused_placeholder_selector; mod t189_test_placeholder_descendant_selector; mod t190_test_semi_placeholder_selector; mod t191_test_placeholder_selector_with_multiple_extenders; mod t192_test_placeholder_interpolation; mod t193_test_media_in_placeholder_selector; mod t194_test_extend_within_media; mod t195_test_extend_within_unknown_directive; mod t196_test_extend_within_nested_directives; mod t197_test_extend_within_disparate_media; mod t198_test_extend_within_disparate_unknown_directive; mod t199_test_extend_within_disparate_nested_directives; mod t206_test_extend_succeeds_when_one_extension_fails_but_others_dont; mod t207_test_optional_extend_succeeds_when_extendee_doesnt_exist; mod t208_test_optional_extend_succeeds_when_extension_fails; mod t209_test_pseudo_element_superselector; mod t210_test_pseudo_element_superselector; mod t211_test_pseudo_element_superselector; mod t212_test_pseudo_element_superselector; mod t213_test_pseudo_element_superselector; mod t214_test_pseudo_element_superselector; mod t215_test_multiple_source_redundancy_elimination; mod t216_test_nested_sibling_extend; mod t217_test_parent_and_sibling_extend; mod t218_test_nested_extend_specificity; mod t219_test_nested_double_extend_optimization; mod t220_test_extend_in_double_nested_media_query; mod t221_test_partially_failed_extend; mod t223_test_duplicated_selector_with_newlines; mod t224_test_nested_selector_with_child_selector_hack_extendee; mod t225_test_nested_selector_with_child_selector_hack_extender; mod t226_test_nested_selector_with_child_selector_hack_extender_and_extendee; mod t227_test_nested_with_child_hack_extender_and_sibling_extendee; mod t228_test_nested_with_child_selector_hack_extender_extendee_newline; mod t229_test_extended_parent_and_child_redundancy_elimination; mod t230_test_extend_redundancy_elimination_when_it_would_reduce_specificity; mod t231_test_extend_redundancy_elimination_when_it_would_preserve_specificity; mod t232_test_extend_redundancy_elimination_never_eliminates_base_selector; mod t233_test_extend_cross_branch_redundancy_elimination; mod t234_test_extend_cross_branch_redundancy_elimination; mod t235_extend_with_universal_selector; mod t236_extend_with_universal_selector_empty_namespace; mod t237_extend_with_universal_selector_different_namespace; mod t238_unify_root_pseudoelement; mod compound_unification_in_not; mod does_not_move_page_block_in_media; mod escaped_selector; mod extend_extender; mod extend_loop; mod extend_result_of_extend; mod extend_self; mod fake_pseudo_element_order; mod issue_146; mod nested_compound_unification; mod not_into_not_not; mod selector_list; rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/nested_compound_unification.rs000066400000000000000000000012051474765622100320550ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/nested-compound-unification.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("nested-compound-unification") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok( "// Make sure compound unification properly handles weaving together parent\ \n// selectors.\ \n.a .b {@extend .e}\ \n.c .d {@extend .f}\ \n.e.f {x: y}\n" ), ".e.f, .a .f.b, .c .e.d, .a .c .b.d, .c .a .b.d {\ \n x: y;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/not_into_not_not.rs000066400000000000000000000007401474765622100276730ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/not-into-not-not.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("not-into-not-not") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("// Regression test for dart-sass#191.\ \n:not(:not(.x)) {a: b}\ \n:not(.y) {@extend .x}\n"), ":not(:not(.x)) {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/selector_list.rs000066400000000000000000000013671474765622100271630ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/selector_list.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("selector_list") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok( ".foo {a: b}\ \n.bar {x: y}\n\ \n// Extending a selector list is equivalent to writing two @extends.\ \n.baz {@extend .foo, .bar}\n\ \n// The selector list should be parsed after interpolation is resolved.\ \n.bang {@extend .foo #{\",\"} .bar}\n" ), ".foo, .bang, .baz {\ \n a: b;\ \n}\ \n.bar, .bang, .baz {\ \n x: y;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t001_test_basic.rs000066400000000000000000000006261474765622100271710ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/001_test_basic.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("001_test_basic") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".foo {a: b}\ \n.bar {@extend .foo}\n"), ".foo, .bar {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t002_test_basic.rs000066400000000000000000000006261474765622100271720ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/002_test_basic.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("002_test_basic") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".bar {@extend .foo}\ \n.foo {a: b}\n"), ".foo, .bar {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t003_test_basic.rs000066400000000000000000000007211474765622100271670ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/003_test_basic.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("003_test_basic") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".foo {a: b}\ \n.bar {c: d; @extend .foo}\n"), ".foo, .bar {\ \n a: b;\ \n}\ \n.bar {\ \n c: d;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t004_test_basic.rs000066400000000000000000000007211474765622100271700ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/004_test_basic.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("004_test_basic") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".foo {a: b}\ \n.bar {@extend .foo; c: d}\n"), ".foo, .bar {\ \n a: b;\ \n}\ \n.bar {\ \n c: d;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t005_test_multiple_targets.rs000066400000000000000000000010251474765622100314720ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/005_test_multiple_targets.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("005_test_multiple_targets") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".foo {a: b}\ \n.bar {@extend .foo}\ \n.blip .foo {c: d}\n"), ".foo, .bar {\ \n a: b;\ \n}\ \n.blip .foo, .blip .bar {\ \n c: d;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t006_test_multiple_extendees.rs000066400000000000000000000010251474765622100320060ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/006_test_multiple_extendees.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("006_test_multiple_extendees") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".foo {a: b}\ \n.bar {c: d}\ \n.baz {@extend .foo; @extend .bar}\n"), ".foo, .baz {\ \n a: b;\ \n}\ \n.bar, .baz {\ \n c: d;\ \n}\n" ); } t007_test_multiple_extends_with_single_extender_and_single_target.rs000066400000000000000000000010741474765622100414450ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/007_test_multiple_extends_with_single_extender_and_single_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "007_test_multiple_extends_with_single_extender_and_single_target", ) } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".foo .bar {a: b}\ \n.baz {@extend .foo; @extend .bar}\n"), ".foo .bar, .foo .baz, .baz .bar, .baz .baz {\ \n a: b;\ \n}\n" ); } t008_test_multiple_extends_with_single_extender_and_single_target.rs000066400000000000000000000010371474765622100414450ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/008_test_multiple_extends_with_single_extender_and_single_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "008_test_multiple_extends_with_single_extender_and_single_target", ) } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".foo.bar {a: b}\ \n.baz {@extend .foo; @extend .bar}\n"), ".foo.bar, .baz {\ \n a: b;\ \n}\n" ); } t009_test_multiple_extends_with_multiple_extenders_and_single_target.rs000066400000000000000000000011331474765622100422000ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/009_test_multiple_extends_with_multiple_extenders_and_single_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "009_test_multiple_extends_with_multiple_extenders_and_single_target", ) } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".foo .bar {a: b}\ \n.baz {@extend .foo}\ \n.bang {@extend .bar}\n"), ".foo .bar, .foo .bang, .baz .bar, .baz .bang {\ \n a: b;\ \n}\n" ); } t010_test_multiple_extends_with_multiple_extenders_and_single_target.rs000066400000000000000000000011261474765622100421720ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/010_test_multiple_extends_with_multiple_extenders_and_single_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "010_test_multiple_extends_with_multiple_extenders_and_single_target", ) } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".foo.bar {a: b}\ \n.baz {@extend .foo}\ \n.bang {@extend .bar}\n"), ".foo.bar, .foo.bang, .bar.baz, .baz.bang {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t011_test_chained_extends.rs000066400000000000000000000007761474765622100312440ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/011_test_chained_extends.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("011_test_chained_extends") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".foo {a: b}\ \n.bar {@extend .foo}\ \n.baz {@extend .bar}\ \n.bip {@extend .bar}\n"), ".foo, .bar, .bip, .baz {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t012_test_dynamic_extendee.rs000066400000000000000000000006631474765622100314200ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/012_test_dynamic_extendee.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("012_test_dynamic_extendee") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".foo {a: b}\ \n.bar {@extend #{\".foo\"}}\n"), ".foo, .bar {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t013_test_dynamic_extendee.rs000066400000000000000000000007301474765622100314140ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/013_test_dynamic_extendee.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("013_test_dynamic_extendee") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("[baz^=\"blip12px\"] {a: b}\ \n.bar {@extend [baz^=\"blip#{12px}\"]}\n"), "[baz^=blip12px], .bar {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t014_test_nested_target.rs000066400000000000000000000006651474765622100307470ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/014_test_nested_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("014_test_nested_target") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".foo .bar {a: b}\ \n.baz {@extend .bar}\n"), ".foo .bar, .foo .baz {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t015_test_target_with_child.rs000066400000000000000000000006751474765622100316050ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/015_test_target_with_child.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("015_test_target_with_child") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".foo .bar {a: b}\ \n.baz {@extend .foo}\n"), ".foo .bar, .baz .bar {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t016_test_class_unification.rs000066400000000000000000000007251474765622100316130ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/016_test_class_unification.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("016_test_class_unification") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a .foo.bar {a: b}\ \n.baz {@extend .foo} -a {@extend %-a}\n"), "-a .foo.bar, -a .bar.baz {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t017_test_class_unification.rs000066400000000000000000000007041474765622100316110ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/017_test_class_unification.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("017_test_class_unification") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a .foo.baz {a: b}\ \n.baz {@extend .foo} -a {@extend %-a}\n"), "-a .baz {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t018_test_id_unification.rs000066400000000000000000000007171474765622100311050ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/018_test_id_unification.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("018_test_id_unification") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a .foo.bar {a: b}\ \n#baz {@extend .foo} -a {@extend %-a}\n"), "-a .foo.bar, -a .bar#baz {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t019_test_id_unification.rs000066400000000000000000000006761474765622100311120ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/019_test_id_unification.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("019_test_id_unification") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a .foo#baz {a: b}\ \n#baz {@extend .foo} -a {@extend %-a}\n"), "-a #baz {\ \n a: b;\ \n}\n" ); } t020_test_universal_unification_with_simple_target.rs000066400000000000000000000007611474765622100364040ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/020_test_universal_unification_with_simple_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("020_test_universal_unification_with_simple_target") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a .foo {a: b}\ \n* {@extend .foo} -a {@extend %-a}\n"), "-a * {\ \n a: b;\ \n}\n" ); } t021_test_universal_unification_with_simple_target.rs000066400000000000000000000007651474765622100364110ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/021_test_universal_unification_with_simple_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("021_test_universal_unification_with_simple_target") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a .foo {a: b}\ \n*|* {@extend .foo} -a {@extend %-a}\n"), "-a *|* {\ \n a: b;\ \n}\n" ); } t022_test_universal_unification_with_simple_target.rs000066400000000000000000000007701474765622100364060ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/022_test_universal_unification_with_simple_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("022_test_universal_unification_with_simple_target") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a .foo.bar {a: b}\ \n* {@extend .foo} -a {@extend %-a}\n"), "-a .bar {\ \n a: b;\ \n}\n" ); } t023_test_universal_unification_with_simple_target.rs000066400000000000000000000007721474765622100364110ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/023_test_universal_unification_with_simple_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("023_test_universal_unification_with_simple_target") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a .foo.bar {a: b}\ \n*|* {@extend .foo} -a {@extend %-a}\n"), "-a .bar {\ \n a: b;\ \n}\n" ); } t024_test_universal_unification_with_simple_target.rs000066400000000000000000000010141474765622100364000ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/024_test_universal_unification_with_simple_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("024_test_universal_unification_with_simple_target") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a .foo.bar {a: b}\ \nns|* {@extend .foo} -a {@extend %-a}\n"), "-a .foo.bar, -a ns|*.bar {\ \n a: b;\ \n}\n" ); } t025_test_universal_unification_with_namespaceless_universal_target.rs000066400000000000000000000010321474765622100420230ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/025_test_universal_unification_with_namespaceless_universal_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "025_test_universal_unification_with_namespaceless_universal_target", ) } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a *.foo {a: b}\ \n* {@extend .foo} -a {@extend %-a}\n"), "-a * {\ \n a: b;\ \n}\n" ); } t026_test_universal_unification_with_namespaceless_universal_target.rs000066400000000000000000000010341474765622100420260ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/026_test_universal_unification_with_namespaceless_universal_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "026_test_universal_unification_with_namespaceless_universal_target", ) } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a *.foo {a: b}\ \n*|* {@extend .foo} -a {@extend %-a}\n"), "-a * {\ \n a: b;\ \n}\n" ); } t027_test_universal_unification_with_namespaceless_universal_target.rs000066400000000000000000000010341474765622100420270ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/027_test_universal_unification_with_namespaceless_universal_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "027_test_universal_unification_with_namespaceless_universal_target", ) } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a *|*.foo {a: b}\ \n* {@extend .foo} -a {@extend %-a}\n"), "-a * {\ \n a: b;\ \n}\n" ); } t028_test_universal_unification_with_namespaceless_universal_target.rs000066400000000000000000000010401474765622100420250ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/028_test_universal_unification_with_namespaceless_universal_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "028_test_universal_unification_with_namespaceless_universal_target", ) } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a *|*.foo {a: b}\ \n*|* {@extend .foo} -a {@extend %-a}\n"), "-a *|* {\ \n a: b;\ \n}\n" ); } t029_test_universal_unification_with_namespaceless_universal_target.rs000066400000000000000000000010411474765622100420270ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/029_test_universal_unification_with_namespaceless_universal_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "029_test_universal_unification_with_namespaceless_universal_target", ) } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a *.foo {a: b}\ \nns|* {@extend .foo} -a {@extend %-a}\n"), "-a *.foo {\ \n a: b;\ \n}\n" ); } t030_test_universal_unification_with_namespaceless_universal_target.rs000066400000000000000000000010561474765622100420250ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/030_test_universal_unification_with_namespaceless_universal_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "030_test_universal_unification_with_namespaceless_universal_target", ) } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a *|*.foo {a: b}\ \nns|* {@extend .foo} -a {@extend %-a}\n"), "-a *|*.foo, -a ns|* {\ \n a: b;\ \n}\n" ); } t031_test_universal_unification_with_namespaced_universal_target.rs000066400000000000000000000010361474765622100413010ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/031_test_universal_unification_with_namespaced_universal_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "031_test_universal_unification_with_namespaced_universal_target", ) } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a ns|*.foo {a: b}\ \n* {@extend .foo} -a {@extend %-a}\n"), "-a ns|*.foo {\ \n a: b;\ \n}\n" ); } t032_test_universal_unification_with_namespaced_universal_target.rs000066400000000000000000000010341474765622100413000ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/032_test_universal_unification_with_namespaced_universal_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "032_test_universal_unification_with_namespaced_universal_target", ) } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a ns|*.foo {a: b}\ \n*|* {@extend .foo} -a {@extend %-a}\n"), "-a ns|* {\ \n a: b;\ \n}\n" ); } t033_test_universal_unification_with_namespaced_universal_target.rs000066400000000000000000000010351474765622100413020ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/033_test_universal_unification_with_namespaced_universal_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "033_test_universal_unification_with_namespaced_universal_target", ) } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a ns|*.foo {a: b}\ \nns|* {@extend .foo} -a {@extend %-a}\n"), "-a ns|* {\ \n a: b;\ \n}\n" ); } t034_test_universal_unification_with_namespaceless_element_target.rs000066400000000000000000000010261474765622100414470ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/034_test_universal_unification_with_namespaceless_element_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "034_test_universal_unification_with_namespaceless_element_target", ) } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a a.foo {a: b}\ \n* {@extend .foo} -a {@extend %-a}\n"), "-a a {\ \n a: b;\ \n}\n" ); } t035_test_universal_unification_with_namespaceless_element_target.rs000066400000000000000000000010301474765622100414430ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/035_test_universal_unification_with_namespaceless_element_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "035_test_universal_unification_with_namespaceless_element_target", ) } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a a.foo {a: b}\ \n*|* {@extend .foo} -a {@extend %-a}\n"), "-a a {\ \n a: b;\ \n}\n" ); } t036_test_universal_unification_with_namespaceless_element_target.rs000066400000000000000000000010441474765622100414510ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/036_test_universal_unification_with_namespaceless_element_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "036_test_universal_unification_with_namespaceless_element_target", ) } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a *|a.foo {a: b}\ \n* {@extend .foo} -a {@extend %-a}\n"), "-a *|a.foo, -a a {\ \n a: b;\ \n}\n" ); } t037_test_universal_unification_with_namespaceless_element_target.rs000066400000000000000000000010341474765622100414510ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/037_test_universal_unification_with_namespaceless_element_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "037_test_universal_unification_with_namespaceless_element_target", ) } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a *|a.foo {a: b}\ \n*|* {@extend .foo} -a {@extend %-a}\n"), "-a *|a {\ \n a: b;\ \n}\n" ); } t038_test_universal_unification_with_namespaceless_element_target.rs000066400000000000000000000010351474765622100414530ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/038_test_universal_unification_with_namespaceless_element_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "038_test_universal_unification_with_namespaceless_element_target", ) } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a a.foo {a: b}\ \nns|* {@extend .foo} -a {@extend %-a}\n"), "-a a.foo {\ \n a: b;\ \n}\n" ); } t039_test_universal_unification_with_namespaceless_element_target.rs000066400000000000000000000010521474765622100414530ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/039_test_universal_unification_with_namespaceless_element_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "039_test_universal_unification_with_namespaceless_element_target", ) } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a *|a.foo {a: b}\ \nns|* {@extend .foo} -a {@extend %-a}\n"), "-a *|a.foo, -a ns|a {\ \n a: b;\ \n}\n" ); } t040_test_universal_unification_with_namespaced_element_target.rs000066400000000000000000000010321474765622100407160ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/040_test_universal_unification_with_namespaced_element_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "040_test_universal_unification_with_namespaced_element_target", ) } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a ns|a.foo {a: b}\ \n* {@extend .foo} -a {@extend %-a}\n"), "-a ns|a.foo {\ \n a: b;\ \n}\n" ); } t041_test_universal_unification_with_namespaced_element_target.rs000066400000000000000000000010301474765622100407150ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/041_test_universal_unification_with_namespaced_element_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "041_test_universal_unification_with_namespaced_element_target", ) } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a ns|a.foo {a: b}\ \n*|* {@extend .foo} -a {@extend %-a}\n"), "-a ns|a {\ \n a: b;\ \n}\n" ); } t042_test_universal_unification_with_namespaced_element_target.rs000066400000000000000000000010311474765622100407170ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/042_test_universal_unification_with_namespaced_element_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "042_test_universal_unification_with_namespaced_element_target", ) } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a ns|a.foo {a: b}\ \nns|* {@extend .foo} -a {@extend %-a}\n"), "-a ns|a {\ \n a: b;\ \n}\n" ); } t043_test_element_unification_with_simple_target.rs000066400000000000000000000007661474765622100360370ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/043_test_element_unification_with_simple_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("043_test_element_unification_with_simple_target") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a .foo {a: b}\ \na {@extend .foo} -a {@extend %-a}\n"), "-a .foo, -a a {\ \n a: b;\ \n}\n" ); } t044_test_element_unification_with_simple_target.rs000066400000000000000000000010021474765622100360200ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/044_test_element_unification_with_simple_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("044_test_element_unification_with_simple_target") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a .foo.bar {a: b}\ \na {@extend .foo} -a {@extend %-a}\n"), "-a .foo.bar, -a a.bar {\ \n a: b;\ \n}\n" ); } t045_test_element_unification_with_simple_target.rs000066400000000000000000000010061474765622100360250ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/045_test_element_unification_with_simple_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("045_test_element_unification_with_simple_target") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a .foo.bar {a: b}\ \n*|a {@extend .foo} -a {@extend %-a}\n"), "-a .foo.bar, -a *|a.bar {\ \n a: b;\ \n}\n" ); } t046_test_element_unification_with_simple_target.rs000066400000000000000000000010101474765622100360210ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/046_test_element_unification_with_simple_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("046_test_element_unification_with_simple_target") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a .foo.bar {a: b}\ \nns|a {@extend .foo} -a {@extend %-a}\n"), "-a .foo.bar, -a ns|a.bar {\ \n a: b;\ \n}\n" ); } t047_test_element_unification_with_namespaceless_universal_target.rs000066400000000000000000000010401474765622100414470ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/047_test_element_unification_with_namespaceless_universal_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "047_test_element_unification_with_namespaceless_universal_target", ) } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a *.foo {a: b}\ \na {@extend .foo} -a {@extend %-a}\n"), "-a *.foo, -a a {\ \n a: b;\ \n}\n" ); } t048_test_element_unification_with_namespaceless_universal_target.rs000066400000000000000000000010421474765622100414520ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/048_test_element_unification_with_namespaceless_universal_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "048_test_element_unification_with_namespaceless_universal_target", ) } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a *.foo {a: b}\ \n*|a {@extend .foo} -a {@extend %-a}\n"), "-a *.foo, -a a {\ \n a: b;\ \n}\n" ); } t049_test_element_unification_with_namespaceless_universal_target.rs000066400000000000000000000010441474765622100414550ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/049_test_element_unification_with_namespaceless_universal_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "049_test_element_unification_with_namespaceless_universal_target", ) } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a *|*.foo {a: b}\ \na {@extend .foo} -a {@extend %-a}\n"), "-a *|*.foo, -a a {\ \n a: b;\ \n}\n" ); } t050_test_element_unification_with_namespaceless_universal_target.rs000066400000000000000000000010501474765622100414420ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/050_test_element_unification_with_namespaceless_universal_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "050_test_element_unification_with_namespaceless_universal_target", ) } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a *|*.foo {a: b}\ \n*|a {@extend .foo} -a {@extend %-a}\n"), "-a *|*.foo, -a *|a {\ \n a: b;\ \n}\n" ); } t051_test_element_unification_with_namespaceless_universal_target.rs000066400000000000000000000010351474765622100414460ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/051_test_element_unification_with_namespaceless_universal_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "051_test_element_unification_with_namespaceless_universal_target", ) } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a *.foo {a: b}\ \nns|a {@extend .foo} -a {@extend %-a}\n"), "-a *.foo {\ \n a: b;\ \n}\n" ); } t052_test_element_unification_with_namespaceless_universal_target.rs000066400000000000000000000010521474765622100414460ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/052_test_element_unification_with_namespaceless_universal_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "052_test_element_unification_with_namespaceless_universal_target", ) } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a *|*.foo {a: b}\ \nns|a {@extend .foo} -a {@extend %-a}\n"), "-a *|*.foo, -a ns|a {\ \n a: b;\ \n}\n" ); } t053_test_element_unification_with_namespaced_universal_target.rs000066400000000000000000000010321474765622100407220ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/053_test_element_unification_with_namespaced_universal_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "053_test_element_unification_with_namespaced_universal_target", ) } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a ns|*.foo {a: b}\ \na {@extend .foo} -a {@extend %-a}\n"), "-a ns|*.foo {\ \n a: b;\ \n}\n" ); } t054_test_element_unification_with_namespaced_universal_target.rs000066400000000000000000000010451474765622100407270ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/054_test_element_unification_with_namespaced_universal_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "054_test_element_unification_with_namespaced_universal_target", ) } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a ns|*.foo {a: b}\ \n*|a {@extend .foo} -a {@extend %-a}\n"), "-a ns|*.foo, -a ns|a {\ \n a: b;\ \n}\n" ); } t055_test_element_unification_with_namespaced_universal_target.rs000066400000000000000000000010461474765622100407310ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/055_test_element_unification_with_namespaced_universal_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "055_test_element_unification_with_namespaced_universal_target", ) } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a ns|*.foo {a: b}\ \nns|a {@extend .foo} -a {@extend %-a}\n"), "-a ns|*.foo, -a ns|a {\ \n a: b;\ \n}\n" ); } t056_test_element_unification_with_namespaceless_element_target.rs000066400000000000000000000010221474765622100410700ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/056_test_element_unification_with_namespaceless_element_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "056_test_element_unification_with_namespaceless_element_target", ) } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a a.foo {a: b}\ \na {@extend .foo} -a {@extend %-a}\n"), "-a a {\ \n a: b;\ \n}\n" ); } t057_test_element_unification_with_namespaceless_element_target.rs000066400000000000000000000010241474765622100410730ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/057_test_element_unification_with_namespaceless_element_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "057_test_element_unification_with_namespaceless_element_target", ) } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a a.foo {a: b}\ \n*|a {@extend .foo} -a {@extend %-a}\n"), "-a a {\ \n a: b;\ \n}\n" ); } t058_test_element_unification_with_namespaceless_element_target.rs000066400000000000000000000010401474765622100410720ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/058_test_element_unification_with_namespaceless_element_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "058_test_element_unification_with_namespaceless_element_target", ) } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a *|a.foo {a: b}\ \na {@extend .foo} -a {@extend %-a}\n"), "-a *|a.foo, -a a {\ \n a: b;\ \n}\n" ); } t059_test_element_unification_with_namespaceless_element_target.rs000066400000000000000000000010301474765622100410720ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/059_test_element_unification_with_namespaceless_element_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "059_test_element_unification_with_namespaceless_element_target", ) } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a *|a.foo {a: b}\ \n*|a {@extend .foo} -a {@extend %-a}\n"), "-a *|a {\ \n a: b;\ \n}\n" ); } t060_test_element_unification_with_namespaceless_element_target.rs000066400000000000000000000010311474765622100410630ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/060_test_element_unification_with_namespaceless_element_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "060_test_element_unification_with_namespaceless_element_target", ) } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a a.foo {a: b}\ \nns|a {@extend .foo} -a {@extend %-a}\n"), "-a a.foo {\ \n a: b;\ \n}\n" ); } t061_test_element_unification_with_namespaceless_element_target.rs000066400000000000000000000010461474765622100410720ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/061_test_element_unification_with_namespaceless_element_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "061_test_element_unification_with_namespaceless_element_target", ) } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a *|a.foo {a: b}\ \nns|a {@extend .foo} -a {@extend %-a}\n"), "-a *|a.foo, -a ns|a {\ \n a: b;\ \n}\n" ); } t062_test_element_unification_with_namespaced_element_target.rs000066400000000000000000000010261474765622100403460ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/062_test_element_unification_with_namespaced_element_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "062_test_element_unification_with_namespaced_element_target", ) } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a ns|a.foo {a: b}\ \na {@extend .foo} -a {@extend %-a}\n"), "-a ns|a.foo {\ \n a: b;\ \n}\n" ); } t063_test_element_unification_with_namespaced_element_target.rs000066400000000000000000000010241474765622100403450ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/063_test_element_unification_with_namespaced_element_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "063_test_element_unification_with_namespaced_element_target", ) } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a ns|a.foo {a: b}\ \n*|a {@extend .foo} -a {@extend %-a}\n"), "-a ns|a {\ \n a: b;\ \n}\n" ); } t064_test_element_unification_with_namespaced_element_target.rs000066400000000000000000000010251474765622100403470ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/064_test_element_unification_with_namespaced_element_target.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "064_test_element_unification_with_namespaced_element_target", ) } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a ns|a.foo {a: b}\ \nns|a {@extend .foo} -a {@extend %-a}\n"), "-a ns|a {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t065_test_attribute_unification.rs000066400000000000000000000007661474765622100325220ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/065_test_attribute_unification.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("065_test_attribute_unification") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a [foo=bar].baz {a: b}\ \n[foo=baz] {@extend .baz} -a {@extend %-a}\n"), "-a [foo=bar].baz, -a [foo=bar][foo=baz] {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t066_test_attribute_unification.rs000066400000000000000000000007701474765622100325160ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/066_test_attribute_unification.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("066_test_attribute_unification") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a [foo=bar].baz {a: b}\ \n[foo^=bar] {@extend .baz} -a {@extend %-a}\n"), "-a [foo=bar].baz, -a [foo=bar][foo^=bar] {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t067_test_attribute_unification.rs000066400000000000000000000007701474765622100325170ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/067_test_attribute_unification.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("067_test_attribute_unification") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a [foo=bar].baz {a: b}\ \n[foot=bar] {@extend .baz} -a {@extend %-a}\n"), "-a [foo=bar].baz, -a [foo=bar][foot=bar] {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t068_test_attribute_unification.rs000066400000000000000000000007741474765622100325240ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/068_test_attribute_unification.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("068_test_attribute_unification") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a [foo=bar].baz {a: b}\ \n[ns|foo=bar] {@extend .baz} -a {@extend %-a}\n"), "-a [foo=bar].baz, -a [foo=bar][ns|foo=bar] {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t069_test_attribute_unification.rs000066400000000000000000000007421474765622100325200ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/069_test_attribute_unification.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("069_test_attribute_unification") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a %-a [foo=bar].bar {a: b}\ \n[foo=bar] {@extend .bar} -a {@extend %-a}\n"), "-a -a [foo=bar] {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t070_test_pseudo_unification.rs000066400000000000000000000007431474765622100320050ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/070_test_pseudo_unification.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("070_test_pseudo_unification") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a :foo.baz {a: b}\ \n:foo(2n+1) {@extend .baz} -a {@extend %-a}\n"), "-a :foo.baz, -a :foo:foo(2n+1) {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t071_test_pseudo_unification.rs000066400000000000000000000007311474765622100320030ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/071_test_pseudo_unification.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("071_test_pseudo_unification") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a :foo.baz {a: b}\ \n::foo {@extend .baz} -a {@extend %-a}\n"), "-a :foo.baz, -a :foo::foo {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t072_test_pseudo_unification.rs000066400000000000000000000007111474765622100320020ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/072_test_pseudo_unification.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("072_test_pseudo_unification") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a ::foo.baz {a: b}\ \n::foo {@extend .baz} -a {@extend %-a}\n"), "-a ::foo {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t073_test_pseudo_unification.rs000066400000000000000000000007331474765622100320070ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/073_test_pseudo_unification.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("073_test_pseudo_unification") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a ::foo(2n+1).baz {a: b}\ \n::foo(2n+1) {@extend .baz} -a {@extend %-a}\n"), "-a ::foo(2n+1) {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t074_test_pseudo_unification.rs000066400000000000000000000007271474765622100320130ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/074_test_pseudo_unification.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("074_test_pseudo_unification") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a :foo.baz {a: b}\ \n:bar {@extend .baz} -a {@extend %-a}\n"), "-a :foo.baz, -a :foo:bar {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t075_test_pseudo_unification.rs000066400000000000000000000007331474765622100320110ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/075_test_pseudo_unification.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("075_test_pseudo_unification") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a .baz:foo {a: b}\ \n:after {@extend .baz} -a {@extend %-a}\n"), "-a .baz:foo, -a :foo:after {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t076_test_pseudo_unification.rs000066400000000000000000000007351474765622100320140ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/076_test_pseudo_unification.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("076_test_pseudo_unification") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a .baz:after {a: b}\ \n:foo {@extend .baz} -a {@extend %-a}\n"), "-a .baz:after, -a :foo:after {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t077_test_pseudo_unification.rs000066400000000000000000000007061474765622100320130ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/077_test_pseudo_unification.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("077_test_pseudo_unification") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a :foo.baz {a: b}\ \n:foo {@extend .baz} -a {@extend %-a}\n"), "-a :foo {\ \n a: b;\ \n}\n" ); } t078_test_pseudoelement_remains_at_end_of_selector.rs000066400000000000000000000007641474765622100363370ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/078_test_pseudoelement_remains_at_end_of_selector.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("078_test_pseudoelement_remains_at_end_of_selector") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".foo::bar {a: b}\ \n.baz {@extend .foo}\n"), ".foo::bar, .baz::bar {\ \n a: b;\ \n}\n" ); } t079_test_pseudoelement_remains_at_end_of_selector.rs000066400000000000000000000007671474765622100363430ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/079_test_pseudoelement_remains_at_end_of_selector.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("079_test_pseudoelement_remains_at_end_of_selector") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("a.foo::bar {a: b}\ \n.baz {@extend .foo}\n"), "a.foo::bar, a.baz::bar {\ \n a: b;\ \n}\n" ); } t080_test_pseudoclass_remains_at_end_of_selector.rs000066400000000000000000000007551474765622100360040ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/080_test_pseudoclass_remains_at_end_of_selector.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("080_test_pseudoclass_remains_at_end_of_selector") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".foo:bar {a: b}\ \n.baz {@extend .foo}\n"), ".foo:bar, .baz:bar {\ \n a: b;\ \n}\n" ); } t081_test_pseudoclass_remains_at_end_of_selector.rs000066400000000000000000000007601474765622100360010ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/081_test_pseudoclass_remains_at_end_of_selector.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("081_test_pseudoclass_remains_at_end_of_selector") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("a.foo:bar {a: b}\ \n.baz {@extend .foo}\n"), "a.foo:bar, a.baz:bar {\ \n a: b;\ \n}\n" ); } t082_test_not_remains_at_end_of_selector.rs000066400000000000000000000007461474765622100342610ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/082_test_not_remains_at_end_of_selector.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("082_test_not_remains_at_end_of_selector") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".foo:not(.bar) {a: b}\ \n.baz {@extend .foo}\n"), ".foo:not(.bar), .baz:not(.bar) {\ \n a: b;\ \n}\n" ); } t083_test_pseudoelement_goes_lefter_than_pseudoclass.rs000066400000000000000000000010021474765622100366760ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/083_test_pseudoelement_goes_lefter_than_pseudoclass.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("083_test_pseudoelement_goes_lefter_than_pseudoclass") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".foo::bar {a: b}\ \n.baz:bang {@extend .foo}\n"), ".foo::bar, .baz:bang::bar {\ \n a: b;\ \n}\n" ); } t084_test_pseudoelement_goes_lefter_than_pseudoclass.rs000066400000000000000000000010011474765622100366760ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/084_test_pseudoelement_goes_lefter_than_pseudoclass.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("084_test_pseudoelement_goes_lefter_than_pseudoclass") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".foo:bar {a: b}\ \n.baz::bang {@extend .foo}\n"), ".foo:bar, .baz:bar::bang {\ \n a: b;\ \n}\n" ); } t085_test_pseudoelement_goes_lefter_than_not.rs000066400000000000000000000007651474765622100351720ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/085_test_pseudoelement_goes_lefter_than_not.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("085_test_pseudoelement_goes_lefter_than_not") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".foo::bar {a: b}\ \n.baz:not(.bang) {@extend .foo}\n"), ".foo::bar, .baz:not(.bang)::bar {\ \n a: b;\ \n}\n" ); } t086_1_test_pseudoelement_goes_lefter_than_not.rs000066400000000000000000000013261474765622100354050ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/086.1_test_pseudoelement_goes_lefter_than_not.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("086.1_test_pseudoelement_goes_lefter_than_not") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%a {\ \n x:y;\ \n}\ \nb:after:not(:first-child) {\ \n @extend %a;\ \n}\ \nc:s {\ \n @extend %a; \ \n}\ \nd::e {\ \n @extend c;\ \n}"), "c:s, d:s::e, b:after:not(:first-child) {\ \n x: y;\ \n}\n" ); } t086_test_pseudoelement_goes_lefter_than_not.rs000066400000000000000000000007731474765622100351720ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/086_test_pseudoelement_goes_lefter_than_not.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("086_test_pseudoelement_goes_lefter_than_not") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".foo:not(.bang) {a: b}\ \n.baz::bar {@extend .foo}\n"), ".foo:not(.bang), .baz:not(.bang)::bar {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t087_test_negation_unification.rs000066400000000000000000000007711474765622100323230ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/087_test_negation_unification.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("087_test_negation_unification") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a :not(.foo).baz {a: b}\ \n:not(.bar) {@extend .baz} -a {@extend %-a}\n"), "-a :not(.foo).baz, -a :not(.foo):not(.bar) {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t088_test_negation_unification.rs000066400000000000000000000007341474765622100323230ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/088_test_negation_unification.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("088_test_negation_unification") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a :not(.foo).baz {a: b}\ \n:not(.foo) {@extend .baz} -a {@extend %-a}\n"), "-a :not(.foo) {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t089_test_negation_unification.rs000066400000000000000000000007411474765622100323220ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/089_test_negation_unification.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("089_test_negation_unification") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a :not([a=b]).baz {a: b}\ \n:not([a = b]) {@extend .baz} -a {@extend %-a}\n"), "-a :not([a=b]) {\ \n a: b;\ \n}\n" ); } t091_test_redundant_selector_elimination.rs000066400000000000000000000007761474765622100343240ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/091_test_redundant_selector_elimination.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("091_test_redundant_selector_elimination") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".foo.bar {a: b}\ \n.x {@extend .foo, .bar}\ \n.y {@extend .foo, .bar}\n"), ".foo.bar, .y, .x {\ \n a: b;\ \n}\n" ); } t094_test_long_extendee_runs_unification.rs000066400000000000000000000014061474765622100343210ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/094_test_long_extendee_runs_unification.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("094_test_long_extendee_runs_unification") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "ns|*.foo.bar {a: b}\ \na.baz {@extend .foo.bar}\n" ), "Error: compound selectors may no longer be extended.\ \nConsider `@extend .foo, .bar` instead.\ \nSee https://sass-lang.com/d/extend-compound for details.\n\ \n ,\ \n2 | a.baz {@extend .foo.bar}\ \n | ^^^^^^^^\ \n \'\ \n input.scss 2:16 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t095_test_long_extender.rs000066400000000000000000000006741474765622100307650ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/095_test_long_extender.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("095_test_long_extender") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".foo.bar {a: b}\ \n.baz.bang {@extend .foo}\n"), ".foo.bar, .bar.baz.bang {\ \n a: b;\ \n}\n" ); } t096_test_long_extender_runs_unification.rs000066400000000000000000000007231474765622100343410ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/096_test_long_extender_runs_unification.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("096_test_long_extender_runs_unification") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("ns|*.foo.bar {a: b}\ \na.baz {@extend .foo}\n"), "ns|*.foo.bar {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t097_test_nested_extender.rs000066400000000000000000000006601474765622100313050ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/097_test_nested_extender.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("097_test_nested_extender") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".foo {a: b}\ \nfoo bar {@extend .foo}\n"), ".foo, foo bar {\ \n a: b;\ \n}\n" ); } t098_test_nested_extender_runs_unification.rs000066400000000000000000000007361474765622100346720ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/098_test_nested_extender_runs_unification.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("098_test_nested_extender_runs_unification") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".foo.bar {a: b}\ \nfoo bar {@extend .foo}\n"), ".foo.bar, foo bar.bar {\ \n a: b;\ \n}\n" ); } t099_test_nested_extender_alternates_parents.rs000066400000000000000000000010621474765622100352030ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/099_test_nested_extender_alternates_parents.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("099_test_nested_extender_alternates_parents") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok( ".baz .bip .foo {a: b}\ \nfoo .grank bar {@extend .foo}\n" ), ".baz .bip .foo, .baz .bip foo .grank bar, foo .grank .baz .bip bar {\ \n a: b;\ \n}\n" ); } t100_test_nested_extender_unifies_identical_parents.rs000066400000000000000000000010151474765622100364740ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/100_test_nested_extender_unifies_identical_parents.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("100_test_nested_extender_unifies_identical_parents") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".baz .bip .foo {a: b}\ \n.baz .bip bar {@extend .foo}\n"), ".baz .bip .foo, .baz .bip bar {\ \n a: b;\ \n}\n" ); } t101_test_nested_extender_unifies_common_substring.rs000066400000000000000000000011561474765622100364030ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/101_test_nested_extender_unifies_common_substring.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("101_test_nested_extender_unifies_common_substring") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok( ".baz .bip .bap .bink .foo {a: b}\ \n.brat .bip .bap bar {@extend .foo}\n" ), ".baz .bip .bap .bink .foo, .baz .brat .bip .bap .bink bar, .brat .baz .bip .bap .bink bar {\ \n a: b;\ \n}\n" ); } t102_test_nested_extender_unifies_common_subseq.rs000066400000000000000000000011451474765622100356640ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/102_test_nested_extender_unifies_common_subseq.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("102_test_nested_extender_unifies_common_subseq") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok( ".a .x .b .y .foo {a: b}\ \n.a .n .b .m bar {@extend .foo}\n" ), ".a .x .b .y .foo, .a .x .n .b .y .m bar, .a .n .x .b .y .m bar, .a .x .n .b .m .y bar, .a .n .x .b .m .y bar {\ \n a: b;\ \n}\n" ); } t103_test_nested_extender_chooses_first_subseq.rs000066400000000000000000000010121474765622100355160ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/103_test_nested_extender_chooses_first_subseq.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("103_test_nested_extender_chooses_first_subseq") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".a .b .c .d .foo {a: b}\ \n.c .d .a .b .bar {@extend .foo}\n"), ".a .b .c .d .foo, .a .b .c .d .a .b .bar {\ \n a: b;\ \n}\n" ); } t104_test_nested_extender_counts_extended_subselectors/000077500000000000000000000000001474765622100367135ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_testsmod.rs000066400000000000000000000005241474765622100400410ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t104_test_nested_extender_counts_extended_subselectors//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/104_test_nested_extender_counts_extended_subselectors" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("104_test_nested_extender_counts_extended_subselectors") } mod t104_test_nested_extender_counts_extended_subselectors; t104_test_nested_extender_counts_extended_subselectors.rs000066400000000000000000000011471474765622100523230ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t104_test_nested_extender_counts_extended_subselectors//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/104_test_nested_extender_counts_extended_subselectors/104_test_nested_extender_counts_extended_subselectors.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("104_test_nested_extender_counts_extended_subselectors") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".a .bip.bop .foo {a: b}\ \n.b .bip .bar {@extend .foo}\n"), ".a .bip.bop .foo, .a .b .bip.bop .bar, .b .a .bip.bop .bar {\ \n a: b;\ \n}\n" ); } t105_test_nested_extender_counts_extended_superselectors.rs000066400000000000000000000010611474765622100376250ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/105_test_nested_extender_counts_extended_superselectors.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("105_test_nested_extender_counts_extended_superselectors") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".a .bip .foo {a: b}\ \n.b .bip.bop .bar {@extend .foo}\n"), ".a .bip .foo, .a .b .bip.bop .bar, .b .a .bip.bop .bar {\ \n a: b;\ \n}\n" ); } t106_test_nested_extender_with_child_selector.rs000066400000000000000000000007531474765622100353160ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/106_test_nested_extender_with_child_selector.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("106_test_nested_extender_with_child_selector") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".baz .foo {a: b}\ \nfoo > bar {@extend .foo}\n"), ".baz .foo, .baz foo > bar {\ \n a: b;\ \n}\n" ); } t107_test_nested_extender_finds_common_selectors_around_child_selector.rs000066400000000000000000000010441474765622100424440ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/107_test_nested_extender_finds_common_selectors_around_child_selector.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("107_test_nested_extender_finds_common_selectors_around_child_selector") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("a > b c .c1 {a: b}\ \na c .c2 {@extend .c1}\n"), "a > b c .c1, a > b c .c2 {\ \n a: b;\ \n}\n" ); } t108_test_nested_extender_finds_common_selectors_around_child_selector.rs000066400000000000000000000010441474765622100424450ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/108_test_nested_extender_finds_common_selectors_around_child_selector.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("108_test_nested_extender_finds_common_selectors_around_child_selector") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("a > b c .c1 {a: b}\ \nb c .c2 {@extend .c1}\n"), "a > b c .c1, a > b c .c2 {\ \n a: b;\ \n}\n" ); } t109_test_nested_extender_finds_common_selectors_around_adjacent_sibling.rs000066400000000000000000000010711474765622100427430ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/109_test_nested_extender_finds_common_selectors_around_adjacent_sibling.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("109_test_nested_extender_finds_common_selectors_around_adjacent_sibling") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("a + b c .c1 {a: b}\ \na c .c2 {@extend .c1}\n"), "a + b c .c1, a + b a c .c2, a a + b c .c2 {\ \n a: b;\ \n}\n" ); } t110_test_nested_extender_finds_common_selectors_around_adjacent_sibling.rs000066400000000000000000000010521474765622100427320ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/110_test_nested_extender_finds_common_selectors_around_adjacent_sibling.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("110_test_nested_extender_finds_common_selectors_around_adjacent_sibling") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("a + b c .c1 {a: b}\ \na b .c2 {@extend .c1}\n"), "a + b c .c1, a a + b c .c2 {\ \n a: b;\ \n}\n" ); } t111_test_nested_extender_finds_common_selectors_around_adjacent_sibling.rs000066400000000000000000000010501474765622100427310ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/111_test_nested_extender_finds_common_selectors_around_adjacent_sibling.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("111_test_nested_extender_finds_common_selectors_around_adjacent_sibling") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("a + b c .c1 {a: b}\ \nb c .c2 {@extend .c1}\n"), "a + b c .c1, a + b c .c2 {\ \n a: b;\ \n}\n" ); } t112_test_nested_extender_finds_common_selectors_around_sibling_selector.rs000066400000000000000000000010711474765622100430040ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/112_test_nested_extender_finds_common_selectors_around_sibling_selector.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("112_test_nested_extender_finds_common_selectors_around_sibling_selector") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("a ~ b c .c1 {a: b}\ \na c .c2 {@extend .c1}\n"), "a ~ b c .c1, a ~ b a c .c2, a a ~ b c .c2 {\ \n a: b;\ \n}\n" ); } t113_test_nested_extender_finds_common_selectors_around_sibling_selector.rs000066400000000000000000000010521474765622100430040ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/113_test_nested_extender_finds_common_selectors_around_sibling_selector.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("113_test_nested_extender_finds_common_selectors_around_sibling_selector") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("a ~ b c .c1 {a: b}\ \na b .c2 {@extend .c1}\n"), "a ~ b c .c1, a a ~ b c .c2 {\ \n a: b;\ \n}\n" ); } t114_test_nested_extender_finds_common_selectors_around_sibling_selector.rs000066400000000000000000000010501474765622100430030ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/114_test_nested_extender_finds_common_selectors_around_sibling_selector.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("114_test_nested_extender_finds_common_selectors_around_sibling_selector") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("a ~ b c .c1 {a: b}\ \nb c .c2 {@extend .c1}\n"), "a ~ b c .c1, a ~ b c .c2 {\ \n a: b;\ \n}\n" ); } t118_test_nested_extender_with_early_child_selectors_doesnt_subseq_them.rs000066400000000000000000000012021474765622100426410ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/118_test_nested_extender_with_early_child_selectors_doesnt_subseq_them.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("118_test_nested_extender_with_early_child_selectors_doesnt_subseq_them") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok( ".bip > .bap .foo {a: b}\ \n.grip > .bap .bar {@extend .foo}\n" ), ".bip > .bap .foo, .bip > .bap .grip > .bap .bar, .grip > .bap .bip > .bap .bar {\ \n a: b;\ \n}\n" ); } t119_test_nested_extender_with_early_child_selectors_doesnt_subseq_them.rs000066400000000000000000000012021474765622100426420ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/119_test_nested_extender_with_early_child_selectors_doesnt_subseq_them.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("119_test_nested_extender_with_early_child_selectors_doesnt_subseq_them") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok( ".bap > .bip .foo {a: b}\ \n.bap > .grip .bar {@extend .foo}\n" ), ".bap > .bip .foo, .bap > .bip .bap > .grip .bar, .bap > .grip .bap > .bip .bar {\ \n a: b;\ \n}\n" ); } t120_test_nested_extender_with_child_selector_unifies.rs000066400000000000000000000010011474765622100370170ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/120_test_nested_extender_with_child_selector_unifies.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("120_test_nested_extender_with_child_selector_unifies") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".baz.foo {a: b}\ \nfoo > bar {@extend .foo}\n"), ".baz.foo, foo > bar.baz {\ \n a: b;\ \n}\n" ); } t121_test_nested_extender_with_child_selector_unifies.rs000066400000000000000000000010441474765622100370270ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/121_test_nested_extender_with_child_selector_unifies.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("121_test_nested_extender_with_child_selector_unifies") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".baz > {\ \n.foo {a: b}\ \n.bar {@extend .foo}\ \n}\n"), ".baz > .foo, .baz > .bar {\ \n a: b;\ \n}\n" ); } t122_test_nested_extender_with_child_selector_unifies.rs000066400000000000000000000010421474765622100370260ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/122_test_nested_extender_with_child_selector_unifies.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("122_test_nested_extender_with_child_selector_unifies") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".foo {\ \n.bar {a: b}\ \n> .baz {@extend .bar}\ \n}\n"), ".foo .bar, .foo > .baz {\ \n a: b;\ \n}\n" ); } t123_test_nested_extender_with_early_child_selector.rs000066400000000000000000000010501474765622100365000ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/123_test_nested_extender_with_early_child_selector.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("123_test_nested_extender_with_early_child_selector") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".foo {\ \n.bar {a: b}\ \n.bip > .baz {@extend .bar}\ \n}\n"), ".foo .bar, .foo .bip > .baz {\ \n a: b;\ \n}\n" ); } t124_test_nested_extender_with_early_child_selector.rs000066400000000000000000000010621474765622100365040ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/124_test_nested_extender_with_early_child_selector.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("124_test_nested_extender_with_early_child_selector") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".foo {\ \n.bip .bar {a: b}\ \n> .baz {@extend .bar}\ \n}\n"), ".foo .bip .bar, .foo .bip .foo > .baz {\ \n a: b;\ \n}\n" ); } t125_test_nested_extender_with_early_child_selector.rs000066400000000000000000000010121474765622100365000ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/125_test_nested_extender_with_early_child_selector.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("125_test_nested_extender_with_early_child_selector") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".foo > .bar {a: b}\ \n.bip + .baz {@extend .bar}\n"), ".foo > .bar, .foo > .bip + .baz {\ \n a: b;\ \n}\n" ); } t126_test_nested_extender_with_early_child_selector.rs000066400000000000000000000010121474765622100365010ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/126_test_nested_extender_with_early_child_selector.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("126_test_nested_extender_with_early_child_selector") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".foo + .bar {a: b}\ \n.bip > .baz {@extend .bar}\n"), ".foo + .bar, .bip > .foo + .baz {\ \n a: b;\ \n}\n" ); } t127_test_nested_extender_with_early_child_selector.rs000066400000000000000000000010071474765622100365060ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/127_test_nested_extender_with_early_child_selector.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("127_test_nested_extender_with_early_child_selector") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".foo > .bar {a: b}\ \n.bip > .baz {@extend .bar}\n"), ".foo > .bar, .foo.bip > .baz {\ \n a: b;\ \n}\n" ); } t128_test_nested_extender_with_sibling_selector.rs000066400000000000000000000007571474765622100356720ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/128_test_nested_extender_with_sibling_selector.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("128_test_nested_extender_with_sibling_selector") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".baz .foo {a: b}\ \nfoo + bar {@extend .foo}\n"), ".baz .foo, .baz foo + bar {\ \n a: b;\ \n}\n" ); } t129_test_nested_extender_with_hacky_selector.rs000066400000000000000000000007411474765622100353340ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/129_test_nested_extender_with_hacky_selector.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("129_test_nested_extender_with_hacky_selector") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".baz .foo {a: b}\ \nfoo + > > + bar {@extend .foo}\n"), ".baz .foo {\ \n a: b;\ \n}\n" ); } t130_test_nested_extender_with_hacky_selector.rs000066400000000000000000000007311474765622100353230ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/130_test_nested_extender_with_hacky_selector.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("130_test_nested_extender_with_hacky_selector") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".baz .foo {a: b}\ \n> > bar {@extend .foo}\n"), ".baz .foo {\ \n a: b;\ \n}\n" ); } t131_test_nested_extender_merges_with_same_selector.rs000066400000000000000000000010121474765622100365050ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/131_test_nested_extender_merges_with_same_selector.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("131_test_nested_extender_merges_with_same_selector") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".foo {\ \n.bar {a: b}\ \n.baz {@extend .bar} }\n"), ".foo .bar, .foo .baz {\ \n a: b;\ \n}\n" ); } t132_test_nested_extender_with_child_selector_merges_with_same_selector.rs000066400000000000000000000011011474765622100426030ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/132_test_nested_extender_with_child_selector_merges_with_same_selector.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("132_test_nested_extender_with_child_selector_merges_with_same_selector") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".foo > .bar .baz {a: b}\ \n.foo > .bar .bang {@extend .baz}\n"), ".foo > .bar .baz, .foo > .bar .bang {\ \n a: b;\ \n}\n" ); } t133_test_combinator_unification_for_hacky_combinators.rs000066400000000000000000000006761474765622100372160ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/133_test_combinator_unification_for_hacky_combinators.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("133_test_combinator_unification_for_hacky_combinators") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".a > + x {a: b}\ \n.b y {@extend x}\n"), "" ); } t134_test_combinator_unification_for_hacky_combinators.rs000066400000000000000000000007501474765622100372100ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/134_test_combinator_unification_for_hacky_combinators.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("134_test_combinator_unification_for_hacky_combinators") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".a x {a: b}\ \n.b > + y {@extend x}\n"), ".a x {\ \n a: b;\ \n}\n" ); } t135_test_combinator_unification_for_hacky_combinators.rs000066400000000000000000000007021474765622100372060ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/135_test_combinator_unification_for_hacky_combinators.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("135_test_combinator_unification_for_hacky_combinators") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".a > + x {a: b}\ \n.b > + y {@extend x}\n"), "" ); } t136_test_combinator_unification_for_hacky_combinators.rs000066400000000000000000000007041474765622100372110ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/136_test_combinator_unification_for_hacky_combinators.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("136_test_combinator_unification_for_hacky_combinators") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".a ~ > + x {a: b}\ \n.b > + y {@extend x}\n"), "" ); } t137_test_combinator_unification_for_hacky_combinators.rs000066400000000000000000000007021474765622100372100ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/137_test_combinator_unification_for_hacky_combinators.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("137_test_combinator_unification_for_hacky_combinators") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".a + > x {a: b}\ \n.b > + y {@extend x}\n"), "" ); } t138_test_combinator_unification_for_hacky_combinators.rs000066400000000000000000000007021474765622100372110ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/138_test_combinator_unification_for_hacky_combinators.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("138_test_combinator_unification_for_hacky_combinators") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".a + > x {a: b}\ \n.b > + y {@extend x}\n"), "" ); } t139_test_combinator_unification_for_hacky_combinators.rs000066400000000000000000000007161474765622100372170ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/139_test_combinator_unification_for_hacky_combinators.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("139_test_combinator_unification_for_hacky_combinators") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".a ~ > + .b > x {a: b}\ \n.c > + .d > y {@extend x}\n"), "" ); } t140_test_combinator_unification_double_tilde.rs000066400000000000000000000007351474765622100352760ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/140_test_combinator_unification_double_tilde.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("140_test_combinator_unification_double_tilde") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".a.b ~ x {a: b}\ \n.a ~ y {@extend x}\n"), ".a.b ~ x, .a.b ~ y {\ \n a: b;\ \n}\n" ); } t141_test_combinator_unification_double_tilde.rs000066400000000000000000000007331474765622100352750ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/141_test_combinator_unification_double_tilde.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("141_test_combinator_unification_double_tilde") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".a ~ x {a: b}\ \n.a.b ~ y {@extend x}\n"), ".a ~ x, .a.b ~ y {\ \n a: b;\ \n}\n" ); } t142_test_combinator_unification_double_tilde.rs000066400000000000000000000007631474765622100353010ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/142_test_combinator_unification_double_tilde.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("142_test_combinator_unification_double_tilde") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".a ~ x {a: b}\ \n.b ~ y {@extend x}\n"), ".a ~ x, .a ~ .b ~ y, .b ~ .a ~ y, .a.b ~ y {\ \n a: b;\ \n}\n" ); } t143_test_combinator_unification_double_tilde.rs000066400000000000000000000007601474765622100352770ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/143_test_combinator_unification_double_tilde.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("143_test_combinator_unification_double_tilde") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("a.a ~ x {a: b}\ \nb.b ~ y {@extend x}\n"), "a.a ~ x, a.a ~ b.b ~ y, b.b ~ a.a ~ y {\ \n a: b;\ \n}\n" ); } t144_test_combinator_unification_tilde_plus.rs000066400000000000000000000007311474765622100350070ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/144_test_combinator_unification_tilde_plus.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("144_test_combinator_unification_tilde_plus") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".a.b + x {a: b}\ \n.a ~ y {@extend x}\n"), ".a.b + x, .a.b + y {\ \n a: b;\ \n}\n" ); } t145_test_combinator_unification_tilde_plus.rs000066400000000000000000000007461474765622100350160ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/145_test_combinator_unification_tilde_plus.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("145_test_combinator_unification_tilde_plus") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".a + x {a: b}\ \n.a.b ~ y {@extend x}\n"), ".a + x, .a.b ~ .a + y, .a.b + y {\ \n a: b;\ \n}\n" ); } t146_test_combinator_unification_tilde_plus.rs000066400000000000000000000007421474765622100350130ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/146_test_combinator_unification_tilde_plus.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("146_test_combinator_unification_tilde_plus") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".a + x {a: b}\ \n.b ~ y {@extend x}\n"), ".a + x, .b ~ .a + y, .b.a + y {\ \n a: b;\ \n}\n" ); } t147_test_combinator_unification_tilde_plus.rs000066400000000000000000000007351474765622100350160ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/147_test_combinator_unification_tilde_plus.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("147_test_combinator_unification_tilde_plus") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("a.a + x {a: b}\ \nb.b ~ y {@extend x}\n"), "a.a + x, b.b ~ a.a + y {\ \n a: b;\ \n}\n" ); } t148_test_combinator_unification_tilde_plus.rs000066400000000000000000000007501474765622100350140ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/148_test_combinator_unification_tilde_plus.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("148_test_combinator_unification_tilde_plus") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".a.b ~ x {a: b}\ \n.a + y {@extend x}\n"), ".a.b ~ x, .a.b ~ .a + y, .a.b + y {\ \n a: b;\ \n}\n" ); } t149_test_combinator_unification_tilde_plus.rs000066400000000000000000000007271474765622100350210ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/149_test_combinator_unification_tilde_plus.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("149_test_combinator_unification_tilde_plus") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".a ~ x {a: b}\ \n.a.b + y {@extend x}\n"), ".a ~ x, .a.b + y {\ \n a: b;\ \n}\n" ); } t150_test_combinator_unification_tilde_plus.rs000066400000000000000000000007421474765622100350060ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/150_test_combinator_unification_tilde_plus.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("150_test_combinator_unification_tilde_plus") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".a ~ x {a: b}\ \n.b + y {@extend x}\n"), ".a ~ x, .a ~ .b + y, .a.b + y {\ \n a: b;\ \n}\n" ); } t151_test_combinator_unification_tilde_plus.rs000066400000000000000000000007351474765622100350110ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/151_test_combinator_unification_tilde_plus.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("151_test_combinator_unification_tilde_plus") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("a.a ~ x {a: b}\ \nb.b + y {@extend x}\n"), "a.a ~ x, a.a ~ b.b + y {\ \n a: b;\ \n}\n" ); } t152_test_combinator_unification_angle_sibling.rs000066400000000000000000000007361474765622100354440ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/152_test_combinator_unification_angle_sibling.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("152_test_combinator_unification_angle_sibling") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".a > x {a: b}\ \n.b ~ y {@extend x}\n"), ".a > x, .a > .b ~ y {\ \n a: b;\ \n}\n" ); } t153_test_combinator_unification_angle_sibling.rs000066400000000000000000000007361474765622100354450ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/153_test_combinator_unification_angle_sibling.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("153_test_combinator_unification_angle_sibling") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".a > x {a: b}\ \n.b + y {@extend x}\n"), ".a > x, .a > .b + y {\ \n a: b;\ \n}\n" ); } t154_test_combinator_unification_angle_sibling.rs000066400000000000000000000007361474765622100354460ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/154_test_combinator_unification_angle_sibling.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("154_test_combinator_unification_angle_sibling") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".a ~ x {a: b}\ \n.b > y {@extend x}\n"), ".a ~ x, .b > .a ~ y {\ \n a: b;\ \n}\n" ); } t155_test_combinator_unification_angle_sibling.rs000066400000000000000000000007361474765622100354470ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/155_test_combinator_unification_angle_sibling.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("155_test_combinator_unification_angle_sibling") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".a + x {a: b}\ \n.b > y {@extend x}\n"), ".a + x, .b > .a + y {\ \n a: b;\ \n}\n" ); } t156_test_combinator_unification_double_angle.rs000066400000000000000000000007351474765622100352720ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/156_test_combinator_unification_double_angle.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("156_test_combinator_unification_double_angle") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".a.b > x {a: b}\ \n.b > y {@extend x}\n"), ".a.b > x, .a.b > y {\ \n a: b;\ \n}\n" ); } t157_test_combinator_unification_double_angle.rs000066400000000000000000000007331474765622100352710ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/157_test_combinator_unification_double_angle.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("157_test_combinator_unification_double_angle") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".a > x {a: b}\ \n.a.b > y {@extend x}\n"), ".a > x, .a.b > y {\ \n a: b;\ \n}\n" ); } t158_test_combinator_unification_double_angle.rs000066400000000000000000000007311474765622100352700ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/158_test_combinator_unification_double_angle.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("158_test_combinator_unification_double_angle") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".a > x {a: b}\ \n.b > y {@extend x}\n"), ".a > x, .a.b > y {\ \n a: b;\ \n}\n" ); } t159_test_combinator_unification_double_angle.rs000066400000000000000000000007221474765622100352710ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/159_test_combinator_unification_double_angle.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("159_test_combinator_unification_double_angle") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("a.a > x {a: b}\ \nb.b > y {@extend x}\n"), "a.a > x {\ \n a: b;\ \n}\n" ); } t160_test_combinator_unification_double_plus.rs000066400000000000000000000007331474765622100351600ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/160_test_combinator_unification_double_plus.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("160_test_combinator_unification_double_plus") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".a.b + x {a: b}\ \n.b + y {@extend x}\n"), ".a.b + x, .a.b + y {\ \n a: b;\ \n}\n" ); } t161_test_combinator_unification_double_plus.rs000066400000000000000000000007311474765622100351570ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/161_test_combinator_unification_double_plus.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("161_test_combinator_unification_double_plus") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".a + x {a: b}\ \n.a.b + y {@extend x}\n"), ".a + x, .a.b + y {\ \n a: b;\ \n}\n" ); } t162_test_combinator_unification_double_plus.rs000066400000000000000000000007271474765622100351650ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/162_test_combinator_unification_double_plus.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("162_test_combinator_unification_double_plus") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".a + x {a: b}\ \n.b + y {@extend x}\n"), ".a + x, .a.b + y {\ \n a: b;\ \n}\n" ); } t163_test_combinator_unification_double_plus.rs000066400000000000000000000007201474765622100351570ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/163_test_combinator_unification_double_plus.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("163_test_combinator_unification_double_plus") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("a.a + x {a: b}\ \nb.b + y {@extend x}\n"), "a.a + x {\ \n a: b;\ \n}\n" ); } t164_test_combinator_unification_angle_space.rs000066400000000000000000000007311474765622100351060ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/164_test_combinator_unification_angle_space.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("164_test_combinator_unification_angle_space") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".a.b > x {a: b}\ \n.a y {@extend x}\n"), ".a.b > x, .a.b > y {\ \n a: b;\ \n}\n" ); } t165_test_combinator_unification_angle_space.rs000066400000000000000000000007321474765622100351100ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/165_test_combinator_unification_angle_space.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("165_test_combinator_unification_angle_space") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".a > x {a: b}\ \n.a.b y {@extend x}\n"), ".a > x, .a.b .a > y {\ \n a: b;\ \n}\n" ); } t166_test_combinator_unification_angle_space.rs000066400000000000000000000007261474765622100351140ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/166_test_combinator_unification_angle_space.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("166_test_combinator_unification_angle_space") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".a > x {a: b}\ \n.b y {@extend x}\n"), ".a > x, .b .a > y {\ \n a: b;\ \n}\n" ); } t167_test_combinator_unification_angle_space.rs000066400000000000000000000007321474765622100351120ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/167_test_combinator_unification_angle_space.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("167_test_combinator_unification_angle_space") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".a.b x {a: b}\ \n.a > y {@extend x}\n"), ".a.b x, .a.b .a > y {\ \n a: b;\ \n}\n" ); } t168_test_combinator_unification_angle_space.rs000066400000000000000000000007251474765622100351150ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/168_test_combinator_unification_angle_space.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("168_test_combinator_unification_angle_space") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".a x {a: b}\ \n.a.b > y {@extend x}\n"), ".a x, .a.b > y {\ \n a: b;\ \n}\n" ); } t169_test_combinator_unification_angle_space.rs000066400000000000000000000007241474765622100351150ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/169_test_combinator_unification_angle_space.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("169_test_combinator_unification_angle_space") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".a x {a: b}\ \n.b > y {@extend x}\n"), ".a x, .a .b > y {\ \n a: b;\ \n}\n" ); } t170_test_combinator_unification_plus_space.rs000066400000000000000000000007321474765622100350010ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/170_test_combinator_unification_plus_space.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("170_test_combinator_unification_plus_space") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".a.b + x {a: b}\ \n.a y {@extend x}\n"), ".a.b + x, .a .a.b + y {\ \n a: b;\ \n}\n" ); } t171_test_combinator_unification_plus_space.rs000066400000000000000000000007301474765622100350000ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/171_test_combinator_unification_plus_space.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("171_test_combinator_unification_plus_space") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".a + x {a: b}\ \n.a.b y {@extend x}\n"), ".a + x, .a.b .a + y {\ \n a: b;\ \n}\n" ); } t172_test_combinator_unification_plus_space.rs000066400000000000000000000007241474765622100350040ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/172_test_combinator_unification_plus_space.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("172_test_combinator_unification_plus_space") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".a + x {a: b}\ \n.b y {@extend x}\n"), ".a + x, .b .a + y {\ \n a: b;\ \n}\n" ); } t173_test_combinator_unification_plus_space.rs000066400000000000000000000007301474765622100350020ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/173_test_combinator_unification_plus_space.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("173_test_combinator_unification_plus_space") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".a.b x {a: b}\ \n.a + y {@extend x}\n"), ".a.b x, .a.b .a + y {\ \n a: b;\ \n}\n" ); } t174_test_combinator_unification_plus_space.rs000066400000000000000000000007261474765622100350100ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/174_test_combinator_unification_plus_space.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("174_test_combinator_unification_plus_space") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".a x {a: b}\ \n.a.b + y {@extend x}\n"), ".a x, .a .a.b + y {\ \n a: b;\ \n}\n" ); } t175_test_combinator_unification_plus_space.rs000066400000000000000000000007221474765622100350050ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/175_test_combinator_unification_plus_space.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("175_test_combinator_unification_plus_space") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".a x {a: b}\ \n.b + y {@extend x}\n"), ".a x, .a .b + y {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t176_test_combinator_unification_nested.rs000066400000000000000000000007431474765622100342140ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/176_test_combinator_unification_nested.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("176_test_combinator_unification_nested") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".a > .b + x {a: b}\ \n.c > .d + y {@extend x}\n"), ".a > .b + x, .a.c > .b.d + y {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t177_test_combinator_unification_nested.rs000066400000000000000000000007341474765622100342150ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/177_test_combinator_unification_nested.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("177_test_combinator_unification_nested") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".a > .b + x {a: b}\ \n.c > y {@extend x}\n"), ".a > .b + x, .a.c > .b + y {\ \n a: b;\ \n}\n" ); } t178_test_combinator_unification_with_newlines.rs000066400000000000000000000010611474765622100355260ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/178_test_combinator_unification_with_newlines.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("178_test_combinator_unification_with_newlines") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".a >\ \n.b\ \n+ x {a: b}\ \n.c\ \n> .d +\ \ny {@extend x}\n"), ".a > .b + x, .a.c > .b.d + y {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t179_test_extend_self_loop.rs000066400000000000000000000006201474765622100314530ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/179_test_extend_self_loop.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("179_test_extend_self_loop") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".foo {a: b; @extend .foo}\n"), ".foo {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t180_test_basic_extend_loop.rs000066400000000000000000000007751474765622100316060ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/180_test_basic_extend_loop.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("180_test_basic_extend_loop") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".foo {a: b; @extend .bar}\ \n.bar {c: d; @extend .foo}\n"), ".foo, .bar {\ \n a: b;\ \n}\ \n.bar, .foo {\ \n c: d;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t181_test_three_level_extend_loop.rs000066400000000000000000000012001474765622100330040ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/181_test_three_level_extend_loop.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("181_test_three_level_extend_loop") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".foo {a: b; @extend .bar}\ \n.bar {c: d; @extend .baz}\ \n.baz {e: f; @extend .foo}\n"), ".foo, .baz, .bar {\ \n a: b;\ \n}\ \n.bar, .foo, .baz {\ \n c: d;\ \n}\ \n.baz, .bar, .foo {\ \n e: f;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t182_test_nested_extend_loop.rs000066400000000000000000000010301474765622100317720ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/182_test_nested_extend_loop.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("182_test_nested_extend_loop") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".bar {\ \na: b;\ \n.foo {c: d; @extend .bar}\ \n}\n"), ".bar, .bar .foo {\ \n a: b;\ \n}\ \n.bar .foo {\ \n c: d;\ \n}\n" ); } t183_test_multiple_extender_merges_with_superset_selector.rs000066400000000000000000000010141474765622100400140ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/183_test_multiple_extender_merges_with_superset_selector.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("183_test_multiple_extender_merges_with_superset_selector") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".foo {@extend .bar; @extend .baz}\ \na.bar.baz {a: b}\n"), "a.bar.baz, a.foo {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t184_test_control_flow_if.rs000066400000000000000000000014521474765622100313070ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/184_test_control_flow_if.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("184_test_control_flow_if") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".true { color: green; }\ \n.false { color: red; }\ \n.also-true {\ \n@if true { @extend .true; }\ \n@else { @extend .false; }\ \n}\ \n.also-false {\ \n@if false { @extend .true; }\ \n@else { @extend .false; }\ \n}\n"), ".true, .also-true {\ \n color: green;\ \n}\ \n.false, .also-false {\ \n color: red;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t185_test_control_flow_for.rs000066400000000000000000000014541474765622100315020ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/185_test_control_flow_for.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("185_test_control_flow_for") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".base-0 { color: green; }\ \n.base-1 { display: block; }\ \n.base-2 { border: 1px solid blue; }\ \n.added {\ \n@for $i from 0 to 3 {\ \n @extend .base-#{$i};\ \n}\ \n}\n"), ".base-0, .added {\ \n color: green;\ \n}\ \n.base-1, .added {\ \n display: block;\ \n}\ \n.base-2, .added {\ \n border: 1px solid blue;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t186_test_control_flow_while.rs000066400000000000000000000015411474765622100320220ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/186_test_control_flow_while.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("186_test_control_flow_while") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".base-0 { color: green; }\ \n.base-1 { display: block; }\ \n.base-2 { border: 1px solid blue; }\ \n.added {\ \n$i : 0;\ \n@while $i < 3 {\ \n @extend .base-#{$i};\ \n $i : $i + 1;\ \n}\ \n}\n"), ".base-0, .added {\ \n color: green;\ \n}\ \n.base-1, .added {\ \n display: block;\ \n}\ \n.base-2, .added {\ \n border: 1px solid blue;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t187_test_basic_placeholder_selector.rs000066400000000000000000000006721474765622100334530ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/187_test_basic_placeholder_selector.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("187_test_basic_placeholder_selector") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%foo {a: b}\ \n.bar {@extend %foo}\n"), ".bar {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t188_test_unused_placeholder_selector.rs000066400000000000000000000007541474765622100336770ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/188_test_unused_placeholder_selector.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("188_test_unused_placeholder_selector") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%foo {color: blue}\ \n%bar {color: red}\ \n.baz {@extend %foo}\n"), ".baz {\ \n color: blue;\ \n}\n" ); } t189_test_placeholder_descendant_selector.rs000066400000000000000000000007321474765622100344220ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/189_test_placeholder_descendant_selector.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("189_test_placeholder_descendant_selector") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("#context %foo a {a: b}\ \n.bar {@extend %foo}\n"), "#context .bar a {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t190_test_semi_placeholder_selector.rs000066400000000000000000000010251474765622100333120ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/190_test_semi_placeholder_selector.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("190_test_semi_placeholder_selector") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("#context %foo, .bar .baz {color: blue}\n\ \n.bat {\ \n @extend %foo;\ \n}\n"), "#context .bat, .bar .baz {\ \n color: blue;\ \n}\n" ); } t191_test_placeholder_selector_with_multiple_extenders.rs000066400000000000000000000010371474765622100372510ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/191_test_placeholder_selector_with_multiple_extenders.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("191_test_placeholder_selector_with_multiple_extenders") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%foo {color: blue}\ \n.bar {@extend %foo}\ \n.baz {@extend %foo}\n"), ".baz, .bar {\ \n color: blue;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t192_test_placeholder_interpolation.rs000066400000000000000000000007471474765622100333600ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/192_test_placeholder_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("192_test_placeholder_interpolation") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("$foo: foo;\n\ \n%#{$foo} {color: blue}\ \n.bar {@extend %foo}\n"), ".bar {\ \n color: blue;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t193_test_media_in_placeholder_selector.rs000066400000000000000000000007151474765622100341320ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/193_test_media_in_placeholder_selector.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("193_test_media_in_placeholder_selector") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok("%foo {bar {@media screen {a {b: c}}}}\ \n.baz {c: d}\n"), ".baz {\ \n c: d;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t194_test_extend_within_media.rs000066400000000000000000000010241474765622100321260ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/194_test_extend_within_media.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("194_test_extend_within_media") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("@media screen {\ \n.foo {a: b}\ \n.bar {@extend .foo}\ \n}\n"), "@media screen {\ \n .foo, .bar {\ \n a: b;\ \n }\ \n}\n" ); } t195_test_extend_within_unknown_directive.rs000066400000000000000000000010521474765622100345270ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/195_test_extend_within_unknown_directive.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("195_test_extend_within_unknown_directive") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("@flooblehoof {\ \n.foo {a: b}\ \n.bar {@extend .foo}\ \n}\n"), "@flooblehoof {\ \n .foo, .bar {\ \n a: b;\ \n }\ \n}\n" ); } t196_test_extend_within_nested_directives.rs000066400000000000000000000012241474765622100344770ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/196_test_extend_within_nested_directives.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("196_test_extend_within_nested_directives") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("@media screen {\ \n@flooblehoof {\ \n .foo {a: b}\ \n .bar {@extend .foo}\ \n}\ \n}\n"), "@media screen {\ \n @flooblehoof {\ \n .foo, .bar {\ \n a: b;\ \n }\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t197_test_extend_within_disparate_media.rs000066400000000000000000000010261474765622100341670ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/197_test_extend_within_disparate_media.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("197_test_extend_within_disparate_media") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("@media screen {.foo {a: b}}\ \n@media screen {.bar {@extend .foo}}\n"), "@media screen {\ \n .foo, .bar {\ \n a: b;\ \n }\ \n}\n" ); } t198_test_extend_within_disparate_unknown_directive.rs000066400000000000000000000011201474765622100365620ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/198_test_extend_within_disparate_unknown_directive.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("198_test_extend_within_disparate_unknown_directive") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("@flooblehoof {.foo {a: b}}\ \n@flooblehoof {.bar {@extend .foo}}\n"), "@flooblehoof {\ \n .foo, .bar {\ \n a: b;\ \n }\ \n}\ \n@flooblehoof {}\n" ); } t199_test_extend_within_disparate_nested_directives.rs000066400000000000000000000013201474765622100365330ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/199_test_extend_within_disparate_nested_directives.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("199_test_extend_within_disparate_nested_directives") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("@media screen {@flooblehoof {.foo {a: b}}}\ \n@media screen {@flooblehoof {.bar {@extend .foo}}}\n"), "@media screen {\ \n @flooblehoof {\ \n .foo, .bar {\ \n a: b;\ \n }\ \n }\ \n}\ \n@media screen {\ \n @flooblehoof {}\ \n}\n" ); } t206_test_extend_succeeds_when_one_extension_fails_but_others_dont.rs000066400000000000000000000011401474765622100416130ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/206_test_extend_succeeds_when_one_extension_fails_but_others_dont.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "206_test_extend_succeeds_when_one_extension_fails_but_others_dont", ) } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("a.bar {a: b}\ \n.bar {c: d}\ \nb.foo {@extend .bar}\n"), "a.bar {\ \n a: b;\ \n}\ \n.bar, b.foo {\ \n c: d;\ \n}\n" ); } t207_test_optional_extend_succeeds_when_extendee_doesnt_exist.rs000066400000000000000000000006511474765622100406030ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/207_test_optional_extend_succeeds_when_extendee_doesnt_exist.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "207_test_optional_extend_succeeds_when_extendee_doesnt_exist", ) } #[test] #[ignore] // unexepected error fn test() { assert_eq!(runner().ok(".foo {@extend .bar !optional}\n"), ""); } t208_test_optional_extend_succeeds_when_extension_fails.rs000066400000000000000000000007661474765622100374140ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/208_test_optional_extend_succeeds_when_extension_fails.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("208_test_optional_extend_succeeds_when_extension_fails") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("a.bar {a: b}\ \nb.foo {@extend .bar !optional}\n"), "a.bar {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t209_test_pseudo_element_superselector.rs000066400000000000000000000011041474765622100341010ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/209_test_pseudo_element_superselector.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("209_test_pseudo_element_superselector") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok( "%x#bar {a: b} // Add an id to make the results have high specificity\ \n%y, %y::fblthp {@extend %x}\ \na {@extend %y}\n" ), "a#bar, a#bar::fblthp {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t210_test_pseudo_element_superselector.rs000066400000000000000000000007471474765622100341050ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/210_test_pseudo_element_superselector.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("210_test_pseudo_element_superselector") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%x#bar {a: b}\ \n%y, %y:fblthp {@extend %x}\ \na {@extend %y}\n"), "a#bar {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t211_test_pseudo_element_superselector.rs000066400000000000000000000007751474765622100341070ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/211_test_pseudo_element_superselector.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("211_test_pseudo_element_superselector") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%x#bar {a: b}\ \n%y, %y:first-line {@extend %x}\ \na {@extend %y}\n"), "a#bar, a#bar:first-line {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t212_test_pseudo_element_superselector.rs000066400000000000000000000010011474765622100340670ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/212_test_pseudo_element_superselector.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("212_test_pseudo_element_superselector") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%x#bar {a: b}\ \n%y, %y:first-letter {@extend %x}\ \na {@extend %y}\n"), "a#bar, a#bar:first-letter {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t213_test_pseudo_element_superselector.rs000066400000000000000000000007651474765622100341100ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/213_test_pseudo_element_superselector.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("213_test_pseudo_element_superselector") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%x#bar {a: b}\ \n%y, %y:before {@extend %x}\ \na {@extend %y}\n"), "a#bar, a#bar:before {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t214_test_pseudo_element_superselector.rs000066400000000000000000000007631474765622100341070ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/214_test_pseudo_element_superselector.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("214_test_pseudo_element_superselector") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%x#bar {a: b}\ \n%y, %y:after {@extend %x}\ \na {@extend %y}\n"), "a#bar, a#bar:after {\ \n a: b;\ \n}\n" ); } t215_test_multiple_source_redundancy_elimination.rs000066400000000000000000000015131474765622100360530ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/215_test_multiple_source_redundancy_elimination.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("215_test_multiple_source_redundancy_elimination") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%default-color {color: red}\ \n%alt-color {color: green}\n\ \n%default-style {\ \n@extend %default-color;\ \n&:hover {@extend %alt-color}\ \n&:active {@extend %default-color}\ \n}\n\ \n.test-case {@extend %default-style}\n"), ".test-case:active, .test-case {\ \n color: red;\ \n}\ \n.test-case:hover {\ \n color: green;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t216_test_nested_sibling_extend.rs000066400000000000000000000011631474765622100324550ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/216_test_nested_sibling_extend.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("216_test_nested_sibling_extend") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".foo {@extend .bar}\n\ \n.parent {\ \n.bar {\ \n width: 2000px;\ \n}\ \n.foo {\ \n @extend .bar\ \n}\ \n}\n"), ".parent .bar, .parent .foo {\ \n width: 2000px;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t217_test_parent_and_sibling_extend.rs000066400000000000000000000013311474765622100333040ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/217_test_parent_and_sibling_extend.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("217_test_parent_and_sibling_extend") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok( "%foo %bar%baz {c: d}\n\ \n.parent1 {\ \n@extend %foo;\ \n.child1 {@extend %bar}\ \n}\n\ \n.parent2 {\ \n@extend %foo;\ \n.child2 {@extend %baz}\ \n}\n" ), ".parent1 .parent2 .child1.child2, .parent2 .parent1 .child1.child2 {\ \n c: d;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t218_test_nested_extend_specificity.rs000066400000000000000000000010121474765622100333340ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/218_test_nested_extend_specificity.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("218_test_nested_extend_specificity") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%foo {a: b}\n\ \na {\ \n:b {@extend %foo}\ \n:b:c {@extend %foo}\ \n}\n"), "a :b:c, a :b {\ \n a: b;\ \n}\n" ); } t219_test_nested_double_extend_optimization.rs000066400000000000000000000012761474765622100350370ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/219_test_nested_double_extend_optimization.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("219_test_nested_double_extend_optimization") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%foo %bar {\ \na: b;\ \n}\n\ \n.parent1 {\ \n@extend %foo;\n\ \n.child {\ \n @extend %bar;\ \n}\ \n}\n\ \n.parent2 {\ \n@extend %foo;\ \n}\n"), ".parent1 .child {\ \n a: b;\ \n}\n" ); } t220_test_extend_in_double_nested_media_query.rs000066400000000000000000000012231474765622100352630ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/220_test_extend_in_double_nested_media_query.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("220_test_extend_in_double_nested_media_query") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("@media all {\ \n@media (orientation: landscape) {\ \n %foo {color: blue}\ \n .bar {@extend %foo}\ \n}\ \n}\n"), "@media (orientation: landscape) {\ \n .bar {\ \n color: blue;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t221_test_partially_failed_extend.rs000066400000000000000000000011231474765622100327610ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/221_test_partially_failed_extend.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("221_test_partially_failed_extend") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("test { @extend .rc; }\ \n.rc {color: white;}\ \n.prices span.pill span.rc {color: red;}\n"), ".rc, test {\ \n color: white;\ \n}\ \n.prices span.pill span.rc {\ \n color: red;\ \n}\n" ); } t223_test_duplicated_selector_with_newlines.rs000066400000000000000000000012611474765622100350100ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/223_test_duplicated_selector_with_newlines.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("223_test_duplicated_selector_with_newlines") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".example-1-1,\ \n.example-1-2,\ \n.example-1-3 {\ \na: b;\ \n}\n\ \n.my-page-1 .my-module-1-1 {@extend .example-1-2}\n"), ".example-1-1,\ \n.example-1-2,\ \n.my-page-1 .my-module-1-1,\ \n.example-1-3 {\ \n a: b;\ \n}\n" ); } t224_test_nested_selector_with_child_selector_hack_extendee.rs000066400000000000000000000010111474765622100401540ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/224_test_nested_selector_with_child_selector_hack_extendee.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "224_test_nested_selector_with_child_selector_hack_extendee", ) } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("> .foo {a: b}\ \nfoo bar {@extend .foo}\n"), "> .foo, > foo bar {\ \n a: b;\ \n}\n" ); } t225_test_nested_selector_with_child_selector_hack_extender.rs000066400000000000000000000010461474765622100402020ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/225_test_nested_selector_with_child_selector_hack_extender.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "225_test_nested_selector_with_child_selector_hack_extender", ) } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".foo .bar {a: b}\ \n> foo bar {@extend .bar}\n"), ".foo .bar, > .foo foo bar, > foo .foo bar {\ \n a: b;\ \n}\n" ); } t226_test_nested_selector_with_child_selector_hack_extender_and_extendee.rs000066400000000000000000000010371474765622100427060ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/226_test_nested_selector_with_child_selector_hack_extender_and_extendee.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("226_test_nested_selector_with_child_selector_hack_extender_and_extendee") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("> .foo {a: b}\ \n> foo bar {@extend .foo}\n"), "> .foo, > foo bar {\ \n a: b;\ \n}\n" ); } t227_test_nested_with_child_hack_extender_and_sibling_extendee.rs000066400000000000000000000010061474765622100406120ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/227_test_nested_with_child_hack_extender_and_sibling_extendee.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "227_test_nested_with_child_hack_extender_and_sibling_extendee", ) } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("~ .foo {a: b}\ \n> foo bar {@extend .foo}\n"), "~ .foo {\ \n a: b;\ \n}\n" ); } t228_test_nested_with_child_selector_hack_extender_extendee_newline.rs000066400000000000000000000011051474765622100417030ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/228_test_nested_with_child_selector_hack_extender_extendee_newline.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "228_test_nested_with_child_selector_hack_extender_extendee_newline", ) } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("> .foo {a: b}\ \nflip,\ \n> foo bar {@extend .foo}\n"), "> .foo, > flip,\ \n> foo bar {\ \n a: b;\ \n}\n" ); } t229_test_extended_parent_and_child_redundancy_elimination.rs000066400000000000000000000010701474765622100400010ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/229_test_extended_parent_and_child_redundancy_elimination.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("229_test_extended_parent_and_child_redundancy_elimination") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("a {\ \nb {a: b}\ \nc {@extend b}\ \n}\ \nd {@extend a}\n"), "a b, d b, a c, d c {\ \n a: b;\ \n}\n" ); } t230_test_extend_redundancy_elimination_when_it_would_reduce_specificity.rs000066400000000000000000000010121474765622100427670ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/230_test_extend_redundancy_elimination_when_it_would_reduce_specificity.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("230_test_extend_redundancy_elimination_when_it_would_reduce_specificity") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("a {a: b}\ \na.foo {@extend a}\n"), "a, a.foo {\ \n a: b;\ \n}\n" ); } t231_test_extend_redundancy_elimination_when_it_would_preserve_specificity.rs000066400000000000000000000010211474765622100433540ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/231_test_extend_redundancy_elimination_when_it_would_preserve_specificity.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("231_test_extend_redundancy_elimination_when_it_would_preserve_specificity") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".bar a {a: b}\ \na.foo {@extend a}\n"), ".bar a {\ \n a: b;\ \n}\n" ); } t232_test_extend_redundancy_elimination_never_eliminates_base_selector.rs000066400000000000000000000010141474765622100424250ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/232_test_extend_redundancy_elimination_never_eliminates_base_selector.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("232_test_extend_redundancy_elimination_never_eliminates_base_selector") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("a.foo {a: b}\ \n.foo {@extend a}\n"), "a.foo, .foo {\ \n a: b;\ \n}\n" ); } t233_test_extend_cross_branch_redundancy_elimination.rs000066400000000000000000000010331474765622100366520ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/233_test_extend_cross_branch_redundancy_elimination.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("233_test_extend_cross_branch_redundancy_elimination") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%x .c %y {a: b}\ \n.a, .b {@extend %x}\ \n.a .d {@extend %y}\n"), ".a .c .d, .b .c .a .d {\ \n a: b;\ \n}\n" ); } t234_test_extend_cross_branch_redundancy_elimination.rs000066400000000000000000000012071474765622100366560ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/234_test_extend_cross_branch_redundancy_elimination.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("234_test_extend_cross_branch_redundancy_elimination") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok( ".e %z {a: b}\ \n%x .c %y {@extend %z}\ \n.a, .b {@extend %x}\ \n.a .d {@extend %y}\n" ), ".e .a .c .d, .e .b .c .a .d, .a .e .b .c .d, .a .c .e .d, .b .c .e .a .d {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t235_extend_with_universal_selector.rs000066400000000000000000000012231474765622100333660ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/235_extend_with_universal_selector.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("235_extend_with_universal_selector") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a *.foo1 {a: b}\ \na {@extend .foo1}\ \n-a {@extend %-a}\n\ \n%-b *|*.foo2 {b: b}\ \nb {@extend .foo2}\ \n-b {@extend %-b}\n"), "-a *.foo1, -a a {\ \n a: b;\ \n}\ \n-b *|*.foo2, -b b {\ \n b: b;\ \n}\n" ); } t236_extend_with_universal_selector_empty_namespace.rs000066400000000000000000000010121474765622100365360ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/236_extend_with_universal_selector_empty_namespace.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("236_extend_with_universal_selector_empty_namespace") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a |*.foo {a: b}\ \na {@extend .foo}\ \n-a {@extend %-a}\n"), "-a |*.foo {\ \n a: b;\ \n}\n" ); } t237_extend_with_universal_selector_different_namespace.rs000066400000000000000000000010261474765622100373540ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/237_extend_with_universal_selector_different_namespace.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("237_extend_with_universal_selector_different_namespace") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%-a ns|*.foo {a: b}\ \na {@extend .foo}\ \n-a {@extend %-a}\n"), "-a ns|*.foo {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/extend_tests/t238_unify_root_pseudoelement.rs000066400000000000000000000027461474765622100322200ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/extend-tests/238_unify_root_pseudoelement.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("238_unify_root_pseudoelement") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok( "// We assume that by default classes don\'t apply to the :root unless marked explicitly.\ \n:root .foo-1 { test: 1; }\ \n.bar-1 .baz-1 { @extend .foo-1; }\n\ \n// We know the two classes must be the same :root element so we can combine them.\ \n.foo-2:root .bar-2 { test: 2; }\ \n.baz-2:root .bang-2 { @extend .bar-2; }\n\ \n// This extend should not apply because the :root elements are different.\ \nhtml:root .bar-3 { test: 3; }\ \nxml:root .bang-3 { @extend .bar-3}\n\ \n// We assume that direct descendant of the :root is not the same element as a descendant.\ \n.foo-4:root > .bar-4 .x-4 { test: 4; }\ \n.baz-4:root .bang-4 .y-4 {@extend .x-4}\n" ), ":root .foo-1, :root .bar-1 .baz-1 {\ \n test: 1;\ \n}\ \n.foo-2:root .bar-2, .foo-2.baz-2:root .bang-2 {\ \n test: 2;\ \n}\ \nhtml:root .bar-3 {\ \n test: 3;\ \n}\ \n.foo-4:root > .bar-4 .x-4, .foo-4.baz-4:root > .bar-4 .bang-4 .y-4 {\ \n test: 4;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/media_import.rs000066400000000000000000000005011474765622100242350ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/media_import.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("media_import") } #[test] fn test() { assert_eq!( runner().ok("@import \"./fonts.sass\" all;"), "@import \"./fonts.sass\" all;\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/misc/000077500000000000000000000000001474765622100221555ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/misc/directive_interpolation.rs000066400000000000000000000006121474765622100274470ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/misc/directive_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("directive_interpolation") } #[test] fn test() { assert_eq!( runner().ok("$baz: 12;\ \n@foo bar#{$baz} qux {a: b}\n"), "@foo bar12 qux {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/misc/empty_content.rs000066400000000000000000000005701474765622100254150ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/misc/empty_content.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("empty_content") } #[test] fn test() { assert_eq!( runner().ok("@mixin foo { @content }\ \na { b: c; @include foo {} }\n"), "a {\ \n b: c;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/misc/error_directive.rs000066400000000000000000000013211474765622100257070ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/misc/error-directive.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("error-directive") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "@error \"Buckle your seatbelt Dorothy, \'cause Kansas is going bye-bye\"\n" ), "Error: \"Buckle your seatbelt Dorothy, \'cause Kansas is going bye-bye\"\ \n ,\ \n1 | @error \"Buckle your seatbelt Dorothy, \'cause Kansas is going bye-bye\"\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:1 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/misc/import_in_mixin.rs000066400000000000000000000012021474765622100257220ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/misc/import_in_mixin.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("import_in_mixin") } #[test] fn test() { assert_eq!( runner().ok( "@use \"sass:string\";\ \n@mixin import-google-fonts() {\ \n @import url(\"http://fonts.googleapis.com/css?family=#{$family}\");\ \n}\ \n$family: string.unquote(\"Droid+Sans\");\ \n@include import-google-fonts();\n" ), "@import url(\"http://fonts.googleapis.com/css?family=Droid+Sans\");\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/misc/import_with_interpolation.rs000066400000000000000000000010431474765622100300350ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/misc/import_with_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("import_with_interpolation") } #[test] fn test() { assert_eq!( runner().ok( "@use \"sass:string\";\ \n$family: string.unquote(\"Droid+Sans\");\ \n@import url(\"http://fonts.googleapis.com/css?family=#{$family}\");\n" ), "@import url(\"http://fonts.googleapis.com/css?family=Droid+Sans\");\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/misc/jma_pseudo_test.rs000066400000000000000000000013041474765622100257060ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/misc/JMA-pseudo-test.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("JMA-pseudo-test") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".foo {\ \n h1 {\ \n color:red;\ \n }\ \n}\n\ \n.bar {\ \n &:hover h3,\ \n h3 {\ \n @extend h1;\ \n }\ \n}\n"), ".foo h1,\ \n.foo .bar h3,\ \n.bar .foo h3 {\ \n color: red;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/misc/lang_bug.rs000066400000000000000000000005701474765622100243030ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/misc/lang-bug.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("lang-bug") } #[test] fn test() { assert_eq!( runner().ok("div:lang(nb) {\ \n color: red;\ \n}"), "div:lang(nb) {\ \n color: red;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/misc/media_interpolation.rs000066400000000000000000000006461474765622100265570ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/misc/media_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("media_interpolation") } #[test] fn test() { assert_eq!( runner().ok("$baz: 12;\ \n@media bar#{$baz} {a {b: c}}\n"), "@media bar12 {\ \n a {\ \n b: c;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/misc/mixin_content.rs000066400000000000000000000016551474765622100254100ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/misc/mixin_content.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("mixin_content") } #[test] fn test() { assert_eq!( runner().ok("$color: blue;\ \n@mixin context($class, $color: red) {\ \n .#{$class} {\ \n background-color: $color;\ \n @content;\ \n border-color: $color;\ \n }\ \n}\ \n@include context(parent) {\ \n @include context(child, $color: yellow) {\ \n color: $color;\ \n }\ \n}\n"), ".parent {\ \n background-color: red;\ \n border-color: red;\ \n}\ \n.parent .child {\ \n background-color: yellow;\ \n color: blue;\ \n border-color: yellow;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/misc/mod.rs000066400000000000000000000011001474765622100232720ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/misc" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("misc") } mod jma_pseudo_test; mod directive_interpolation; mod empty_content; mod error_directive; mod import_in_mixin; mod import_with_interpolation; mod lang_bug; mod media_interpolation; mod mixin_content; mod namespace_properties_with_script_value; mod negative_numbers; mod selector_interpolation_before_element_name; mod selector_only_interpolation; mod trailing_comma_in_selector; mod unicode_variables; rsass-0.29.0/rsass/tests/spec/non_conformant/misc/namespace_properties_with_script_value.rs000066400000000000000000000010231474765622100325420ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/misc/namespace_properties_with_script_value.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("namespace_properties_with_script_value") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n bar: baz + bang {\ \n bip: bop;\ \n bing: bop; }}\n"), "foo {\ \n bar: bazbang;\ \n bar-bip: bop;\ \n bar-bing: bop;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/misc/negative_numbers.rs000066400000000000000000000012451474765622100260620ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/misc/negative_numbers.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("negative_numbers") } #[test] fn test() { assert_eq!( runner().ok("$zero: 0;\ \na {\ \n zero: -$zero;\ \n zero: $zero * -1;\ \n}\ \n$near: 0.000000000001;\ \na {\ \n near: -$near;\ \n near: $near * -1;\ \n}\n"), "a {\ \n zero: 0;\ \n zero: 0;\ \n}\ \na {\ \n near: 0;\ \n near: 0;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/misc/selector_interpolation_before_element_name.rs000066400000000000000000000006271474765622100333520ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/misc/selector_interpolation_before_element_name.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("selector_interpolation_before_element_name") } #[test] fn test() { assert_eq!( runner().ok("#{\"foo\" + \" bar\"}baz {a: b}\n"), "foo barbaz {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/misc/selector_only_interpolation.rs000066400000000000000000000005631474765622100303570ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/misc/selector_only_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("selector_only_interpolation") } #[test] fn test() { assert_eq!( runner().ok("#{\"foo\" + \" bar\"} {a: b}\n"), "foo bar {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/misc/trailing_comma_in_selector.rs000066400000000000000000000010311474765622100300710ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/misc/trailing_comma_in_selector.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("trailing_comma_in_selector") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok("#foo #bar,,\ \n,#baz #boom, {a: b}\n\ \n#bip #bop, ,, {c: d}\n"), "#foo #bar,\ \n#baz #boom {\ \n a: b;\ \n}\ \n#bip #bop {\ \n c: d;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/misc/unicode_variables.rs000066400000000000000000000005571474765622100262100ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/misc/unicode_variables.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("unicode_variables") } #[test] fn test() { assert_eq!( runner().ok("$vär: foo;\n\ \nblat {a: $vär}\n"), "blat {\ \n a: foo;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/mixin/000077500000000000000000000000001474765622100223465ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/mixin/content/000077500000000000000000000000001474765622100240205ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/mixin/content/arguments/000077500000000000000000000000001474765622100260255ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/mixin/content/arguments/error/000077500000000000000000000000001474765622100271565ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/mixin/content/arguments/error/args.rs000066400000000000000000000076461474765622100304750ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/mixin/content/arguments/error/args.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("args") } #[test] #[ignore] // wrong error fn named() { assert_eq!( runner().err( "// It\'s an error to pass a named argument that doesn\'t exist.\ \n@mixin mixin {\ \n @content($invalid: value);\ \n}\n\ \n@include mixin using ($valid: value) {}\n" ), "Error: No parameter named $invalid.\ \n ,\ \n3 | @content($invalid: value);\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^ invocation\ \n... |\ \n6 | @include mixin using ($valid: value) {}\ \n | ===================== declaration\ \n \'\ \n input.scss 3:3 @content\ \n input.scss 3:3 mixin()\ \n input.scss 6:1 root stylesheet", ); } #[test] #[ignore] // wrong error fn none_expected() { assert_eq!( runner().err( "// It\'s an error to pass argments to a content block that doesn\'t take them.\ \n@mixin mixin {\ \n @content(value);\ \n}\n\ \n@include mixin {}\n" ), "Error: Only 0 arguments allowed, but 1 was passed.\ \n ,\ \n3 | @content(value);\ \n | ^^^^^^^^^^^^^^^ invocation\ \n... |\ \n6 | @include mixin {}\ \n | ===== declaration\ \n \'\ \n input.scss 3:3 @content\ \n input.scss 3:3 mixin()\ \n input.scss 6:1 root stylesheet", ); } #[test] #[ignore] // wrong error fn none_passed() { assert_eq!( runner().err( "// It\'s an error to pass no arguments to a content block that requires them.\ \n@mixin mixin {\ \n @content;\ \n}\n\ \n@include mixin using ($arg1, $arg2) {}\n" ), "Error: Missing argument $arg1.\ \n ,\ \n3 | @content;\ \n | ^^^^^^^^ invocation\ \n... |\ \n6 | @include mixin using ($arg1, $arg2) {}\ \n | ==================== declaration\ \n \'\ \n input.scss 3:3 @content\ \n input.scss 3:3 mixin()\ \n input.scss 6:1 root stylesheet", ); } #[test] #[ignore] // wrong error fn too_few() { assert_eq!( runner().err( "// It\'s an error to pass fewer positional arguments than are required.\ \n@mixin mixin {\ \n @content(1);\ \n}\n\ \n@include mixin using ($arg1, $arg2) {}\n" ), "Error: Missing argument $arg2.\ \n ,\ \n3 | @content(1);\ \n | ^^^^^^^^^^^ invocation\ \n... |\ \n6 | @include mixin using ($arg1, $arg2) {}\ \n | ==================== declaration\ \n \'\ \n input.scss 3:3 @content\ \n input.scss 3:3 mixin()\ \n input.scss 6:1 root stylesheet", ); } #[test] #[ignore] // wrong error fn too_many() { assert_eq!( runner().err( "// It\'s an error to pass more positional arguments than are required.\ \n@mixin mixin {\ \n @content(1, 2, 3);\ \n}\n\ \n@include mixin using ($arg1, $arg2) {}\n" ), "Error: Only 2 arguments allowed, but 3 were passed.\ \n ,\ \n3 | @content(1, 2, 3);\ \n | ^^^^^^^^^^^^^^^^^ invocation\ \n... |\ \n6 | @include mixin using ($arg1, $arg2) {}\ \n | ==================== declaration\ \n \'\ \n input.scss 3:3 @content\ \n input.scss 3:3 mixin()\ \n input.scss 6:1 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/mixin/content/arguments/error/mod.rs000066400000000000000000000003211474765622100302770ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/mixin/content/arguments/error" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("error") } mod args; mod syntax; rsass-0.29.0/rsass/tests/spec/non_conformant/mixin/content/arguments/error/syntax.rs000066400000000000000000000045401474765622100310550ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/mixin/content/arguments/error/syntax.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("syntax") } mod arglist { #[allow(unused)] use super::runner; #[test] fn invalid() { assert_eq!( runner().err( "@mixin mixin {\ \n @content;\ \n}\n\ \n@include mixin() using ($arg1: ) {}\n" ), "Error: Expected expression.\ \n ,\ \n5 | @include mixin() using ($arg1: ) {}\ \n | ^\ \n \'\ \n input.scss 5:32 root stylesheet", ); } #[test] fn missing() { assert_eq!( runner().err( "@mixin mixin {\ \n @content;\ \n}\n\ \n@include mixin using {}\n" ), "Error: expected \"(\".\ \n ,\ \n5 | @include mixin using {}\ \n | ^\ \n \'\ \n input.scss 5:22 root stylesheet", ); } #[test] fn missing_parens() { assert_eq!( runner().err( "@mixin mixin {\ \n @content;\ \n}\n\ \n@include mixin using $arg1 {}\n" ), "Error: expected \"(\".\ \n ,\ \n5 | @include mixin using $arg1 {}\ \n | ^\ \n \'\ \n input.scss 5:22 root stylesheet", ); } } #[test] fn missing_block() { assert_eq!( runner().err( "@mixin mixin {\ \n @content;\ \n}\n\ \n@include mixin using ();\n" ), "Error: expected \"{\".\ \n ,\ \n5 | @include mixin using ();\ \n | ^\ \n \'\ \n input.scss 5:24 root stylesheet", ); } #[test] fn missing_using() { assert_eq!( runner().err( "@mixin mixin {\ \n @content;\ \n}\n\ \n@include mixin() () {}\n" ), "Error: expected \";\".\ \n ,\ \n5 | @include mixin() () {}\ \n | ^\ \n \'\ \n input.scss 5:18 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/mixin/content/arguments/mod.rs000066400000000000000000000004131474765622100271500ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/mixin/content/arguments" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("arguments") } mod error; mod none; mod passing; mod receiving; mod scope; mod weird_syntax; rsass-0.29.0/rsass/tests/spec/non_conformant/mixin/content/arguments/none.rs000066400000000000000000000036351474765622100273410ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/mixin/content/arguments/none.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("none") } #[test] fn test() { assert_eq!( runner().ok( "// `@content()` and `@content` should behave identically, as should\ \n// `@include foo` and `@include foo using ()`.\n\ \nno-parens {\ \n @mixin mixin {\ \n @content;\ \n }\n\ \n empty-using {\ \n @include mixin using () {\ \n x: y;\ \n }\ \n }\n\ \n defaults {\ \n @include mixin using ($arg1: value1, $arg2: value2) {\ \n arg1: $arg1;\ \n arg2: $arg2;\ \n }\ \n }\ \n}\n\ \nparens {\ \n @mixin mixin {\ \n @content();\ \n }\n\ \n no-using {\ \n @include mixin {\ \n x: y;\ \n }\ \n }\n\ \n empty-using {\ \n @include mixin using () {\ \n x: y;\ \n }\ \n }\n\ \n defaults {\ \n @include mixin using ($arg1: value1, $arg2: value2) {\ \n arg1: $arg1;\ \n arg2: $arg2;\ \n }\ \n }\ \n}\n" ), "no-parens empty-using {\ \n x: y;\ \n}\ \nno-parens defaults {\ \n arg1: value1;\ \n arg2: value2;\ \n}\ \nparens no-using {\ \n x: y;\ \n}\ \nparens empty-using {\ \n x: y;\ \n}\ \nparens defaults {\ \n arg1: value1;\ \n arg2: value2;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/mixin/content/arguments/passing.rs000066400000000000000000000045421474765622100300440ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/mixin/content/arguments/passing.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("passing") } #[test] fn test() { assert_eq!( runner().ok( "// Arguments can be passed to content blocks in all the same ways as they\'re\ \n// passed to any other argument list.\n\ \nby-position {\ \n @mixin mixin {\ \n @content(value1, value2);\ \n }\n\ \n @include mixin using ($arg1, $arg2) {\ \n arg1: $arg1;\ \n arg2: $arg2;\ \n }\ \n}\n\ \nby-name {\ \n @mixin mixin {\ \n @content($arg1: value1, $arg2: value2);\ \n }\n\ \n @include mixin using ($arg1, $arg2) {\ \n arg1: $arg1;\ \n arg2: $arg2;\ \n }\ \n}\n\ \nlist-splat {\ \n @mixin mixin {\ \n @content((value1 value2)...);\ \n }\n\ \n @include mixin using ($arg1, $arg2) {\ \n arg1: $arg1;\ \n arg2: $arg2;\ \n }\ \n}\n\ \nmap-splat {\ \n @mixin mixin {\ \n @content((arg1: value1, arg2: value2)...);\ \n }\n\ \n @include mixin using ($arg1, $arg2) {\ \n arg1: $arg1;\ \n arg2: $arg2;\ \n }\ \n}\n\ \nmixed-splat {\ \n @mixin mixin {\ \n @content((value1,)..., (arg2: value2)...);\ \n }\n\ \n @include mixin using ($arg1, $arg2) {\ \n arg1: $arg1;\ \n arg2: $arg2;\ \n }\ \n}\n" ), "by-position {\ \n arg1: value1;\ \n arg2: value2;\ \n}\ \nby-name {\ \n arg1: value1;\ \n arg2: value2;\ \n}\ \nlist-splat {\ \n arg1: value1;\ \n arg2: value2;\ \n}\ \nmap-splat {\ \n arg1: value1;\ \n arg2: value2;\ \n}\ \nmixed-splat {\ \n arg1: value1;\ \n arg2: value2;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/mixin/content/arguments/receiving.rs000066400000000000000000000074251474765622100303560ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/mixin/content/arguments/receiving.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("receiving") } #[test] fn test() { assert_eq!( runner().ok( "@use \"sass:meta\";\ \n// Content blocks\' argument lists can define arguments in in all the same ways\ \n// as they\'re defined in any other argument list.\n\ \nwith-defaults {\ \n nothing-passed {\ \n @mixin mixin {\ \n @content;\ \n }\n\ \n @include mixin using ($arg1: value1, $arg2: value2) {\ \n arg1: $arg1;\ \n arg2: $arg2;\ \n }\ \n }\n\ \n partial-override {\ \n @mixin mixin {\ \n @content($arg2: other2);\ \n }\n\ \n @include mixin using ($arg1: value1, $arg2: value2) {\ \n arg1: $arg1;\ \n arg2: $arg2;\ \n }\ \n }\n\ \n total-override {\ \n @mixin mixin {\ \n @content(other1, other2);\ \n }\n\ \n @include mixin using ($arg1: value1, $arg2: value2) {\ \n arg1: $arg1;\ \n arg2: $arg2;\ \n }\ \n }\ \n}\n\ \nwith-splat {\ \n nothing-passed {\ \n @mixin mixin {\ \n @content;\ \n }\n\ \n @include mixin using ($args...) {\ \n positional: meta.inspect($args);\ \n keywords: meta.inspect(meta.keywords($args));\ \n }\ \n }\n\ \n positional-passed {\ \n @mixin mixin {\ \n @content(value1, value2, value3);\ \n }\n\ \n @include mixin using ($args...) {\ \n positional: meta.inspect($args);\ \n keywords: meta.inspect(meta.keywords($args));\ \n }\ \n }\n\ \n named-passed {\ \n @mixin mixin {\ \n @content($arg1: value1, $arg2: value2);\ \n }\n\ \n @include mixin using ($args...) {\ \n positional: meta.inspect($args);\ \n keywords: meta.inspect(meta.keywords($args));\ \n }\ \n }\n\ \n both-passed {\ \n @mixin mixin {\ \n @content(value1, $arg2: value2);\ \n }\n\ \n @include mixin using ($args...) {\ \n positional: meta.inspect($args);\ \n keywords: meta.inspect(meta.keywords($args));\ \n }\ \n }\ \n}\n" ), "with-defaults nothing-passed {\ \n arg1: value1;\ \n arg2: value2;\ \n}\ \nwith-defaults partial-override {\ \n arg1: value1;\ \n arg2: other2;\ \n}\ \nwith-defaults total-override {\ \n arg1: other1;\ \n arg2: other2;\ \n}\ \nwith-splat nothing-passed {\ \n positional: ();\ \n keywords: ();\ \n}\ \nwith-splat positional-passed {\ \n positional: value1, value2, value3;\ \n keywords: ();\ \n}\ \nwith-splat named-passed {\ \n positional: ();\ \n keywords: (arg1: value1, arg2: value2);\ \n}\ \nwith-splat both-passed {\ \n positional: (value1,);\ \n keywords: (arg2: value2);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/mixin/content/arguments/scope.rs000066400000000000000000000025001474765622100275010ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/mixin/content/arguments/scope.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("scope") } #[test] fn test() { assert_eq!( runner().ok( "// Arguments passed to @content blocks are lexically-scoped within those blocks.\n\ \n$var: top-level;\n\ \n@mixin mixin($var) {\ \n mixin-var-before: $var;\ \n @content(content-argument);\ \n mixin-var-after: $var;\ \n}\n\ \n@mixin inner {\ \n var-in-inner: $var;\ \n}\n\ \nscope {\ \n var-before: $var;\ \n @include mixin(mixin-argument) using ($var) {\ \n content-var-before: $var;\ \n @include inner;\ \n content-var-after: $var;\ \n }\ \n var-after: $var;\ \n}\n" ), "scope {\ \n var-before: top-level;\ \n mixin-var-before: mixin-argument;\ \n content-var-before: content-argument;\ \n var-in-inner: top-level;\ \n content-var-after: content-argument;\ \n mixin-var-after: mixin-argument;\ \n var-after: top-level;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/mixin/content/arguments/weird_syntax.rs000066400000000000000000000044321474765622100311160ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/mixin/content/arguments/weird_syntax.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("weird_syntax") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("no-space-before-using {\ \n @mixin mixin {\ \n @content(value1, value2);\ \n }\n\ \n @include mixin()using ($arg1, $arg2) {\ \n arg1: $arg1;\ \n arg2: $arg2;\ \n }\ \n}\n\ \nno-space-after-using {\ \n @mixin mixin {\ \n @content(value1, value2);\ \n }\n\ \n @include mixin using($arg1, $arg2) {\ \n arg1: $arg1;\ \n arg2: $arg2;\ \n }\ \n}\n\ \nno-space-after-arglist {\ \n @mixin mixin {\ \n @content(value1, value2);\ \n }\n\ \n @include mixin using($arg1, $arg2){\ \n arg1: $arg1;\ \n arg2: $arg2;\ \n }\ \n}\n\ \nspace-after-content {\ \n @mixin mixin {\ \n @content (value1, value2);\ \n }\n\ \n @include mixin using ($arg1, $arg2) {\ \n arg1: $arg1;\ \n arg2: $arg2;\ \n }\ \n}\n\ \ncase-insensitive-using {\ \n @mixin mixin {\ \n @content(value1, value2);\ \n }\n\ \n @include mixin UsInG ($arg1, $arg2) {\ \n arg1: $arg1;\ \n arg2: $arg2;\ \n }\ \n}\n"), "no-space-before-using {\ \n arg1: value1;\ \n arg2: value2;\ \n}\ \nno-space-after-using {\ \n arg1: value1;\ \n arg2: value2;\ \n}\ \nno-space-after-arglist {\ \n arg1: value1;\ \n arg2: value2;\ \n}\ \nspace-after-content {\ \n arg1: value1;\ \n arg2: value2;\ \n}\ \ncase-insensitive-using {\ \n arg1: value1;\ \n arg2: value2;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/mixin/content/before_if.rs000066400000000000000000000011561474765622100263110ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/mixin/content/before_if.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("before_if") } #[test] fn test() { assert_eq!( runner().ok("// Regression test for sass/dart-sass#482.\ \n@mixin outer {\ \n a {@content}\ \n}\n\ \n@mixin inner {\ \n @content;\ \n}\n\ \n@include outer {\ \n @include inner {}\ \n x: y;\ \n}"), "a {\ \n x: y;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/mixin/content/mod.rs000066400000000000000000000003331474765622100251440ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/mixin/content" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("content") } mod arguments; mod before_if; mod recursive; rsass-0.29.0/rsass/tests/spec/non_conformant/mixin/content/recursive.rs000066400000000000000000000011331474765622100263730ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/mixin/content/recursive.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("recursive") } #[test] fn test() { assert_eq!( runner().ok("@mixin span($i) {\ \n x: y;\ \n @content;\ \n}\n\ \n.a {\ \n @include span(5) {\ \n .inner { @include span(2); }\ \n }\ \n}\n"), ".a {\ \n x: y;\ \n}\ \n.a .inner {\ \n x: y;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/mixin/environment_locality.rs000066400000000000000000000016411474765622100271620ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/mixin/environment_locality.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("environment_locality") } #[test] fn test() { assert_eq!( runner().ok( "// The \"$var\" variable should only be set locally, despite being in the same\ \n// mixin each time.\ \n@mixin with-local-variable($recurse) {\ \n $var: before;\n\ \n @if ($recurse) {\ \n @include with-local-variable($recurse: false);\ \n }\n\ \n var: $var;\ \n $var: after;\ \n}\n\ \n.environment-locality {\ \n @include with-local-variable($recurse: true);\ \n}\n" ), ".environment-locality {\ \n var: before;\ \n var: before;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/mixin/error/000077500000000000000000000000001474765622100234775ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/mixin/error/mod.rs000066400000000000000000000002701474765622100246230ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/mixin/error" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("error") } mod no_content; rsass-0.29.0/rsass/tests/spec/non_conformant/mixin/error/no_content.rs000066400000000000000000000014041474765622100262120ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/mixin/error/no_content.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("no_content") } #[test] #[ignore] // missing error fn test() { assert_eq!( runner().err( "// A content block may not be passed to a mixin that doesn\'t include `@content`.\ \n@mixin no-content {}\ \n@include no-content {}\n" ), "Error: Mixin doesn\'t accept a content block.\ \n ,\ \n2 | @mixin no-content {}\ \n | ========== declaration\ \n3 | @include no-content {}\ \n | ^^^^^^^^^^^^^^^^^^^ invocation\ \n \'\ \n input.scss 3:1 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/mixin/mod.rs000066400000000000000000000003261474765622100234740ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/mixin" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("mixin") } mod content; mod environment_locality; mod error; rsass-0.29.0/rsass/tests/spec/non_conformant/mod.rs000066400000000000000000000006051474765622100223500ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("non_conformant") } mod basic; mod colors; mod errors; mod extend_tests; mod media_import; mod misc; mod mixin; mod nesting; mod operations; mod parser; mod sass; mod sass_4_0; mod scope; mod scss; mod scss_tests; mod variables; rsass-0.29.0/rsass/tests/spec/non_conformant/nesting/000077500000000000000000000000001474765622100226715ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/nesting/mod.rs000066400000000000000000000003111474765622100240110ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/nesting" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("nesting") } mod not; mod parent_with_newline; rsass-0.29.0/rsass/tests/spec/non_conformant/nesting/not.rs000066400000000000000000000007221474765622100240400ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/nesting/not.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("not") } #[test] fn multiple_parent_selectors_with_trailing_ident() { assert_eq!( runner().ok("// Regression test for sass/libsass#2630\ \n.a, .b {\ \n :not(&-c) {d: e}\ \n}\n"), ":not(.a-c, .b-c) {\ \n d: e;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/nesting/parent_with_newline.rs000066400000000000000000000010001474765622100272730ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/nesting/parent_with_newline.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("parent_with_newline") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok(".foo,\ \n.bar {\ \n .baz & {\ \n color: red;\ \n }\ \n}\n"), ".baz .foo,\ \n.baz .bar {\ \n color: red;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/operations/000077500000000000000000000000001474765622100234055ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/operations/division.rs000066400000000000000000000026131474765622100256010ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/operations/division.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("division") } mod slash { #[allow(unused)] use super::runner; mod with_string { #[allow(unused)] use super::runner; #[test] fn slash_minus_string() { assert_eq!( runner().ok("a {b: 1 / 2 - foo()}\n"), "a {\ \n b: 0.5-foo();\ \n}\n" ); } #[test] fn slash_plus_string() { assert_eq!( runner().ok("a {b: 1 / 2 + foo()}\n"), "a {\ \n b: 0.5foo();\ \n}\n" ); } #[test] fn slash_slash_string() { assert_eq!( runner().ok("a {b: 1 / 2 / foo()}\n"), "a {\ \n b: 1/2/foo();\ \n}\n" ); } #[test] fn string_minus_slash() { assert_eq!( runner().ok("a {b: foo() - 1 / 2}\n"), "a {\ \n b: foo()-0.5;\ \n}\n" ); } #[test] fn string_plus_slash() { assert_eq!( runner().ok("a {b: foo() + 1 / 2}\n"), "a {\ \n b: foo()0.5;\ \n}\n" ); } } } rsass-0.29.0/rsass/tests/spec/non_conformant/operations/mod.rs000066400000000000000000000002721474765622100245330ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/operations" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("operations") } mod division; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/000077500000000000000000000000001474765622100225165ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/and_and.rs000066400000000000000000000006251474765622100244530ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/and_and.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("and_and") } #[test] fn test() { assert_eq!( runner().ok(".and-and {\ \n value: true && false;\ \n}\n"), ".and-and {\ \n value: true .and-and .and-and false;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/arglists/000077500000000000000000000000001474765622100243465ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/arglists/can_end_with_comma/000077500000000000000000000000001474765622100301445ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/arglists/can_end_with_comma/error_call_1.rs000066400000000000000000000012061474765622100330550ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/arglists/can-end-with-comma/error-call-1.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("error-call-1") } #[test] fn test() { assert_eq!( runner().err( "// double comma in middle of arglist\ \n.error {\ \n e: double-comma-error($a,,$b);\ \n}\n" ), "Error: expected \")\".\ \n ,\ \n3 | e: double-comma-error($a,,$b);\ \n | ^\ \n \'\ \n input.scss 3:28 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/arglists/can_end_with_comma/error_call_2.rs000066400000000000000000000012101474765622100330510ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/arglists/can-end-with-comma/error-call-2.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("error-call-2") } #[test] fn test() { assert_eq!( runner().err( "// double comma at end of arglist\ \n.error {\ \n a: double-comma-error($a,$b,,);\ \n}\n" ), "Error: expected \")\".\ \n ,\ \n3 | a: double-comma-error($a,$b,,);\ \n | ^\ \n \'\ \n input.scss 3:31 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/arglists/can_end_with_comma/error_call_3.rs000066400000000000000000000012071474765622100330600ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/arglists/can-end-with-comma/error-call-3.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("error-call-3") } #[test] fn test() { assert_eq!( runner().err( "// incorectly terminated\ \n.error {\ \n a: incorrectly-terminated($a,$b,;\ \n}\n" ), "Error: expected \")\".\ \n ,\ \n3 | a: incorrectly-terminated($a,$b,;\ \n | ^\ \n \'\ \n input.scss 3:35 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/arglists/can_end_with_comma/error_function_1.rs000066400000000000000000000012061474765622100337670ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/arglists/can-end-with-comma/error-function-1.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("error-function-1") } #[test] fn test() { assert_eq!( runner().err( "// double comma in middle of arglist\ \n@function double-comma-error($a,,$b) {\ \n}\n" ), "Error: expected \")\".\ \n ,\ \n2 | @function double-comma-error($a,,$b) {\ \n | ^\ \n \'\ \n input.scss 2:33 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/arglists/can_end_with_comma/error_function_2.rs000066400000000000000000000012101474765622100337630ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/arglists/can-end-with-comma/error-function-2.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("error-function-2") } #[test] fn test() { assert_eq!( runner().err( "// double comma at end of arglist\ \n@function double-comma-error($a,$b,,) {\ \n}\n" ), "Error: expected \")\".\ \n ,\ \n2 | @function double-comma-error($a,$b,,) {\ \n | ^\ \n \'\ \n input.scss 2:36 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/arglists/can_end_with_comma/error_function_3.rs000066400000000000000000000011771474765622100340000ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/arglists/can-end-with-comma/error-function-3.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("error-function-3") } #[test] fn test() { assert_eq!( runner().err( "// incorectly terminated\ \n@function missing-paren-error($a,$b, {\ \n}\n" ), "Error: expected \")\".\ \n ,\ \n2 | @function missing-paren-error($a,$b, {\ \n | ^\ \n \'\ \n input.scss 2:38 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/arglists/can_end_with_comma/error_include_1.rs000066400000000000000000000012361474765622100335700ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/arglists/can-end-with-comma/error-include-1.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("error-include-1") } #[test] fn test() { assert_eq!( runner().err( "// double comma in middle of arglist\ \n.error {\ \n @include double-comma-error($a,,$b);\ \n}\n" ), "Error: expected \")\".\ \n ,\ \n3 | @include double-comma-error($a,,$b);\ \n | ^\ \n \'\ \n input.scss 3:34 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/arglists/can_end_with_comma/error_include_2.rs000066400000000000000000000012401474765622100335640ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/arglists/can-end-with-comma/error-include-2.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("error-include-2") } #[test] fn test() { assert_eq!( runner().err( "// double comma at end of arglist\ \n.error {\ \n @include double-comma-error($a,$b,,);\ \n}\n" ), "Error: expected \")\".\ \n ,\ \n3 | @include double-comma-error($a,$b,,);\ \n | ^\ \n \'\ \n input.scss 3:37 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/arglists/can_end_with_comma/error_include_3.rs000066400000000000000000000012371474765622100335730ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/arglists/can-end-with-comma/error-include-3.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("error-include-3") } #[test] fn test() { assert_eq!( runner().err( "// incorectly terminated\ \n.error {\ \n @include incorrectly-terminated($a,$b,;\ \n}\n" ), "Error: expected \")\".\ \n ,\ \n3 | @include incorrectly-terminated($a,$b,;\ \n | ^\ \n \'\ \n input.scss 3:41 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/arglists/can_end_with_comma/error_mixin_1.rs000066400000000000000000000011671474765622100332740ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/arglists/can-end-with-comma/error-mixin-1.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("error-mixin-1") } #[test] fn test() { assert_eq!( runner().err( "// double comma in middle of arglist\ \n@mixin double-comma-error($a,,$b) {\ \n}\n" ), "Error: expected \")\".\ \n ,\ \n2 | @mixin double-comma-error($a,,$b) {\ \n | ^\ \n \'\ \n input.scss 2:30 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/arglists/can_end_with_comma/error_mixin_2.rs000066400000000000000000000011711474765622100332700ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/arglists/can-end-with-comma/error-mixin-2.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("error-mixin-2") } #[test] fn test() { assert_eq!( runner().err( "// double comma at end of arglist\ \n@mixin double-comma-error($a,$b,,) {\ \n}\n" ), "Error: expected \")\".\ \n ,\ \n2 | @mixin double-comma-error($a,$b,,) {\ \n | ^\ \n \'\ \n input.scss 2:33 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/arglists/can_end_with_comma/error_mixin_3.rs000066400000000000000000000011601474765622100332670ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/arglists/can-end-with-comma/error-mixin-3.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("error-mixin-3") } #[test] fn test() { assert_eq!( runner().err( "// incorectly terminated\ \n@mixin missing-paren-error($a,$b, {\ \n}\n" ), "Error: expected \")\".\ \n ,\ \n2 | @mixin missing-paren-error($a,$b, {\ \n | ^\ \n \'\ \n input.scss 2:35 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/arglists/can_end_with_comma/functions.rs000066400000000000000000000027011474765622100325220ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/arglists/can-end-with-comma/functions.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("functions") } #[test] fn test() { assert_eq!( runner().ok("@function one-positional-arg($a,) {\ \n @return positional 1 $a;\ \n}\n\ \n@function two-positional-args($a, $b,) {\ \n @return positional 2 $a $b;\ \n}\n\ \n@function one-keyword-arg($a: a,) {\ \n @return keyword 1 $a;\ \n}\n\ \n@function two-keyword-args($a: a, $b: b,) {\ \n @return keyword 2 $a $b;\ \n}\n\ \n@function mixed-args($a, $b: b,) {\ \n @return keyword 2 $a $b;\ \n}\n\ \n.calls {\ \n one-positional-arg: one-positional-arg(a,);\ \n two-positional-args: two-positional-args(a,b,);\ \n one-keyword-arg: one-keyword-arg($a: z,);\ \n two-keyword-args: two-keyword-args($a: y,$b: z,);\ \n mixed-args: mixed-args(y, $b: z,);\ \n}\n"), ".calls {\ \n one-positional-arg: positional 1 a;\ \n two-positional-args: positional 2 a b;\ \n one-keyword-arg: keyword 1 z;\ \n two-keyword-args: keyword 2 y z;\ \n mixed-args: keyword 2 y z;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/arglists/can_end_with_comma/mixins.rs000066400000000000000000000026711474765622100320270ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/arglists/can-end-with-comma/mixins.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("mixins") } #[test] fn test() { assert_eq!( runner().ok("@mixin one-positional-arg($a,) {\ \n one-positional-arg: positional 1 $a;\ \n}\n\ \n@mixin two-positional-args($a, $b,) {\ \n two-positional-args: positional 2 $a $b;\ \n}\n\ \n@mixin one-keyword-arg($a: a,) {\ \n one-keyword-arg: keyword 1 $a;\ \n}\n\ \n@mixin two-keyword-args($a: a, $b: b,) {\ \n two-keyword-args: keyword 2 $a $b;\ \n}\n\ \n@mixin mixed-args($a, $b: b,) {\ \n mixed-args: keyword 2 $a $b;\ \n}\n\ \n.includes {\ \n @include one-positional-arg(a,);\ \n @include two-positional-args(a,b,);\ \n @include one-keyword-arg($a: z,);\ \n @include two-keyword-args($a: y,$b: z,);\ \n @include mixed-args(y, $b: z,);\ \n}\n\n"), ".includes {\ \n one-positional-arg: positional 1 a;\ \n two-positional-args: positional 2 a b;\ \n one-keyword-arg: keyword 1 z;\ \n two-keyword-args: keyword 2 y z;\ \n mixed-args: keyword 2 y z;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/arglists/can_end_with_comma/mod.rs000066400000000000000000000007441474765622100312760ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/arglists/can-end-with-comma" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("can-end-with-comma") } mod error_call_1; mod error_call_2; mod error_call_3; mod error_function_1; mod error_function_2; mod error_function_3; mod error_include_1; mod error_include_2; mod error_include_3; mod error_mixin_1; mod error_mixin_2; mod error_mixin_3; mod functions; mod mixins; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/arglists/mod.rs000066400000000000000000000003071474765622100254730ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/arglists" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("arglists") } mod can_end_with_comma; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/000077500000000000000000000000001474765622100250445ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/mod.rs000066400000000000000000000023071474765622100261730ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("interpolate") } mod t00_concatenation; mod t01_literal; mod t02_double_quoted; mod t03_single_quoted; mod t04_space_list_quoted; mod t05_comma_list_quoted; mod t06_space_list_complex; mod t07_comma_list_complex; mod t10_escaped_backslash; mod t11_escaped_literal; mod t12_escaped_double_quoted; mod t13_escaped_single_quoted; mod t14_escapes_literal_numbers; mod t15_escapes_double_quoted_numbers; mod t16_escapes_single_quoted_numbers; mod t17_escapes_literal_lowercase; mod t18_escapes_double_quoted_lowercase; mod t19_escapes_single_quoted_lowercase; mod t20_escapes_literal_uppercase; mod t21_escapes_double_quoted_uppercase; mod t22_escapes_single_quoted_uppercase; mod t23_escapes_literal_specials; mod t24_escapes_double_quoted_specials; mod t25_escapes_single_quoted_specials; mod t26_escaped_literal_quotes; mod t27_escaped_double_quotes; mod t28_escaped_single_quotes; mod t29_binary_operation; mod t30_base_test; mod t31_schema_simple; mod t32_comma_list; mod t33_space_list; mod t34_mixed_list; mod t44_selector; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t00_concatenation/000077500000000000000000000000001474765622100303545ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t00_concatenation/mod.rs000066400000000000000000000003461474765622100315040ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/00_concatenation" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("00_concatenation") } mod spaced; mod unspaced; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t00_concatenation/spaced.rs000066400000000000000000000074321474765622100321670ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/00_concatenation/spaced.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("spaced") } #[test] fn test() { assert_eq!( runner().ok("$input: literal;\ \n.result {\ \n output: literal $input;\ \n output: literal #{$input};\ \n output: literal #{literal};\ \n output: literal #{\"literal\"};\ \n output: $input $input;\ \n output: $input #{$input};\ \n output: $input #{literal};\ \n output: $input #{\"literal\"};\ \n output: #{$input} literal;\ \n output: #{$input} $input;\ \n output: #{$input} #{$input};\ \n output: #{$input} #{literal};\ \n output: #{$input} #{\"literal\"};\ \n output: #{literal} literal;\ \n output: #{literal} $input;\ \n output: #{literal} #{$input};\ \n output: #{literal} #{literal};\ \n output: #{literal} #{\"literal\"};\ \n output: #{\"literal\"} literal;\ \n output: #{\"literal\"} $input;\ \n output: #{\"literal\"} #{$input};\ \n output: #{\"literal\"} #{literal};\ \n output: #{\"literal\"} #{\"literal\"};\ \n output: \"literal #{$input}\";\ \n output: \"literal #{literal}\";\ \n output: \"literal #{\"literal\"}\";\ \n output: \"#{$input} literal\";\ \n output: \"#{$input} #{$input}\";\ \n output: \"#{$input} #{literal}\";\ \n output: \"#{$input} #{\"literal\"}\";\ \n output: \"#{literal} literal\";\ \n output: \"#{literal} #{$input}\";\ \n output: \"#{literal} #{literal}\";\ \n output: \"#{literal} #{\"literal\"}\";\ \n output: \"#{\"literal\"} literal\";\ \n output: \"#{\"literal\"} #{$input}\";\ \n output: \"#{\"literal\"} #{literal}\";\ \n output: \"#{\"literal\"} #{\"literal\"}\";\ \n}"), ".result {\ \n output: literal literal;\ \n output: literal literal;\ \n output: literal literal;\ \n output: literal literal;\ \n output: literal literal;\ \n output: literal literal;\ \n output: literal literal;\ \n output: literal literal;\ \n output: literal literal;\ \n output: literal literal;\ \n output: literal literal;\ \n output: literal literal;\ \n output: literal literal;\ \n output: literal literal;\ \n output: literal literal;\ \n output: literal literal;\ \n output: literal literal;\ \n output: literal literal;\ \n output: literal literal;\ \n output: literal literal;\ \n output: literal literal;\ \n output: literal literal;\ \n output: literal literal;\ \n output: \"literal literal\";\ \n output: \"literal literal\";\ \n output: \"literal literal\";\ \n output: \"literal literal\";\ \n output: \"literal literal\";\ \n output: \"literal literal\";\ \n output: \"literal literal\";\ \n output: \"literal literal\";\ \n output: \"literal literal\";\ \n output: \"literal literal\";\ \n output: \"literal literal\";\ \n output: \"literal literal\";\ \n output: \"literal literal\";\ \n output: \"literal literal\";\ \n output: \"literal literal\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t00_concatenation/unspaced.rs000066400000000000000000000072451474765622100325340ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/00_concatenation/unspaced.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("unspaced") } #[test] fn test() { assert_eq!( runner().ok("$input: literal;\ \n.result {\ \n output: literal$input;\ \n output: literal#{$input};\ \n output: literal#{literal};\ \n output: literal#{\"literal\"};\ \n output: $input$input;\ \n output: $input#{$input};\ \n output: $input#{literal};\ \n output: $input#{\"literal\"};\ \n output: #{$input}literal;\ \n output: #{$input}$input;\ \n output: #{$input}#{$input};\ \n output: #{$input}#{literal};\ \n output: #{$input}#{\"literal\"};\ \n output: #{literal}literal;\ \n output: #{literal}$input;\ \n output: #{literal}#{$input};\ \n output: #{literal}#{literal};\ \n output: #{literal}#{\"literal\"};\ \n output: #{\"literal\"}literal;\ \n output: #{\"literal\"}$input;\ \n output: #{\"literal\"}#{$input};\ \n output: #{\"literal\"}#{literal};\ \n output: #{\"literal\"}#{\"literal\"};\ \n output: \"literal#{$input}\";\ \n output: \"literal#{literal}\";\ \n output: \"literal#{\"literal\"}\";\ \n output: \"#{$input}literal\";\ \n output: \"#{$input}#{$input}\";\ \n output: \"#{$input}#{literal}\";\ \n output: \"#{$input}#{\"literal\"}\";\ \n output: \"#{literal}literal\";\ \n output: \"#{literal}#{$input}\";\ \n output: \"#{literal}#{literal}\";\ \n output: \"#{literal}#{\"literal\"}\";\ \n output: \"#{\"literal\"}literal\";\ \n output: \"#{\"literal\"}#{$input}\";\ \n output: \"#{\"literal\"}#{literal}\";\ \n output: \"#{\"literal\"}#{\"literal\"}\";\ \n}"), ".result {\ \n output: literal literal;\ \n output: literalliteral;\ \n output: literalliteral;\ \n output: literalliteral;\ \n output: literal literal;\ \n output: literal literal;\ \n output: literal literal;\ \n output: literal literal;\ \n output: literalliteral;\ \n output: literal literal;\ \n output: literalliteral;\ \n output: literalliteral;\ \n output: literalliteral;\ \n output: literalliteral;\ \n output: literal literal;\ \n output: literalliteral;\ \n output: literalliteral;\ \n output: literalliteral;\ \n output: literalliteral;\ \n output: literal literal;\ \n output: literalliteral;\ \n output: literalliteral;\ \n output: literalliteral;\ \n output: \"literalliteral\";\ \n output: \"literalliteral\";\ \n output: \"literalliteral\";\ \n output: \"literalliteral\";\ \n output: \"literalliteral\";\ \n output: \"literalliteral\";\ \n output: \"literalliteral\";\ \n output: \"literalliteral\";\ \n output: \"literalliteral\";\ \n output: \"literalliteral\";\ \n output: \"literalliteral\";\ \n output: \"literalliteral\";\ \n output: \"literalliteral\";\ \n output: \"literalliteral\";\ \n output: \"literalliteral\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t01_literal/000077500000000000000000000000001474765622100271645ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t01_literal/mod.rs000066400000000000000000000005241474765622100303120ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/01_literal" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("01_literal") } mod t01_inline; mod t02_variable; mod t03_inline_double; mod t04_variable_double; mod t05_variable_quoted_double; mod t06_escape_interpolation; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t01_literal/t01_inline.rs000066400000000000000000000014361474765622100315000ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/01_literal/01_inline.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("01_inline") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: literal;\ \n output: #{literal};\ \n output: \"[#{literal}]\";\ \n output: \"#{literal}\";\ \n output: \'#{literal}\';\ \n output: \"[\'#{literal}\']\";\ \n}\n"), ".result {\ \n output: literal;\ \n output: literal;\ \n output: \"[literal]\";\ \n output: \"literal\";\ \n output: \"literal\";\ \n output: \"[\'literal\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t01_literal/t02_variable.rs000066400000000000000000000014751474765622100320130ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/01_literal/02_variable.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("02_variable") } #[test] fn test() { assert_eq!( runner().ok("$input: literal;\ \n.result {\ \n output: $input;\ \n output: #{$input};\ \n output: \"[#{$input}]\";\ \n output: \"#{$input}\";\ \n output: \'#{$input}\';\ \n output: \"[\'#{$input}\']\";\ \n}\n"), ".result {\ \n output: literal;\ \n output: literal;\ \n output: \"[literal]\";\ \n output: \"literal\";\ \n output: \"literal\";\ \n output: \"[\'literal\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t01_literal/t03_inline_double.rs000066400000000000000000000013511474765622100330300ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/01_literal/03_inline_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("03_inline_double") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: #{#{literal}};\ \n output: #{\"[#{literal}]\"};\ \n output: #{\"#{literal}\"};\ \n output: #{\'#{literal}\'};\ \n output: #{\"[\'#{literal}\']\"};\ \n}\n"), ".result {\ \n output: literal;\ \n output: [literal];\ \n output: literal;\ \n output: literal;\ \n output: [\'literal\'];\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t01_literal/t04_variable_double.rs000066400000000000000000000014111474765622100333350ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/01_literal/04_variable_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("04_variable_double") } #[test] fn test() { assert_eq!( runner().ok("$input: literal;\ \n.result {\ \n output: #{#{$input}};\ \n output: #{\"[#{$input}]\"};\ \n output: #{\"#{$input}\"};\ \n output: #{\'#{$input}\'};\ \n output: #{\"[\'#{$input}\']\"};\ \n}\n"), ".result {\ \n output: literal;\ \n output: [literal];\ \n output: literal;\ \n output: literal;\ \n output: [\'literal\'];\ \n}\n" ); } t05_variable_quoted_double.rs000066400000000000000000000023761474765622100346530ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t01_literal//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/01_literal/05_variable_quoted_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("05_variable_quoted_double") } #[test] fn test() { assert_eq!( runner().ok("$input: literal;\ \n.result {\ \n dquoted: \"#{#{$input}}\";\ \n dquoted: \"#{\"[#{$input}]\"}\";\ \n dquoted: \"#{\"#{$input}\"}\";\ \n dquoted: \"#{\'#{$input}\'}\";\ \n dquoted: \"#{\"[\'#{$input}\']\"}\";\ \n squoted: \'#{#{$input}}\';\ \n squoted: \'#{\"[#{$input}]\"}\';\ \n squoted: \'#{\"#{$input}\"}\';\ \n squoted: \'#{\'#{$input}\'}\';\ \n squoted: \'#{\"[\'#{$input}\']\"}\';\ \n}\n"), ".result {\ \n dquoted: \"literal\";\ \n dquoted: \"[literal]\";\ \n dquoted: \"literal\";\ \n dquoted: \"literal\";\ \n dquoted: \"[\'literal\']\";\ \n squoted: \"literal\";\ \n squoted: \"[literal]\";\ \n squoted: \"literal\";\ \n squoted: \"literal\";\ \n squoted: \"[\'literal\']\";\ \n}\n" ); } t06_escape_interpolation.rs000066400000000000000000000013501474765622100343520ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t01_literal//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/01_literal/06_escape_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("06_escape_interpolation") } #[test] fn test() { assert_eq!( runner().ok("$input: literal;\ \n.result {\ \n output: \"[\\#{literal}]\";\ \n output: \"\\#{literal}\";\ \n output: \'\\#{literal}\';\ \n output: \"[\'\\#{literal}\']\";\ \n}\n"), ".result {\ \n output: \"[#{literal}]\";\ \n output: \"#{literal}\";\ \n output: \"#{literal}\";\ \n output: \"[\'#{literal}\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t02_double_quoted/000077500000000000000000000000001474765622100303645ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t02_double_quoted/mod.rs000066400000000000000000000005401474765622100315100ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/02_double_quoted" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("02_double_quoted") } mod t01_inline; mod t02_variable; mod t03_inline_double; mod t04_variable_double; mod t05_variable_quoted_double; mod t06_escape_interpolation; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t02_double_quoted/t01_inline.rs000066400000000000000000000015001474765622100326700ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/02_double_quoted/01_inline.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("01_inline") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: \"dquoted\";\ \n output: #{\"dquoted\"};\ \n output: \"[#{\"dquoted\"}]\";\ \n output: \"#{\"dquoted\"}\";\ \n output: \'#{\"dquoted\"}\';\ \n output: \"[\'#{\"dquoted\"}\']\";\ \n}\n"), ".result {\ \n output: \"dquoted\";\ \n output: dquoted;\ \n output: \"[dquoted]\";\ \n output: \"dquoted\";\ \n output: \"dquoted\";\ \n output: \"[\'dquoted\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t02_double_quoted/t02_variable.rs000066400000000000000000000015131474765622100332040ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/02_double_quoted/02_variable.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("02_variable") } #[test] fn test() { assert_eq!( runner().ok("$input: \"dquoted\";\ \n.result {\ \n output: $input;\ \n output: #{$input};\ \n output: \"[#{$input}]\";\ \n output: \"#{$input}\";\ \n output: \'#{$input}\';\ \n output: \"[\'#{$input}\']\";\ \n}\n"), ".result {\ \n output: \"dquoted\";\ \n output: dquoted;\ \n output: \"[dquoted]\";\ \n output: \"dquoted\";\ \n output: \"dquoted\";\ \n output: \"[\'dquoted\']\";\ \n}\n" ); } t03_inline_double.rs000066400000000000000000000014031474765622100341470ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t02_double_quoted//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/02_double_quoted/03_inline_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("03_inline_double") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: #{#{\"dquoted\"}};\ \n output: #{\"[#{\"dquoted\"}]\"};\ \n output: #{\"#{\"dquoted\"}\"};\ \n output: #{\'#{\"dquoted\"}\'};\ \n output: #{\"[\'#{\"dquoted\"}\']\"};\ \n}\n"), ".result {\ \n output: dquoted;\ \n output: [dquoted];\ \n output: dquoted;\ \n output: dquoted;\ \n output: [\'dquoted\'];\ \n}\n" ); } t04_variable_double.rs000066400000000000000000000014231474765622100344610ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t02_double_quoted//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/02_double_quoted/04_variable_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("04_variable_double") } #[test] fn test() { assert_eq!( runner().ok("$input: \"dquoted\";\ \n.result {\ \n output: #{#{$input}};\ \n output: #{\"[#{$input}]\"};\ \n output: #{\"#{$input}\"};\ \n output: #{\'#{$input}\'};\ \n output: #{\"[\'#{$input}\']\"};\ \n}\n"), ".result {\ \n output: dquoted;\ \n output: [dquoted];\ \n output: dquoted;\ \n output: dquoted;\ \n output: [\'dquoted\'];\ \n}\n" ); } t05_variable_quoted_double.rs000066400000000000000000000024101474765622100360400ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t02_double_quoted//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/02_double_quoted/05_variable_quoted_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("05_variable_quoted_double") } #[test] fn test() { assert_eq!( runner().ok("$input: \"dquoted\";\ \n.result {\ \n dquoted: \"#{#{$input}}\";\ \n dquoted: \"#{\"[#{$input}]\"}\";\ \n dquoted: \"#{\"#{$input}\"}\";\ \n dquoted: \"#{\'#{$input}\'}\";\ \n dquoted: \"#{\"[\'#{$input}\']\"}\";\ \n squoted: \'#{#{$input}}\';\ \n squoted: \'#{\"[#{$input}]\"}\';\ \n squoted: \'#{\"#{$input}\"}\';\ \n squoted: \'#{\'#{$input}\'}\';\ \n squoted: \'#{\"[\'#{$input}\']\"}\';\ \n}\n"), ".result {\ \n dquoted: \"dquoted\";\ \n dquoted: \"[dquoted]\";\ \n dquoted: \"dquoted\";\ \n dquoted: \"dquoted\";\ \n dquoted: \"[\'dquoted\']\";\ \n squoted: \"dquoted\";\ \n squoted: \"[dquoted]\";\ \n squoted: \"dquoted\";\ \n squoted: \"dquoted\";\ \n squoted: \"[\'dquoted\']\";\ \n}\n" ); } t06_escape_interpolation.rs000066400000000000000000000014301474765622100355510ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t02_double_quoted//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/02_double_quoted/06_escape_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("06_escape_interpolation") } #[test] fn test() { assert_eq!( runner().ok("$input: \"dquoted\";\ \n.result {\ \n output: \"[\\#{\"dquoted\"}]\";\ \n output: \"\\#{\"dquoted\"}\";\ \n output: \'\\#{\"dquoted\"}\';\ \n output: \"[\'\\#{\"dquoted\"}\']\";\ \n}\n"), ".result {\ \n output: \"[#{\" dquoted \"}]\";\ \n output: \"#{\" dquoted \"}\";\ \n output: \'#{\"dquoted\"}\';\ \n output: \"[\'#{\" dquoted \"}\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t03_single_quoted/000077500000000000000000000000001474765622100303745ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t03_single_quoted/mod.rs000066400000000000000000000005401474765622100315200ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/03_single_quoted" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("03_single_quoted") } mod t01_inline; mod t02_variable; mod t03_inline_double; mod t04_variable_double; mod t05_variable_quoted_double; mod t06_escape_interpolation; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t03_single_quoted/t01_inline.rs000066400000000000000000000015001474765622100327000ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/03_single_quoted/01_inline.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("01_inline") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: \'squoted\';\ \n output: #{\'squoted\'};\ \n output: \"[#{\'squoted\'}]\";\ \n output: \"#{\'squoted\'}\";\ \n output: \'#{\'squoted\'}\';\ \n output: \"[\'#{\'squoted\'}\']\";\ \n}\n"), ".result {\ \n output: \"squoted\";\ \n output: squoted;\ \n output: \"[squoted]\";\ \n output: \"squoted\";\ \n output: \"squoted\";\ \n output: \"[\'squoted\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t03_single_quoted/t02_variable.rs000066400000000000000000000015131474765622100332140ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/03_single_quoted/02_variable.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("02_variable") } #[test] fn test() { assert_eq!( runner().ok("$input: \'squoted\';\ \n.result {\ \n output: $input;\ \n output: #{$input};\ \n output: \"[#{$input}]\";\ \n output: \"#{$input}\";\ \n output: \'#{$input}\';\ \n output: \"[\'#{$input}\']\";\ \n}\n"), ".result {\ \n output: \"squoted\";\ \n output: squoted;\ \n output: \"[squoted]\";\ \n output: \"squoted\";\ \n output: \"squoted\";\ \n output: \"[\'squoted\']\";\ \n}\n" ); } t03_inline_double.rs000066400000000000000000000014031474765622100341570ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t03_single_quoted//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/03_single_quoted/03_inline_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("03_inline_double") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: #{#{\'squoted\'}};\ \n output: #{\"[#{\'squoted\'}]\"};\ \n output: #{\"#{\'squoted\'}\"};\ \n output: #{\'#{\'squoted\'}\'};\ \n output: #{\"[\'#{\'squoted\'}\']\"};\ \n}\n"), ".result {\ \n output: squoted;\ \n output: [squoted];\ \n output: squoted;\ \n output: squoted;\ \n output: [\'squoted\'];\ \n}\n" ); } t04_variable_double.rs000066400000000000000000000014231474765622100344710ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t03_single_quoted//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/03_single_quoted/04_variable_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("04_variable_double") } #[test] fn test() { assert_eq!( runner().ok("$input: \'squoted\';\ \n.result {\ \n output: #{#{$input}};\ \n output: #{\"[#{$input}]\"};\ \n output: #{\"#{$input}\"};\ \n output: #{\'#{$input}\'};\ \n output: #{\"[\'#{$input}\']\"};\ \n}\n"), ".result {\ \n output: squoted;\ \n output: [squoted];\ \n output: squoted;\ \n output: squoted;\ \n output: [\'squoted\'];\ \n}\n" ); } t05_variable_quoted_double.rs000066400000000000000000000024101474765622100360500ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t03_single_quoted//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/03_single_quoted/05_variable_quoted_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("05_variable_quoted_double") } #[test] fn test() { assert_eq!( runner().ok("$input: \'squoted\';\ \n.result {\ \n dquoted: \"#{#{$input}}\";\ \n dquoted: \"#{\"[#{$input}]\"}\";\ \n dquoted: \"#{\"#{$input}\"}\";\ \n dquoted: \"#{\'#{$input}\'}\";\ \n dquoted: \"#{\"[\'#{$input}\']\"}\";\ \n squoted: \'#{#{$input}}\';\ \n squoted: \'#{\"[#{$input}]\"}\';\ \n squoted: \'#{\"#{$input}\"}\';\ \n squoted: \'#{\'#{$input}\'}\';\ \n squoted: \'#{\"[\'#{$input}\']\"}\';\ \n}\n"), ".result {\ \n dquoted: \"squoted\";\ \n dquoted: \"[squoted]\";\ \n dquoted: \"squoted\";\ \n dquoted: \"squoted\";\ \n dquoted: \"[\'squoted\']\";\ \n squoted: \"squoted\";\ \n squoted: \"[squoted]\";\ \n squoted: \"squoted\";\ \n squoted: \"squoted\";\ \n squoted: \"[\'squoted\']\";\ \n}\n" ); } t06_escape_interpolation.rs000066400000000000000000000014241474765622100355640ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t03_single_quoted//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/03_single_quoted/06_escape_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("06_escape_interpolation") } #[test] fn test() { assert_eq!( runner().ok("$input: \'squoted\';\ \n.result {\ \n output: \"[\\#{\'squoted\'}]\";\ \n output: \"\\#{\'squoted\'}\";\ \n output: \'\\#{\'squoted\'}\';\ \n output: \"[\'\\#{\'squoted\'}\']\";\ \n}\n"), ".result {\ \n output: \"[#{\'squoted\'}]\";\ \n output: \"#{\'squoted\'}\";\ \n output: \"#{\" squoted \"}\";\ \n output: \"[\'#{\'squoted\'}\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t04_space_list_quoted/000077500000000000000000000000001474765622100312425ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t04_space_list_quoted/mod.rs000066400000000000000000000005501474765622100323670ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/04_space_list_quoted" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("04_space_list_quoted") } mod t01_inline; mod t02_variable; mod t03_inline_double; mod t04_variable_double; mod t05_variable_quoted_double; mod t06_escape_interpolation; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t04_space_list_quoted/t01_inline.rs000066400000000000000000000016041474765622100335530ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/04_space_list_quoted/01_inline.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("01_inline") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: \"alpha\" \'beta\';\ \n output: #{\"alpha\" \'beta\'};\ \n output: \"[#{\"alpha\" \'beta\'}]\";\ \n output: \"#{\"alpha\" \'beta\'}\";\ \n output: \'#{\"alpha\" \'beta\'}\';\ \n output: \"[\'#{\"alpha\" \'beta\'}\']\";\ \n}\n"), ".result {\ \n output: \"alpha\" \"beta\";\ \n output: alpha beta;\ \n output: \"[alpha beta]\";\ \n output: \"alpha beta\";\ \n output: \"alpha beta\";\ \n output: \"[\'alpha beta\']\";\ \n}\n" ); } t02_variable.rs000066400000000000000000000015541474765622100340100ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t04_space_list_quoted//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/04_space_list_quoted/02_variable.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("02_variable") } #[test] fn test() { assert_eq!( runner().ok("$input: \"alpha\" \'beta\';\ \n.result {\ \n output: $input;\ \n output: #{$input};\ \n output: \"[#{$input}]\";\ \n output: \"#{$input}\";\ \n output: \'#{$input}\';\ \n output: \"[\'#{$input}\']\";\ \n}\n"), ".result {\ \n output: \"alpha\" \"beta\";\ \n output: alpha beta;\ \n output: \"[alpha beta]\";\ \n output: \"alpha beta\";\ \n output: \"alpha beta\";\ \n output: \"[\'alpha beta\']\";\ \n}\n" ); } t03_inline_double.rs000066400000000000000000000014711474765622100350320ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t04_space_list_quoted//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/04_space_list_quoted/03_inline_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("03_inline_double") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: #{#{\"alpha\" \'beta\'}};\ \n output: #{\"[#{\"alpha\" \'beta\'}]\"};\ \n output: #{\"#{\"alpha\" \'beta\'}\"};\ \n output: #{\'#{\"alpha\" \'beta\'}\'};\ \n output: #{\"[\'#{\"alpha\" \'beta\'}\']\"};\ \n}\n"), ".result {\ \n output: alpha beta;\ \n output: [alpha beta];\ \n output: alpha beta;\ \n output: alpha beta;\ \n output: [\'alpha beta\'];\ \n}\n" ); } t04_variable_double.rs000066400000000000000000000014551474765622100353440ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t04_space_list_quoted//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/04_space_list_quoted/04_variable_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("04_variable_double") } #[test] fn test() { assert_eq!( runner().ok("$input: \"alpha\" \'beta\';\ \n.result {\ \n output: #{#{$input}};\ \n output: #{\"[#{$input}]\"};\ \n output: #{\"#{$input}\"};\ \n output: #{\'#{$input}\'};\ \n output: #{\"[\'#{$input}\']\"};\ \n}\n"), ".result {\ \n output: alpha beta;\ \n output: [alpha beta];\ \n output: alpha beta;\ \n output: alpha beta;\ \n output: [\'alpha beta\'];\ \n}\n" ); } t05_variable_quoted_double.rs000066400000000000000000000024611474765622100367240ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t04_space_list_quoted//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/04_space_list_quoted/05_variable_quoted_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("05_variable_quoted_double") } #[test] fn test() { assert_eq!( runner().ok("$input: \"alpha\" \'beta\';\ \n.result {\ \n dquoted: \"#{#{$input}}\";\ \n dquoted: \"#{\"[#{$input}]\"}\";\ \n dquoted: \"#{\"#{$input}\"}\";\ \n dquoted: \"#{\'#{$input}\'}\";\ \n dquoted: \"#{\"[\'#{$input}\']\"}\";\ \n squoted: \'#{#{$input}}\';\ \n squoted: \'#{\"[#{$input}]\"}\';\ \n squoted: \'#{\"#{$input}\"}\';\ \n squoted: \'#{\'#{$input}\'}\';\ \n squoted: \'#{\"[\'#{$input}\']\"}\';\ \n}\n"), ".result {\ \n dquoted: \"alpha beta\";\ \n dquoted: \"[alpha beta]\";\ \n dquoted: \"alpha beta\";\ \n dquoted: \"alpha beta\";\ \n dquoted: \"[\'alpha beta\']\";\ \n squoted: \"alpha beta\";\ \n squoted: \"[alpha beta]\";\ \n squoted: \"alpha beta\";\ \n squoted: \"alpha beta\";\ \n squoted: \"[\'alpha beta\']\";\ \n}\n" ); } t06_escape_interpolation.rs000066400000000000000000000015351474765622100364350ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t04_space_list_quoted//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/04_space_list_quoted/06_escape_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("06_escape_interpolation") } #[test] fn test() { assert_eq!( runner().ok("$input: \"alpha\" \'beta\';\ \n.result {\ \n output: \"[\\#{\"alpha\" \'beta\'}]\";\ \n output: \"\\#{\"alpha\" \'beta\'}\";\ \n output: \'\\#{\"alpha\" \'beta\'}\';\ \n output: \"[\'\\#{\"alpha\" \'beta\'}\']\";\ \n}\n"), ".result {\ \n output: \"[#{\" alpha \" \'beta\'}]\";\ \n output: \"#{\" alpha \" \'beta\'}\";\ \n output: \'#{\"alpha\" \' beta \"}\";\ \n output: \"[\'#{\" alpha \" \'beta\'}\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t05_comma_list_quoted/000077500000000000000000000000001474765622100312445ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t05_comma_list_quoted/mod.rs000066400000000000000000000005501474765622100323710ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/05_comma_list_quoted" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("05_comma_list_quoted") } mod t01_inline; mod t02_variable; mod t03_inline_double; mod t04_variable_double; mod t05_variable_quoted_double; mod t06_escape_interpolation; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t05_comma_list_quoted/t01_inline.rs000066400000000000000000000016201474765622100335530ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/05_comma_list_quoted/01_inline.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("01_inline") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: \"alpha\", \'beta\';\ \n output: #{\"alpha\", \'beta\'};\ \n output: \"[#{\"alpha\", \'beta\'}]\";\ \n output: \"#{\"alpha\", \'beta\'}\";\ \n output: \'#{\"alpha\", \'beta\'}\';\ \n output: \"[\'#{\"alpha\", \'beta\'}\']\";\ \n}\n"), ".result {\ \n output: \"alpha\", \"beta\";\ \n output: alpha, beta;\ \n output: \"[alpha, beta]\";\ \n output: \"alpha, beta\";\ \n output: \"alpha, beta\";\ \n output: \"[\'alpha, beta\']\";\ \n}\n" ); } t02_variable.rs000066400000000000000000000015631474765622100340120ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t05_comma_list_quoted//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/05_comma_list_quoted/02_variable.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("02_variable") } #[test] fn test() { assert_eq!( runner().ok("$input: \"alpha\", \'beta\';\ \n.result {\ \n output: $input;\ \n output: #{$input};\ \n output: \"[#{$input}]\";\ \n output: \"#{$input}\";\ \n output: \'#{$input}\';\ \n output: \"[\'#{$input}\']\";\ \n}\n"), ".result {\ \n output: \"alpha\", \"beta\";\ \n output: alpha, beta;\ \n output: \"[alpha, beta]\";\ \n output: \"alpha, beta\";\ \n output: \"alpha, beta\";\ \n output: \"[\'alpha, beta\']\";\ \n}\n" ); } t03_inline_double.rs000066400000000000000000000015031474765622100350300ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t05_comma_list_quoted//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/05_comma_list_quoted/03_inline_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("03_inline_double") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: #{#{\"alpha\", \'beta\'}};\ \n output: #{\"[#{\"alpha\", \'beta\'}]\"};\ \n output: #{\"#{\"alpha\", \'beta\'}\"};\ \n output: #{\'#{\"alpha\", \'beta\'}\'};\ \n output: #{\"[\'#{\"alpha\", \'beta\'}\']\"};\ \n}\n"), ".result {\ \n output: alpha, beta;\ \n output: [alpha, beta];\ \n output: alpha, beta;\ \n output: alpha, beta;\ \n output: [\'alpha, beta\'];\ \n}\n" ); } t04_variable_double.rs000066400000000000000000000014631474765622100353450ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t05_comma_list_quoted//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/05_comma_list_quoted/04_variable_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("04_variable_double") } #[test] fn test() { assert_eq!( runner().ok("$input: \"alpha\", \'beta\';\ \n.result {\ \n output: #{#{$input}};\ \n output: #{\"[#{$input}]\"};\ \n output: #{\"#{$input}\"};\ \n output: #{\'#{$input}\'};\ \n output: #{\"[\'#{$input}\']\"};\ \n}\n"), ".result {\ \n output: alpha, beta;\ \n output: [alpha, beta];\ \n output: alpha, beta;\ \n output: alpha, beta;\ \n output: [\'alpha, beta\'];\ \n}\n" ); } t05_variable_quoted_double.rs000066400000000000000000000024741474765622100367320ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t05_comma_list_quoted//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/05_comma_list_quoted/05_variable_quoted_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("05_variable_quoted_double") } #[test] fn test() { assert_eq!( runner().ok("$input: \"alpha\", \'beta\';\ \n.result {\ \n dquoted: \"#{#{$input}}\";\ \n dquoted: \"#{\"[#{$input}]\"}\";\ \n dquoted: \"#{\"#{$input}\"}\";\ \n dquoted: \"#{\'#{$input}\'}\";\ \n dquoted: \"#{\"[\'#{$input}\']\"}\";\ \n squoted: \'#{#{$input}}\';\ \n squoted: \'#{\"[#{$input}]\"}\';\ \n squoted: \'#{\"#{$input}\"}\';\ \n squoted: \'#{\'#{$input}\'}\';\ \n squoted: \'#{\"[\'#{$input}\']\"}\';\ \n}\n"), ".result {\ \n dquoted: \"alpha, beta\";\ \n dquoted: \"[alpha, beta]\";\ \n dquoted: \"alpha, beta\";\ \n dquoted: \"alpha, beta\";\ \n dquoted: \"[\'alpha, beta\']\";\ \n squoted: \"alpha, beta\";\ \n squoted: \"[alpha, beta]\";\ \n squoted: \"alpha, beta\";\ \n squoted: \"alpha, beta\";\ \n squoted: \"[\'alpha, beta\']\";\ \n}\n" ); } t06_escape_interpolation.rs000066400000000000000000000015461474765622100364410ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t05_comma_list_quoted//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/05_comma_list_quoted/06_escape_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("06_escape_interpolation") } #[test] fn test() { assert_eq!( runner().ok("$input: \"alpha\", \'beta\';\ \n.result {\ \n output: \"[\\#{\"alpha\", \'beta\'}]\";\ \n output: \"\\#{\"alpha\", \'beta\'}\";\ \n output: \'\\#{\"alpha\", \'beta\'}\';\ \n output: \"[\'\\#{\"alpha\", \'beta\'}\']\";\ \n}\n"), ".result {\ \n output: \"[#{\" alpha \", \'beta\'}]\";\ \n output: \"#{\" alpha \", \'beta\'}\";\ \n output: \'#{\"alpha\", \' beta \"}\";\ \n output: \"[\'#{\" alpha \", \'beta\'}\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t06_space_list_complex/000077500000000000000000000000001474765622100314125ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t06_space_list_complex/mod.rs000066400000000000000000000005521474765622100325410ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/06_space_list_complex" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("06_space_list_complex") } mod t01_inline; mod t02_variable; mod t03_inline_double; mod t04_variable_double; mod t05_variable_quoted_double; mod t06_escape_interpolation; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t06_space_list_complex/t01_inline.rs000066400000000000000000000017151474765622100337260ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/06_space_list_complex/01_inline.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("01_inline") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: gamme \"\'\"delta\"\'\";\ \n output: #{gamme \"\'\"delta\"\'\"};\ \n output: \"[#{gamme \"\'\"delta\"\'\"}]\";\ \n output: \"#{gamme \"\'\"delta\"\'\"}\";\ \n output: \'#{gamme \"\'\"delta\"\'\"}\';\ \n output: \"[\'#{gamme \"\'\"delta\"\'\"}\']\";\ \n}\n"), ".result {\ \n output: gamme \"\'\" delta \"\'\";\ \n output: gamme \' delta \';\ \n output: \"[gamme \' delta \']\";\ \n output: \"gamme \' delta \'\";\ \n output: \"gamme \' delta \'\";\ \n output: \"[\'gamme \' delta \'\']\";\ \n}\n" ); } t02_variable.rs000066400000000000000000000016341474765622100341570ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t06_space_list_complex//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/06_space_list_complex/02_variable.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("02_variable") } #[test] fn test() { assert_eq!( runner().ok("$input: gamme \"\'\"delta\"\'\";\ \n.result {\ \n output: $input;\ \n output: #{$input};\ \n output: \"[#{$input}]\";\ \n output: \"#{$input}\";\ \n output: \'#{$input}\';\ \n output: \"[\'#{$input}\']\";\ \n}\n"), ".result {\ \n output: gamme \"\'\" delta \"\'\";\ \n output: gamme \' delta \';\ \n output: \"[gamme \' delta \']\";\ \n output: \"gamme \' delta \'\";\ \n output: \"gamme \' delta \'\";\ \n output: \"[\'gamme \' delta \'\']\";\ \n}\n" ); } t03_inline_double.rs000066400000000000000000000015661474765622100352070ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t06_space_list_complex//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/06_space_list_complex/03_inline_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("03_inline_double") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: #{#{gamme \"\'\"delta\"\'\"}};\ \n output: #{\"[#{gamme \"\'\"delta\"\'\"}]\"};\ \n output: #{\"#{gamme \"\'\"delta\"\'\"}\"};\ \n output: #{\'#{gamme \"\'\"delta\"\'\"}\'};\ \n output: #{\"[\'#{gamme \"\'\"delta\"\'\"}\']\"};\ \n}\n"), ".result {\ \n output: gamme \' delta \';\ \n output: [gamme \' delta \'];\ \n output: gamme \' delta \';\ \n output: gamme \' delta \';\ \n output: [\'gamme \' delta \'\'];\ \n}\n" ); } t04_variable_double.rs000066400000000000000000000015261474765622100355130ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t06_space_list_complex//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/06_space_list_complex/04_variable_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("04_variable_double") } #[test] fn test() { assert_eq!( runner().ok("$input: gamme \"\'\"delta\"\'\";\ \n.result {\ \n output: #{#{$input}};\ \n output: #{\"[#{$input}]\"};\ \n output: #{\"#{$input}\"};\ \n output: #{\'#{$input}\'};\ \n output: #{\"[\'#{$input}\']\"};\ \n}\n"), ".result {\ \n output: gamme \' delta \';\ \n output: [gamme \' delta \'];\ \n output: gamme \' delta \';\ \n output: gamme \' delta \';\ \n output: [\'gamme \' delta \'\'];\ \n}\n" ); } t05_variable_quoted_double.rs000066400000000000000000000025751474765622100371020ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t06_space_list_complex//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/06_space_list_complex/05_variable_quoted_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("05_variable_quoted_double") } #[test] fn test() { assert_eq!( runner().ok("$input: gamme \"\'\"delta\"\'\";\ \n.result {\ \n dquoted: \"#{#{$input}}\";\ \n dquoted: \"#{\"[#{$input}]\"}\";\ \n dquoted: \"#{\"#{$input}\"}\";\ \n dquoted: \"#{\'#{$input}\'}\";\ \n dquoted: \"#{\"[\'#{$input}\']\"}\";\ \n squoted: \'#{#{$input}}\';\ \n squoted: \'#{\"[#{$input}]\"}\';\ \n squoted: \'#{\"#{$input}\"}\';\ \n squoted: \'#{\'#{$input}\'}\';\ \n squoted: \'#{\"[\'#{$input}\']\"}\';\ \n}\n"), ".result {\ \n dquoted: \"gamme \' delta \'\";\ \n dquoted: \"[gamme \' delta \']\";\ \n dquoted: \"gamme \' delta \'\";\ \n dquoted: \"gamme \' delta \'\";\ \n dquoted: \"[\'gamme \' delta \'\']\";\ \n squoted: \"gamme \' delta \'\";\ \n squoted: \"[gamme \' delta \']\";\ \n squoted: \"gamme \' delta \'\";\ \n squoted: \"gamme \' delta \'\";\ \n squoted: \"[\'gamme \' delta \'\']\";\ \n}\n" ); } t06_escape_interpolation.rs000066400000000000000000000016131474765622100366020ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t06_space_list_complex//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/06_space_list_complex/06_escape_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("06_escape_interpolation") } #[test] fn test() { assert_eq!( runner().ok("$input: gamme \"\'\"delta\"\'\";\ \n.result {\ \n output: \"[\\#{gamme \"\'\"delta\"\'\"}]\";\ \n output: \"\\#{gamme \"\'\"delta\"\'\"}\";\ \n output: \'\\#{gamme \"\'\"delta\"\'\"}\';\ \n output: \"[\'\\#{gamme \"\'\"delta\"\'\"}\']\";\ \n}\n"), ".result {\ \n output: \"[#{gamme \" \'\"delta\"\' \"}]\";\ \n output: \"#{gamme \" \'\"delta\"\' \"}\";\ \n output: \'#{gamme \"\' \"delta\" \'\"}\';\ \n output: \"[\'#{gamme \" \'\"delta\"\' \"}\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t07_comma_list_complex/000077500000000000000000000000001474765622100314145ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t07_comma_list_complex/mod.rs000066400000000000000000000005521474765622100325430ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/07_comma_list_complex" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("07_comma_list_complex") } mod t01_inline; mod t02_variable; mod t03_inline_double; mod t04_variable_double; mod t05_variable_quoted_double; mod t06_escape_interpolation; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t07_comma_list_complex/t01_inline.rs000066400000000000000000000017311474765622100337260ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/07_comma_list_complex/01_inline.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("01_inline") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: gamma, \"\'\"delta\"\'\";\ \n output: #{gamma, \"\'\"delta\"\'\"};\ \n output: \"[#{gamma, \"\'\"delta\"\'\"}]\";\ \n output: \"#{gamma, \"\'\"delta\"\'\"}\";\ \n output: \'#{gamma, \"\'\"delta\"\'\"}\';\ \n output: \"[\'#{gamma, \"\'\"delta\"\'\"}\']\";\ \n}\n"), ".result {\ \n output: gamma, \"\'\" delta \"\'\";\ \n output: gamma, \' delta \';\ \n output: \"[gamma, \' delta \']\";\ \n output: \"gamma, \' delta \'\";\ \n output: \"gamma, \' delta \'\";\ \n output: \"[\'gamma, \' delta \'\']\";\ \n}\n" ); } t02_variable.rs000066400000000000000000000016431474765622100341610ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t07_comma_list_complex//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/07_comma_list_complex/02_variable.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("02_variable") } #[test] fn test() { assert_eq!( runner().ok("$input: gamma, \"\'\"delta\"\'\";\ \n.result {\ \n output: $input;\ \n output: #{$input};\ \n output: \"[#{$input}]\";\ \n output: \"#{$input}\";\ \n output: \'#{$input}\';\ \n output: \"[\'#{$input}\']\";\ \n}\n"), ".result {\ \n output: gamma, \"\'\" delta \"\'\";\ \n output: gamma, \' delta \';\ \n output: \"[gamma, \' delta \']\";\ \n output: \"gamma, \' delta \'\";\ \n output: \"gamma, \' delta \'\";\ \n output: \"[\'gamma, \' delta \'\']\";\ \n}\n" ); } t03_inline_double.rs000066400000000000000000000016001474765622100351760ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t07_comma_list_complex//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/07_comma_list_complex/03_inline_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("03_inline_double") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: #{#{gamma, \"\'\"delta\"\'\"}};\ \n output: #{\"[#{gamma, \"\'\"delta\"\'\"}]\"};\ \n output: #{\"#{gamma, \"\'\"delta\"\'\"}\"};\ \n output: #{\'#{gamma, \"\'\"delta\"\'\"}\'};\ \n output: #{\"[\'#{gamma, \"\'\"delta\"\'\"}\']\"};\ \n}\n"), ".result {\ \n output: gamma, \' delta \';\ \n output: [gamma, \' delta \'];\ \n output: gamma, \' delta \';\ \n output: gamma, \' delta \';\ \n output: [\'gamma, \' delta \'\'];\ \n}\n" ); } t04_variable_double.rs000066400000000000000000000015341474765622100355140ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t07_comma_list_complex//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/07_comma_list_complex/04_variable_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("04_variable_double") } #[test] fn test() { assert_eq!( runner().ok("$input: gamma, \"\'\"delta\"\'\";\ \n.result {\ \n output: #{#{$input}};\ \n output: #{\"[#{$input}]\"};\ \n output: #{\"#{$input}\"};\ \n output: #{\'#{$input}\'};\ \n output: #{\"[\'#{$input}\']\"};\ \n}\n"), ".result {\ \n output: gamma, \' delta \';\ \n output: [gamma, \' delta \'];\ \n output: gamma, \' delta \';\ \n output: gamma, \' delta \';\ \n output: [\'gamma, \' delta \'\'];\ \n}\n" ); } t05_variable_quoted_double.rs000066400000000000000000000026101474765622100370720ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t07_comma_list_complex//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/07_comma_list_complex/05_variable_quoted_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("05_variable_quoted_double") } #[test] fn test() { assert_eq!( runner().ok("$input: gamma, \"\'\"delta\"\'\";\ \n.result {\ \n dquoted: \"#{#{$input}}\";\ \n dquoted: \"#{\"[#{$input}]\"}\";\ \n dquoted: \"#{\"#{$input}\"}\";\ \n dquoted: \"#{\'#{$input}\'}\";\ \n dquoted: \"#{\"[\'#{$input}\']\"}\";\ \n squoted: \'#{#{$input}}\';\ \n squoted: \'#{\"[#{$input}]\"}\';\ \n squoted: \'#{\"#{$input}\"}\';\ \n squoted: \'#{\'#{$input}\'}\';\ \n squoted: \'#{\"[\'#{$input}\']\"}\';\ \n}\n"), ".result {\ \n dquoted: \"gamma, \' delta \'\";\ \n dquoted: \"[gamma, \' delta \']\";\ \n dquoted: \"gamma, \' delta \'\";\ \n dquoted: \"gamma, \' delta \'\";\ \n dquoted: \"[\'gamma, \' delta \'\']\";\ \n squoted: \"gamma, \' delta \'\";\ \n squoted: \"[gamma, \' delta \']\";\ \n squoted: \"gamma, \' delta \'\";\ \n squoted: \"gamma, \' delta \'\";\ \n squoted: \"[\'gamma, \' delta \'\']\";\ \n}\n" ); } t06_escape_interpolation.rs000066400000000000000000000016241474765622100366060ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t07_comma_list_complex//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/07_comma_list_complex/06_escape_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("06_escape_interpolation") } #[test] fn test() { assert_eq!( runner().ok("$input: gamma, \"\'\"delta\"\'\";\ \n.result {\ \n output: \"[\\#{gamma, \"\'\"delta\"\'\"}]\";\ \n output: \"\\#{gamma, \"\'\"delta\"\'\"}\";\ \n output: \'\\#{gamma, \"\'\"delta\"\'\"}\';\ \n output: \"[\'\\#{gamma, \"\'\"delta\"\'\"}\']\";\ \n}\n"), ".result {\ \n output: \"[#{gamma, \" \'\"delta\"\' \"}]\";\ \n output: \"#{gamma, \" \'\"delta\"\' \"}\";\ \n output: \'#{gamma, \"\' \"delta\" \'\"}\';\ \n output: \"[\'#{gamma, \" \'\"delta\"\' \"}\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t10_escaped_backslash/000077500000000000000000000000001474765622100311475ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t10_escaped_backslash/mod.rs000066400000000000000000000005501474765622100322740ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/10_escaped_backslash" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("10_escaped_backslash") } mod t01_inline; mod t02_variable; mod t03_inline_double; mod t04_variable_double; mod t05_variable_quoted_double; mod t06_escape_interpolation; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t10_escaped_backslash/t01_inline.rs000066400000000000000000000014241474765622100334600ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/10_escaped_backslash/01_inline.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("01_inline") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: \\\\;\ \n output: #{\\\\};\ \n output: \"[#{\\\\}]\";\ \n output: \"#{\\\\}\";\ \n output: \'#{\\\\}\';\ \n output: \"[\'#{\\\\}\']\";\ \n}\n"), ".result {\ \n output: \\\\;\ \n output: \\\\;\ \n output: \"[\\\\\\\\]\";\ \n output: \"\\\\\\\\\";\ \n output: \"\\\\\\\\\";\ \n output: \"[\'\\\\\\\\\']\";\ \n}\n" ); } t02_variable.rs000066400000000000000000000015021474765622100337060ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t10_escaped_backslash//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/10_escaped_backslash/02_variable.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("02_variable") } #[test] fn test() { assert_eq!( runner().ok("$input: \\\\;\ \n.result {\ \n output: $input;\ \n output: #{$input};\ \n output: \"[#{$input}]\";\ \n output: \"#{$input}\";\ \n output: \'#{$input}\';\ \n output: \"[\'#{$input}\']\";\ \n}\n"), ".result {\ \n output: \\\\;\ \n output: \\\\;\ \n output: \"[\\\\\\\\]\";\ \n output: \"\\\\\\\\\";\ \n output: \"\\\\\\\\\";\ \n output: \"[\'\\\\\\\\\']\";\ \n}\n" ); } t03_inline_double.rs000066400000000000000000000013251474765622100347350ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t10_escaped_backslash//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/10_escaped_backslash/03_inline_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("03_inline_double") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: #{#{\\\\}};\ \n output: #{\"[#{\\\\}]\"};\ \n output: #{\"#{\\\\}\"};\ \n output: #{\'#{\\\\}\'};\ \n output: #{\"[\'#{\\\\}\']\"};\ \n}\n"), ".result {\ \n output: \\\\;\ \n output: [\\\\];\ \n output: \\\\;\ \n output: \\\\;\ \n output: [\'\\\\\'];\ \n}\n" ); } t04_variable_double.rs000066400000000000000000000014011474765622100352400ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t10_escaped_backslash//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/10_escaped_backslash/04_variable_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("04_variable_double") } #[test] fn test() { assert_eq!( runner().ok("$input: \\\\;\ \n.result {\ \n output: #{#{$input}};\ \n output: #{\"[#{$input}]\"};\ \n output: #{\"#{$input}\"};\ \n output: #{\'#{$input}\'};\ \n output: #{\"[\'#{$input}\']\"};\ \n}\n"), ".result {\ \n output: \\\\;\ \n output: [\\\\];\ \n output: \\\\;\ \n output: \\\\;\ \n output: [\'\\\\\'];\ \n}\n" ); } t05_variable_quoted_double.rs000066400000000000000000000024171474765622100366320ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t10_escaped_backslash//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/10_escaped_backslash/05_variable_quoted_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("05_variable_quoted_double") } #[test] fn test() { assert_eq!( runner().ok("$input: \\\\;\ \n.result {\ \n dquoted: \"#{#{$input}}\";\ \n dquoted: \"#{\"[#{$input}]\"}\";\ \n dquoted: \"#{\"#{$input}\"}\";\ \n dquoted: \"#{\'#{$input}\'}\";\ \n dquoted: \"#{\"[\'#{$input}\']\"}\";\ \n squoted: \'#{#{$input}}\';\ \n squoted: \'#{\"[#{$input}]\"}\';\ \n squoted: \'#{\"#{$input}\"}\';\ \n squoted: \'#{\'#{$input}\'}\';\ \n squoted: \'#{\"[\'#{$input}\']\"}\';\ \n}\n"), ".result {\ \n dquoted: \"\\\\\\\\\";\ \n dquoted: \"[\\\\\\\\]\";\ \n dquoted: \"\\\\\\\\\";\ \n dquoted: \"\\\\\\\\\";\ \n dquoted: \"[\'\\\\\\\\\']\";\ \n squoted: \"\\\\\\\\\";\ \n squoted: \"[\\\\\\\\]\";\ \n squoted: \"\\\\\\\\\";\ \n squoted: \"\\\\\\\\\";\ \n squoted: \"[\'\\\\\\\\\']\";\ \n}\n" ); } t06_escape_interpolation.rs000066400000000000000000000013271474765622100363410ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t10_escaped_backslash//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/10_escaped_backslash/06_escape_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("06_escape_interpolation") } #[test] fn test() { assert_eq!( runner().ok("$input: \\\\;\ \n.result {\ \n output: \"[\\#{\\\\}]\";\ \n output: \"\\#{\\\\}\";\ \n output: \'\\#{\\\\}\';\ \n output: \"[\'\\#{\\\\}\']\";\ \n}\n"), ".result {\ \n output: \"[#{\\\\}]\";\ \n output: \"#{\\\\}\";\ \n output: \"#{\\\\}\";\ \n output: \"[\'#{\\\\}\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t11_escaped_literal/000077500000000000000000000000001474765622100306515ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t11_escaped_literal/mod.rs000066400000000000000000000005441474765622100320010ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/11_escaped_literal" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("11_escaped_literal") } mod t01_inline; mod t02_variable; mod t03_inline_double; mod t04_variable_double; mod t05_variable_quoted_double; mod t06_escape_interpolation; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t11_escaped_literal/t01_inline.rs000066400000000000000000000015621474765622100331650ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/11_escaped_literal/01_inline.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("01_inline") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: l\\\\ite\\ral;\ \n output: #{l\\\\ite\\ral};\ \n output: \"[#{l\\\\ite\\ral}]\";\ \n output: \"#{l\\\\ite\\ral}\";\ \n output: \'#{l\\\\ite\\ral}\';\ \n output: \"[\'#{l\\\\ite\\ral}\']\";\ \n}\n"), ".result {\ \n output: l\\\\iteral;\ \n output: l\\\\iteral;\ \n output: \"[l\\\\\\\\iteral]\";\ \n output: \"l\\\\\\\\iteral\";\ \n output: \"l\\\\\\\\iteral\";\ \n output: \"[\'l\\\\\\\\iteral\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t11_escaped_literal/t02_variable.rs000066400000000000000000000015631474765622100334760ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/11_escaped_literal/02_variable.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("02_variable") } #[test] fn test() { assert_eq!( runner().ok("$input: l\\\\ite\\ral;\ \n.result {\ \n output: $input;\ \n output: #{$input};\ \n output: \"[#{$input}]\";\ \n output: \"#{$input}\";\ \n output: \'#{$input}\';\ \n output: \"[\'#{$input}\']\";\ \n}\n"), ".result {\ \n output: l\\\\iteral;\ \n output: l\\\\iteral;\ \n output: \"[l\\\\\\\\iteral]\";\ \n output: \"l\\\\\\\\iteral\";\ \n output: \"l\\\\\\\\iteral\";\ \n output: \"[\'l\\\\\\\\iteral\']\";\ \n}\n" ); } t03_inline_double.rs000066400000000000000000000014431474765622100344400ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t11_escaped_literal//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/11_escaped_literal/03_inline_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("03_inline_double") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: #{#{l\\\\ite\\ral}};\ \n output: #{\"[#{l\\\\ite\\ral}]\"};\ \n output: #{\"#{l\\\\ite\\ral}\"};\ \n output: #{\'#{l\\\\ite\\ral}\'};\ \n output: #{\"[\'#{l\\\\ite\\ral}\']\"};\ \n}\n"), ".result {\ \n output: l\\\\iteral;\ \n output: [l\\\\iteral];\ \n output: l\\\\iteral;\ \n output: l\\\\iteral;\ \n output: [\'l\\\\iteral\'];\ \n}\n" ); } t04_variable_double.rs000066400000000000000000000014531474765622100347510ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t11_escaped_literal//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/11_escaped_literal/04_variable_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("04_variable_double") } #[test] fn test() { assert_eq!( runner().ok("$input: l\\\\ite\\ral;\ \n.result {\ \n output: #{#{$input}};\ \n output: #{\"[#{$input}]\"};\ \n output: #{\"#{$input}\"};\ \n output: #{\'#{$input}\'};\ \n output: #{\"[\'#{$input}\']\"};\ \n}\n"), ".result {\ \n output: l\\\\iteral;\ \n output: [l\\\\iteral];\ \n output: l\\\\iteral;\ \n output: l\\\\iteral;\ \n output: [\'l\\\\iteral\'];\ \n}\n" ); } t05_variable_quoted_double.rs000066400000000000000000000025341474765622100363340ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t11_escaped_literal//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/11_escaped_literal/05_variable_quoted_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("05_variable_quoted_double") } #[test] fn test() { assert_eq!( runner().ok("$input: l\\\\ite\\ral;\ \n.result {\ \n dquoted: \"#{#{$input}}\";\ \n dquoted: \"#{\"[#{$input}]\"}\";\ \n dquoted: \"#{\"#{$input}\"}\";\ \n dquoted: \"#{\'#{$input}\'}\";\ \n dquoted: \"#{\"[\'#{$input}\']\"}\";\ \n squoted: \'#{#{$input}}\';\ \n squoted: \'#{\"[#{$input}]\"}\';\ \n squoted: \'#{\"#{$input}\"}\';\ \n squoted: \'#{\'#{$input}\'}\';\ \n squoted: \'#{\"[\'#{$input}\']\"}\';\ \n}\n"), ".result {\ \n dquoted: \"l\\\\\\\\iteral\";\ \n dquoted: \"[l\\\\\\\\iteral]\";\ \n dquoted: \"l\\\\\\\\iteral\";\ \n dquoted: \"l\\\\\\\\iteral\";\ \n dquoted: \"[\'l\\\\\\\\iteral\']\";\ \n squoted: \"l\\\\\\\\iteral\";\ \n squoted: \"[l\\\\\\\\iteral]\";\ \n squoted: \"l\\\\\\\\iteral\";\ \n squoted: \"l\\\\\\\\iteral\";\ \n squoted: \"[\'l\\\\\\\\iteral\']\";\ \n}\n" ); } t06_escape_interpolation.rs000066400000000000000000000014361474765622100360440ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t11_escaped_literal//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/11_escaped_literal/06_escape_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("06_escape_interpolation") } #[test] fn test() { assert_eq!( runner().ok("$input: l\\\\ite\\ral;\ \n.result {\ \n output: \"[\\#{l\\\\ite\\ral}]\";\ \n output: \"\\#{l\\\\ite\\ral}\";\ \n output: \'\\#{l\\\\ite\\ral}\';\ \n output: \"[\'\\#{l\\\\ite\\ral}\']\";\ \n}\n"), ".result {\ \n output: \"[#{l\\\\iteral}]\";\ \n output: \"#{l\\\\iteral}\";\ \n output: \"#{l\\\\iteral}\";\ \n output: \"[\'#{l\\\\iteral}\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t12_escaped_double_quoted/000077500000000000000000000000001474765622100320515ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t12_escaped_double_quoted/mod.rs000066400000000000000000000005601474765622100331770ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/12_escaped_double_quoted" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("12_escaped_double_quoted") } mod t01_inline; mod t02_variable; mod t03_inline_double; mod t04_variable_double; mod t05_variable_quoted_double; mod t06_escape_interpolation; t01_inline.rs000066400000000000000000000016021474765622100343010ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t12_escaped_double_quoted//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/12_escaped_double_quoted/01_inline.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("01_inline") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: \"l\\\\ite\\ral\";\ \n output: #{\"l\\\\ite\\ral\"};\ \n output: \"[#{\"l\\\\ite\\ral\"}]\";\ \n output: \"#{\"l\\\\ite\\ral\"}\";\ \n output: \'#{\"l\\\\ite\\ral\"}\';\ \n output: \"[\'#{\"l\\\\ite\\ral\"}\']\";\ \n}\n"), ".result {\ \n output: \"l\\\\iteral\";\ \n output: l\\iteral;\ \n output: \"[l\\\\iteral]\";\ \n output: \"l\\\\iteral\";\ \n output: \"l\\\\iteral\";\ \n output: \"[\'l\\\\iteral\']\";\ \n}\n" ); } t02_variable.rs000066400000000000000000000015571474765622100346220ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t12_escaped_double_quoted//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/12_escaped_double_quoted/02_variable.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("02_variable") } #[test] fn test() { assert_eq!( runner().ok("$input: \"l\\\\ite\\ral\";\ \n.result {\ \n output: $input;\ \n output: #{$input};\ \n output: \"[#{$input}]\";\ \n output: \"#{$input}\";\ \n output: \'#{$input}\';\ \n output: \"[\'#{$input}\']\";\ \n}\n"), ".result {\ \n output: \"l\\\\iteral\";\ \n output: l\\iteral;\ \n output: \"[l\\\\iteral]\";\ \n output: \"l\\\\iteral\";\ \n output: \"l\\\\iteral\";\ \n output: \"[\'l\\\\iteral\']\";\ \n}\n" ); } t03_inline_double.rs000066400000000000000000000014631474765622100356420ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t12_escaped_double_quoted//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/12_escaped_double_quoted/03_inline_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("03_inline_double") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: #{#{\"l\\\\ite\\ral\"}};\ \n output: #{\"[#{\"l\\\\ite\\ral\"}]\"};\ \n output: #{\"#{\"l\\\\ite\\ral\"}\"};\ \n output: #{\'#{\"l\\\\ite\\ral\"}\'};\ \n output: #{\"[\'#{\"l\\\\ite\\ral\"}\']\"};\ \n}\n"), ".result {\ \n output: l\\iteral;\ \n output: [l\\iteral];\ \n output: l\\iteral;\ \n output: l\\iteral;\ \n output: [\'l\\iteral\'];\ \n}\n" ); } t04_variable_double.rs000066400000000000000000000014531474765622100361510ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t12_escaped_double_quoted//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/12_escaped_double_quoted/04_variable_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("04_variable_double") } #[test] fn test() { assert_eq!( runner().ok("$input: \"l\\\\ite\\ral\";\ \n.result {\ \n output: #{#{$input}};\ \n output: #{\"[#{$input}]\"};\ \n output: #{\"#{$input}\"};\ \n output: #{\'#{$input}\'};\ \n output: #{\"[\'#{$input}\']\"};\ \n}\n"), ".result {\ \n output: l\\iteral;\ \n output: [l\\iteral];\ \n output: l\\iteral;\ \n output: l\\iteral;\ \n output: [\'l\\iteral\'];\ \n}\n" ); } t05_variable_quoted_double.rs000066400000000000000000000024761474765622100375410ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t12_escaped_double_quoted//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/12_escaped_double_quoted/05_variable_quoted_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("05_variable_quoted_double") } #[test] fn test() { assert_eq!( runner().ok("$input: \"l\\\\ite\\ral\";\ \n.result {\ \n dquoted: \"#{#{$input}}\";\ \n dquoted: \"#{\"[#{$input}]\"}\";\ \n dquoted: \"#{\"#{$input}\"}\";\ \n dquoted: \"#{\'#{$input}\'}\";\ \n dquoted: \"#{\"[\'#{$input}\']\"}\";\ \n squoted: \'#{#{$input}}\';\ \n squoted: \'#{\"[#{$input}]\"}\';\ \n squoted: \'#{\"#{$input}\"}\';\ \n squoted: \'#{\'#{$input}\'}\';\ \n squoted: \'#{\"[\'#{$input}\']\"}\';\ \n}\n"), ".result {\ \n dquoted: \"l\\\\iteral\";\ \n dquoted: \"[l\\\\iteral]\";\ \n dquoted: \"l\\\\iteral\";\ \n dquoted: \"l\\\\iteral\";\ \n dquoted: \"[\'l\\\\iteral\']\";\ \n squoted: \"l\\\\iteral\";\ \n squoted: \"[l\\\\iteral]\";\ \n squoted: \"l\\\\iteral\";\ \n squoted: \"l\\\\iteral\";\ \n squoted: \"[\'l\\\\iteral\']\";\ \n}\n" ); } t06_escape_interpolation.rs000066400000000000000000000015161474765622100372430ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t12_escaped_double_quoted//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/12_escaped_double_quoted/06_escape_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("06_escape_interpolation") } #[test] fn test() { assert_eq!( runner().ok("$input: \"l\\\\ite\\ral\";\ \n.result {\ \n output: \"[\\#{\"l\\\\ite\\ral\"}]\";\ \n output: \"\\#{\"l\\\\ite\\ral\"}\";\ \n output: \'\\#{\"l\\\\ite\\ral\"}\';\ \n output: \"[\'\\#{\"l\\\\ite\\ral\"}\']\";\ \n}\n"), ".result {\ \n output: \"[#{\" l\\\\iteral \"}]\";\ \n output: \"#{\" l\\\\iteral \"}\";\ \n output: \'#{\"l\\\\iteral\"}\';\ \n output: \"[\'#{\" l\\\\iteral \"}\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t13_escaped_single_quoted/000077500000000000000000000000001474765622100320615ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t13_escaped_single_quoted/mod.rs000066400000000000000000000005601474765622100332070ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/13_escaped_single_quoted" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("13_escaped_single_quoted") } mod t01_inline; mod t02_variable; mod t03_inline_double; mod t04_variable_double; mod t05_variable_quoted_double; mod t06_escape_interpolation; t01_inline.rs000066400000000000000000000016021474765622100343110ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t13_escaped_single_quoted//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/13_escaped_single_quoted/01_inline.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("01_inline") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: \'l\\\\ite\\ral\';\ \n output: #{\'l\\\\ite\\ral\'};\ \n output: \"[#{\'l\\\\ite\\ral\'}]\";\ \n output: \"#{\'l\\\\ite\\ral\'}\";\ \n output: \'#{\'l\\\\ite\\ral\'}\';\ \n output: \"[\'#{\'l\\\\ite\\ral\'}\']\";\ \n}\n"), ".result {\ \n output: \"l\\\\iteral\";\ \n output: l\\iteral;\ \n output: \"[l\\\\iteral]\";\ \n output: \"l\\\\iteral\";\ \n output: \"l\\\\iteral\";\ \n output: \"[\'l\\\\iteral\']\";\ \n}\n" ); } t02_variable.rs000066400000000000000000000015571474765622100346320ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t13_escaped_single_quoted//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/13_escaped_single_quoted/02_variable.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("02_variable") } #[test] fn test() { assert_eq!( runner().ok("$input: \'l\\\\ite\\ral\';\ \n.result {\ \n output: $input;\ \n output: #{$input};\ \n output: \"[#{$input}]\";\ \n output: \"#{$input}\";\ \n output: \'#{$input}\';\ \n output: \"[\'#{$input}\']\";\ \n}\n"), ".result {\ \n output: \"l\\\\iteral\";\ \n output: l\\iteral;\ \n output: \"[l\\\\iteral]\";\ \n output: \"l\\\\iteral\";\ \n output: \"l\\\\iteral\";\ \n output: \"[\'l\\\\iteral\']\";\ \n}\n" ); } t03_inline_double.rs000066400000000000000000000014631474765622100356520ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t13_escaped_single_quoted//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/13_escaped_single_quoted/03_inline_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("03_inline_double") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: #{#{\'l\\\\ite\\ral\'}};\ \n output: #{\"[#{\'l\\\\ite\\ral\'}]\"};\ \n output: #{\"#{\'l\\\\ite\\ral\'}\"};\ \n output: #{\'#{\'l\\\\ite\\ral\'}\'};\ \n output: #{\"[\'#{\'l\\\\ite\\ral\'}\']\"};\ \n}\n"), ".result {\ \n output: l\\iteral;\ \n output: [l\\iteral];\ \n output: l\\iteral;\ \n output: l\\iteral;\ \n output: [\'l\\iteral\'];\ \n}\n" ); } t04_variable_double.rs000066400000000000000000000014531474765622100361610ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t13_escaped_single_quoted//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/13_escaped_single_quoted/04_variable_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("04_variable_double") } #[test] fn test() { assert_eq!( runner().ok("$input: \'l\\\\ite\\ral\';\ \n.result {\ \n output: #{#{$input}};\ \n output: #{\"[#{$input}]\"};\ \n output: #{\"#{$input}\"};\ \n output: #{\'#{$input}\'};\ \n output: #{\"[\'#{$input}\']\"};\ \n}\n"), ".result {\ \n output: l\\iteral;\ \n output: [l\\iteral];\ \n output: l\\iteral;\ \n output: l\\iteral;\ \n output: [\'l\\iteral\'];\ \n}\n" ); } t05_variable_quoted_double.rs000066400000000000000000000024761474765622100375510ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t13_escaped_single_quoted//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/13_escaped_single_quoted/05_variable_quoted_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("05_variable_quoted_double") } #[test] fn test() { assert_eq!( runner().ok("$input: \'l\\\\ite\\ral\';\ \n.result {\ \n dquoted: \"#{#{$input}}\";\ \n dquoted: \"#{\"[#{$input}]\"}\";\ \n dquoted: \"#{\"#{$input}\"}\";\ \n dquoted: \"#{\'#{$input}\'}\";\ \n dquoted: \"#{\"[\'#{$input}\']\"}\";\ \n squoted: \'#{#{$input}}\';\ \n squoted: \'#{\"[#{$input}]\"}\';\ \n squoted: \'#{\"#{$input}\"}\';\ \n squoted: \'#{\'#{$input}\'}\';\ \n squoted: \'#{\"[\'#{$input}\']\"}\';\ \n}\n"), ".result {\ \n dquoted: \"l\\\\iteral\";\ \n dquoted: \"[l\\\\iteral]\";\ \n dquoted: \"l\\\\iteral\";\ \n dquoted: \"l\\\\iteral\";\ \n dquoted: \"[\'l\\\\iteral\']\";\ \n squoted: \"l\\\\iteral\";\ \n squoted: \"[l\\\\iteral]\";\ \n squoted: \"l\\\\iteral\";\ \n squoted: \"l\\\\iteral\";\ \n squoted: \"[\'l\\\\iteral\']\";\ \n}\n" ); } t06_escape_interpolation.rs000066400000000000000000000015121474765622100372470ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t13_escaped_single_quoted//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/13_escaped_single_quoted/06_escape_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("06_escape_interpolation") } #[test] fn test() { assert_eq!( runner().ok("$input: \'l\\\\ite\\ral\';\ \n.result {\ \n output: \"[\\#{\'l\\\\ite\\ral\'}]\";\ \n output: \"\\#{\'l\\\\ite\\ral\'}\";\ \n output: \'\\#{\'l\\\\ite\\ral\'}\';\ \n output: \"[\'\\#{\'l\\\\ite\\ral\'}\']\";\ \n}\n"), ".result {\ \n output: \"[#{\'l\\\\iteral\'}]\";\ \n output: \"#{\'l\\\\iteral\'}\";\ \n output: \"#{\" l\\\\iteral \"}\";\ \n output: \"[\'#{\'l\\\\iteral\'}\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t14_escapes_literal_numbers/000077500000000000000000000000001474765622100324265ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t14_escapes_literal_numbers/mod.rs000066400000000000000000000005641474765622100335600ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/14_escapes_literal_numbers" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("14_escapes_literal_numbers") } mod t01_inline; mod t02_variable; mod t03_inline_double; mod t04_variable_double; mod t05_variable_quoted_double; mod t06_escape_interpolation; t01_inline.rs000066400000000000000000000022621474765622100346610ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t14_escapes_literal_numbers//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/14_escapes_literal_numbers/01_inline.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("01_inline") } #[test] fn test() { assert_eq!( runner().ok( ".result {\ \n output: \\1\\2\\3\\4\\5\\6\\7\\8\\9;\ \n output: #{\\1\\2\\3\\4\\5\\6\\7\\8\\9};\ \n output: \"[#{\\1\\2\\3\\4\\5\\6\\7\\8\\9}]\";\ \n output: \"#{\\1\\2\\3\\4\\5\\6\\7\\8\\9}\";\ \n output: \'#{\\1\\2\\3\\4\\5\\6\\7\\8\\9}\';\ \n output: \"[\'#{\\1\\2\\3\\4\\5\\6\\7\\8\\9}\']\";\ \n}\n" ), ".result {\ \n output: \\1 \\2 \\3 \\4 \\5 \\6 \\7 \\8 \\9 ;\ \n output: \\1 \\2 \\3 \\4 \\5 \\6 \\7 \\8 \\9 ;\ \n output: \"[\\\\1 \\\\2 \\\\3 \\\\4 \\\\5 \\\\6 \\\\7 \\\\8 \\\\9 ]\";\ \n output: \"\\\\1 \\\\2 \\\\3 \\\\4 \\\\5 \\\\6 \\\\7 \\\\8 \\\\9 \";\ \n output: \"\\\\1 \\\\2 \\\\3 \\\\4 \\\\5 \\\\6 \\\\7 \\\\8 \\\\9 \";\ \n output: \"[\'\\\\1 \\\\2 \\\\3 \\\\4 \\\\5 \\\\6 \\\\7 \\\\8 \\\\9 \']\";\ \n}\n" ); } t02_variable.rs000066400000000000000000000021551474765622100351720ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t14_escapes_literal_numbers//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/14_escapes_literal_numbers/02_variable.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("02_variable") } #[test] fn test() { assert_eq!( runner().ok( "$input: \\1\\2\\3\\4\\5\\6\\7\\8\\9;\ \n.result {\ \n output: $input;\ \n output: #{$input};\ \n output: \"[#{$input}]\";\ \n output: \"#{$input}\";\ \n output: \'#{$input}\';\ \n output: \"[\'#{$input}\']\";\ \n}\n" ), ".result {\ \n output: \\1 \\2 \\3 \\4 \\5 \\6 \\7 \\8 \\9 ;\ \n output: \\1 \\2 \\3 \\4 \\5 \\6 \\7 \\8 \\9 ;\ \n output: \"[\\\\1 \\\\2 \\\\3 \\\\4 \\\\5 \\\\6 \\\\7 \\\\8 \\\\9 ]\";\ \n output: \"\\\\1 \\\\2 \\\\3 \\\\4 \\\\5 \\\\6 \\\\7 \\\\8 \\\\9 \";\ \n output: \"\\\\1 \\\\2 \\\\3 \\\\4 \\\\5 \\\\6 \\\\7 \\\\8 \\\\9 \";\ \n output: \"[\'\\\\1 \\\\2 \\\\3 \\\\4 \\\\5 \\\\6 \\\\7 \\\\8 \\\\9 \']\";\ \n}\n" ); } t03_inline_double.rs000066400000000000000000000017561474765622100362240ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t14_escapes_literal_numbers//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/14_escapes_literal_numbers/03_inline_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("03_inline_double") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: #{#{\\1\\2\\3\\4\\5\\6\\7\\8\\9}};\ \n output: #{\"[#{\\1\\2\\3\\4\\5\\6\\7\\8\\9}]\"};\ \n output: #{\"#{\\1\\2\\3\\4\\5\\6\\7\\8\\9}\"};\ \n output: #{\'#{\\1\\2\\3\\4\\5\\6\\7\\8\\9}\'};\ \n output: #{\"[\'#{\\1\\2\\3\\4\\5\\6\\7\\8\\9}\']\"};\ \n}\n"), ".result {\ \n output: \\1 \\2 \\3 \\4 \\5 \\6 \\7 \\8 \\9 ;\ \n output: [\\1 \\2 \\3 \\4 \\5 \\6 \\7 \\8 \\9 ];\ \n output: \\1 \\2 \\3 \\4 \\5 \\6 \\7 \\8 \\9 ;\ \n output: \\1 \\2 \\3 \\4 \\5 \\6 \\7 \\8 \\9 ;\ \n output: [\'\\1 \\2 \\3 \\4 \\5 \\6 \\7 \\8 \\9 \'];\ \n}\n" ); } t04_variable_double.rs000066400000000000000000000016761474765622100365350ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t14_escapes_literal_numbers//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/14_escapes_literal_numbers/04_variable_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("04_variable_double") } #[test] fn test() { assert_eq!( runner().ok("$input: \\1\\2\\3\\4\\5\\6\\7\\8\\9;\ \n.result {\ \n output: #{#{$input}};\ \n output: #{\"[#{$input}]\"};\ \n output: #{\"#{$input}\"};\ \n output: #{\'#{$input}\'};\ \n output: #{\"[\'#{$input}\']\"};\ \n}\n"), ".result {\ \n output: \\1 \\2 \\3 \\4 \\5 \\6 \\7 \\8 \\9 ;\ \n output: [\\1 \\2 \\3 \\4 \\5 \\6 \\7 \\8 \\9 ];\ \n output: \\1 \\2 \\3 \\4 \\5 \\6 \\7 \\8 \\9 ;\ \n output: \\1 \\2 \\3 \\4 \\5 \\6 \\7 \\8 \\9 ;\ \n output: [\'\\1 \\2 \\3 \\4 \\5 \\6 \\7 \\8 \\9 \'];\ \n}\n" ); } t05_variable_quoted_double.rs000066400000000000000000000034161474765622100401110ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t14_escapes_literal_numbers//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/14_escapes_literal_numbers/05_variable_quoted_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("05_variable_quoted_double") } #[test] fn test() { assert_eq!( runner().ok( "$input: \\1\\2\\3\\4\\5\\6\\7\\8\\9;\ \n.result {\ \n dquoted: \"#{#{$input}}\";\ \n dquoted: \"#{\"[#{$input}]\"}\";\ \n dquoted: \"#{\"#{$input}\"}\";\ \n dquoted: \"#{\'#{$input}\'}\";\ \n dquoted: \"#{\"[\'#{$input}\']\"}\";\ \n squoted: \'#{#{$input}}\';\ \n squoted: \'#{\"[#{$input}]\"}\';\ \n squoted: \'#{\"#{$input}\"}\';\ \n squoted: \'#{\'#{$input}\'}\';\ \n squoted: \'#{\"[\'#{$input}\']\"}\';\ \n}\n" ), ".result {\ \n dquoted: \"\\\\1 \\\\2 \\\\3 \\\\4 \\\\5 \\\\6 \\\\7 \\\\8 \\\\9 \";\ \n dquoted: \"[\\\\1 \\\\2 \\\\3 \\\\4 \\\\5 \\\\6 \\\\7 \\\\8 \\\\9 ]\";\ \n dquoted: \"\\\\1 \\\\2 \\\\3 \\\\4 \\\\5 \\\\6 \\\\7 \\\\8 \\\\9 \";\ \n dquoted: \"\\\\1 \\\\2 \\\\3 \\\\4 \\\\5 \\\\6 \\\\7 \\\\8 \\\\9 \";\ \n dquoted: \"[\'\\\\1 \\\\2 \\\\3 \\\\4 \\\\5 \\\\6 \\\\7 \\\\8 \\\\9 \']\";\ \n squoted: \"\\\\1 \\\\2 \\\\3 \\\\4 \\\\5 \\\\6 \\\\7 \\\\8 \\\\9 \";\ \n squoted: \"[\\\\1 \\\\2 \\\\3 \\\\4 \\\\5 \\\\6 \\\\7 \\\\8 \\\\9 ]\";\ \n squoted: \"\\\\1 \\\\2 \\\\3 \\\\4 \\\\5 \\\\6 \\\\7 \\\\8 \\\\9 \";\ \n squoted: \"\\\\1 \\\\2 \\\\3 \\\\4 \\\\5 \\\\6 \\\\7 \\\\8 \\\\9 \";\ \n squoted: \"[\'\\\\1 \\\\2 \\\\3 \\\\4 \\\\5 \\\\6 \\\\7 \\\\8 \\\\9 \']\";\ \n}\n" ); } t06_escape_interpolation.rs000066400000000000000000000016541474765622100376230ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t14_escapes_literal_numbers//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/14_escapes_literal_numbers/06_escape_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("06_escape_interpolation") } #[test] fn test() { assert_eq!( runner().ok("$input: \\1\\2\\3\\4\\5\\6\\7\\8\\9;\ \n.result {\ \n output: \"[\\#{\\1\\2\\3\\4\\5\\6\\7\\8\\9}]\";\ \n output: \"\\#{\\1\\2\\3\\4\\5\\6\\7\\8\\9}\";\ \n output: \'\\#{\\1\\2\\3\\4\\5\\6\\7\\8\\9}\';\ \n output: \"[\'\\#{\\1\\2\\3\\4\\5\\6\\7\\8\\9}\']\";\ \n}\n"), ".result {\ \n output: \"[#{\\1\\2\\3\\4\\5\\6\\7\\8 \t}]\";\ \n output: \"#{\\1\\2\\3\\4\\5\\6\\7\\8 \t}\";\ \n output: \"#{\\1\\2\\3\\4\\5\\6\\7\\8 \t}\";\ \n output: \"[\'#{\\1\\2\\3\\4\\5\\6\\7\\8 \t}\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t15_escapes_double_quoted_numbers/000077500000000000000000000000001474765622100336265ustar00rootroot00000000000000mod.rs000066400000000000000000000006001474765622100346700ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t15_escapes_double_quoted_numbers//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/15_escapes_double_quoted_numbers" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("15_escapes_double_quoted_numbers") } mod t01_inline; mod t02_variable; mod t03_inline_double; mod t04_variable_double; mod t05_variable_quoted_double; mod t06_escape_interpolation; t01_inline.rs000066400000000000000000000021171474765622100360600ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t15_escapes_double_quoted_numbers//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/15_escapes_double_quoted_numbers/01_inline.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("01_inline") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: \"\\1\\2\\3\\4\\5\\6\\7\\8\\9\";\ \n output: #{\"\\1\\2\\3\\4\\5\\6\\7\\8\\9\"};\ \n output: \"[#{\"\\1\\2\\3\\4\\5\\6\\7\\8\\9\"}]\";\ \n output: \"#{\"\\1\\2\\3\\4\\5\\6\\7\\8\\9\"}\";\ \n output: \'#{\"\\1\\2\\3\\4\\5\\6\\7\\8\\9\"}\';\ \n output: \"[\'#{\"\\1\\2\\3\\4\\5\\6\\7\\8\\9\"}\']\";\ \n}\n"), ".result {\ \n output: \"\\1\\2\\3\\4\\5\\6\\7\\8 \t\";\ \n output: \u{1}\u{2}\u{3}\u{4}\u{5}\u{6}\u{7}\u{8}\t;\ \n output: \"[\\1\\2\\3\\4\\5\\6\\7\\8 \t]\";\ \n output: \"\\1\\2\\3\\4\\5\\6\\7\\8 \t\";\ \n output: \"\\1\\2\\3\\4\\5\\6\\7\\8 \t\";\ \n output: \"[\'\\1\\2\\3\\4\\5\\6\\7\\8 \t\']\";\ \n}\n" ); } t02_variable.rs000066400000000000000000000017661474765622100364010ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t15_escapes_double_quoted_numbers//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/15_escapes_double_quoted_numbers/02_variable.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("02_variable") } #[test] fn test() { assert_eq!( runner().ok("$input: \"\\1\\2\\3\\4\\5\\6\\7\\8\\9\";\ \n.result {\ \n output: $input;\ \n output: #{$input};\ \n output: \"[#{$input}]\";\ \n output: \"#{$input}\";\ \n output: \'#{$input}\';\ \n output: \"[\'#{$input}\']\";\ \n}\n"), ".result {\ \n output: \"\\1\\2\\3\\4\\5\\6\\7\\8 \t\";\ \n output: \u{1}\u{2}\u{3}\u{4}\u{5}\u{6}\u{7}\u{8}\t;\ \n output: \"[\\1\\2\\3\\4\\5\\6\\7\\8 \t]\";\ \n output: \"\\1\\2\\3\\4\\5\\6\\7\\8 \t\";\ \n output: \"\\1\\2\\3\\4\\5\\6\\7\\8 \t\";\ \n output: \"[\'\\1\\2\\3\\4\\5\\6\\7\\8 \t\']\";\ \n}\n" ); } t03_inline_double.rs000066400000000000000000000020461474765622100374150ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t15_escapes_double_quoted_numbers//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/15_escapes_double_quoted_numbers/03_inline_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("03_inline_double") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: #{#{\"\\1\\2\\3\\4\\5\\6\\7\\8\\9\"}};\ \n output: #{\"[#{\"\\1\\2\\3\\4\\5\\6\\7\\8\\9\"}]\"};\ \n output: #{\"#{\"\\1\\2\\3\\4\\5\\6\\7\\8\\9\"}\"};\ \n output: #{\'#{\"\\1\\2\\3\\4\\5\\6\\7\\8\\9\"}\'};\ \n output: #{\"[\'#{\"\\1\\2\\3\\4\\5\\6\\7\\8\\9\"}\']\"};\ \n}\n"), ".result {\ \n output: \u{1}\u{2}\u{3}\u{4}\u{5}\u{6}\u{7}\u{8}\t;\ \n output: [\u{1}\u{2}\u{3}\u{4}\u{5}\u{6}\u{7}\u{8}\t];\ \n output: \u{1}\u{2}\u{3}\u{4}\u{5}\u{6}\u{7}\u{8}\t;\ \n output: \u{1}\u{2}\u{3}\u{4}\u{5}\u{6}\u{7}\u{8}\t;\ \n output: [\'\u{1}\u{2}\u{3}\u{4}\u{5}\u{6}\u{7}\u{8}\t\'];\ \n}\n" ); } t04_variable_double.rs000066400000000000000000000017461474765622100377330ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t15_escapes_double_quoted_numbers//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/15_escapes_double_quoted_numbers/04_variable_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("04_variable_double") } #[test] fn test() { assert_eq!( runner().ok("$input: \"\\1\\2\\3\\4\\5\\6\\7\\8\\9\";\ \n.result {\ \n output: #{#{$input}};\ \n output: #{\"[#{$input}]\"};\ \n output: #{\"#{$input}\"};\ \n output: #{\'#{$input}\'};\ \n output: #{\"[\'#{$input}\']\"};\ \n}\n"), ".result {\ \n output: \u{1}\u{2}\u{3}\u{4}\u{5}\u{6}\u{7}\u{8}\t;\ \n output: [\u{1}\u{2}\u{3}\u{4}\u{5}\u{6}\u{7}\u{8}\t];\ \n output: \u{1}\u{2}\u{3}\u{4}\u{5}\u{6}\u{7}\u{8}\t;\ \n output: \u{1}\u{2}\u{3}\u{4}\u{5}\u{6}\u{7}\u{8}\t;\ \n output: [\'\u{1}\u{2}\u{3}\u{4}\u{5}\u{6}\u{7}\u{8}\t\'];\ \n}\n" ); } t05_variable_quoted_double.rs000066400000000000000000000027641474765622100413160ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t15_escapes_double_quoted_numbers//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/15_escapes_double_quoted_numbers/05_variable_quoted_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("05_variable_quoted_double") } #[test] fn test() { assert_eq!( runner().ok("$input: \"\\1\\2\\3\\4\\5\\6\\7\\8\\9\";\ \n.result {\ \n dquoted: \"#{#{$input}}\";\ \n dquoted: \"#{\"[#{$input}]\"}\";\ \n dquoted: \"#{\"#{$input}\"}\";\ \n dquoted: \"#{\'#{$input}\'}\";\ \n dquoted: \"#{\"[\'#{$input}\']\"}\";\ \n squoted: \'#{#{$input}}\';\ \n squoted: \'#{\"[#{$input}]\"}\';\ \n squoted: \'#{\"#{$input}\"}\';\ \n squoted: \'#{\'#{$input}\'}\';\ \n squoted: \'#{\"[\'#{$input}\']\"}\';\ \n}\n"), ".result {\ \n dquoted: \"\\1\\2\\3\\4\\5\\6\\7\\8 \t\";\ \n dquoted: \"[\\1\\2\\3\\4\\5\\6\\7\\8 \t]\";\ \n dquoted: \"\\1\\2\\3\\4\\5\\6\\7\\8 \t\";\ \n dquoted: \"\\1\\2\\3\\4\\5\\6\\7\\8 \t\";\ \n dquoted: \"[\'\\1\\2\\3\\4\\5\\6\\7\\8 \t\']\";\ \n squoted: \"\\1\\2\\3\\4\\5\\6\\7\\8 \t\";\ \n squoted: \"[\\1\\2\\3\\4\\5\\6\\7\\8 \t]\";\ \n squoted: \"\\1\\2\\3\\4\\5\\6\\7\\8 \t\";\ \n squoted: \"\\1\\2\\3\\4\\5\\6\\7\\8 \t\";\ \n squoted: \"[\'\\1\\2\\3\\4\\5\\6\\7\\8 \t\']\";\ \n}\n" ); } t06_escape_interpolation.rs000066400000000000000000000017671474765622100410300ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t15_escapes_double_quoted_numbers//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/15_escapes_double_quoted_numbers/06_escape_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("06_escape_interpolation") } #[test] fn test() { assert_eq!( runner().ok("$input: \"\\1\\2\\3\\4\\5\\6\\7\\8\\9\";\ \n.result {\ \n output: \"[\\#{\"\\1\\2\\3\\4\\5\\6\\7\\8\\9\"}]\";\ \n output: \"\\#{\"\\1\\2\\3\\4\\5\\6\\7\\8\\9\"}\";\ \n output: \'\\#{\"\\1\\2\\3\\4\\5\\6\\7\\8\\9\"}\';\ \n output: \"[\'\\#{\"\\1\\2\\3\\4\\5\\6\\7\\8\\9\"}\']\";\ \n}\n"), ".result {\ \n output: \"[#{\" \\1 \\2 \\3 \\4 \\5 \\6 \\7 \\8 \\9 \"}]\";\ \n output: \"#{\" \\1 \\2 \\3 \\4 \\5 \\6 \\7 \\8 \\9 \"}\";\ \n output: \'#{\"\\1\\2\\3\\4\\5\\6\\7\\8 \t\"}\';\ \n output: \"[\'#{\" \\1 \\2 \\3 \\4 \\5 \\6 \\7 \\8 \\9 \"}\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t16_escapes_single_quoted_numbers/000077500000000000000000000000001474765622100336365ustar00rootroot00000000000000mod.rs000066400000000000000000000006001474765622100347000ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t16_escapes_single_quoted_numbers//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/16_escapes_single_quoted_numbers" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("16_escapes_single_quoted_numbers") } mod t01_inline; mod t02_variable; mod t03_inline_double; mod t04_variable_double; mod t05_variable_quoted_double; mod t06_escape_interpolation; t01_inline.rs000066400000000000000000000021171474765622100360700ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t16_escapes_single_quoted_numbers//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/16_escapes_single_quoted_numbers/01_inline.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("01_inline") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: \'\\1\\2\\3\\4\\5\\6\\7\\8\\9\';\ \n output: #{\'\\1\\2\\3\\4\\5\\6\\7\\8\\9\'};\ \n output: \"[#{\'\\1\\2\\3\\4\\5\\6\\7\\8\\9\'}]\";\ \n output: \"#{\'\\1\\2\\3\\4\\5\\6\\7\\8\\9\'}\";\ \n output: \'#{\'\\1\\2\\3\\4\\5\\6\\7\\8\\9\'}\';\ \n output: \"[\'#{\'\\1\\2\\3\\4\\5\\6\\7\\8\\9\'}\']\";\ \n}\n"), ".result {\ \n output: \"\\1\\2\\3\\4\\5\\6\\7\\8 \t\";\ \n output: \u{1}\u{2}\u{3}\u{4}\u{5}\u{6}\u{7}\u{8}\t;\ \n output: \"[\\1\\2\\3\\4\\5\\6\\7\\8 \t]\";\ \n output: \"\\1\\2\\3\\4\\5\\6\\7\\8 \t\";\ \n output: \"\\1\\2\\3\\4\\5\\6\\7\\8 \t\";\ \n output: \"[\'\\1\\2\\3\\4\\5\\6\\7\\8 \t\']\";\ \n}\n" ); } t02_variable.rs000066400000000000000000000017661474765622100364110ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t16_escapes_single_quoted_numbers//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/16_escapes_single_quoted_numbers/02_variable.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("02_variable") } #[test] fn test() { assert_eq!( runner().ok("$input: \'\\1\\2\\3\\4\\5\\6\\7\\8\\9\';\ \n.result {\ \n output: $input;\ \n output: #{$input};\ \n output: \"[#{$input}]\";\ \n output: \"#{$input}\";\ \n output: \'#{$input}\';\ \n output: \"[\'#{$input}\']\";\ \n}\n"), ".result {\ \n output: \"\\1\\2\\3\\4\\5\\6\\7\\8 \t\";\ \n output: \u{1}\u{2}\u{3}\u{4}\u{5}\u{6}\u{7}\u{8}\t;\ \n output: \"[\\1\\2\\3\\4\\5\\6\\7\\8 \t]\";\ \n output: \"\\1\\2\\3\\4\\5\\6\\7\\8 \t\";\ \n output: \"\\1\\2\\3\\4\\5\\6\\7\\8 \t\";\ \n output: \"[\'\\1\\2\\3\\4\\5\\6\\7\\8 \t\']\";\ \n}\n" ); } t03_inline_double.rs000066400000000000000000000020461474765622100374250ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t16_escapes_single_quoted_numbers//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/16_escapes_single_quoted_numbers/03_inline_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("03_inline_double") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: #{#{\'\\1\\2\\3\\4\\5\\6\\7\\8\\9\'}};\ \n output: #{\"[#{\'\\1\\2\\3\\4\\5\\6\\7\\8\\9\'}]\"};\ \n output: #{\"#{\'\\1\\2\\3\\4\\5\\6\\7\\8\\9\'}\"};\ \n output: #{\'#{\'\\1\\2\\3\\4\\5\\6\\7\\8\\9\'}\'};\ \n output: #{\"[\'#{\'\\1\\2\\3\\4\\5\\6\\7\\8\\9\'}\']\"};\ \n}\n"), ".result {\ \n output: \u{1}\u{2}\u{3}\u{4}\u{5}\u{6}\u{7}\u{8}\t;\ \n output: [\u{1}\u{2}\u{3}\u{4}\u{5}\u{6}\u{7}\u{8}\t];\ \n output: \u{1}\u{2}\u{3}\u{4}\u{5}\u{6}\u{7}\u{8}\t;\ \n output: \u{1}\u{2}\u{3}\u{4}\u{5}\u{6}\u{7}\u{8}\t;\ \n output: [\'\u{1}\u{2}\u{3}\u{4}\u{5}\u{6}\u{7}\u{8}\t\'];\ \n}\n" ); } t04_variable_double.rs000066400000000000000000000017461474765622100377430ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t16_escapes_single_quoted_numbers//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/16_escapes_single_quoted_numbers/04_variable_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("04_variable_double") } #[test] fn test() { assert_eq!( runner().ok("$input: \'\\1\\2\\3\\4\\5\\6\\7\\8\\9\';\ \n.result {\ \n output: #{#{$input}};\ \n output: #{\"[#{$input}]\"};\ \n output: #{\"#{$input}\"};\ \n output: #{\'#{$input}\'};\ \n output: #{\"[\'#{$input}\']\"};\ \n}\n"), ".result {\ \n output: \u{1}\u{2}\u{3}\u{4}\u{5}\u{6}\u{7}\u{8}\t;\ \n output: [\u{1}\u{2}\u{3}\u{4}\u{5}\u{6}\u{7}\u{8}\t];\ \n output: \u{1}\u{2}\u{3}\u{4}\u{5}\u{6}\u{7}\u{8}\t;\ \n output: \u{1}\u{2}\u{3}\u{4}\u{5}\u{6}\u{7}\u{8}\t;\ \n output: [\'\u{1}\u{2}\u{3}\u{4}\u{5}\u{6}\u{7}\u{8}\t\'];\ \n}\n" ); } t05_variable_quoted_double.rs000066400000000000000000000027641474765622100413260ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t16_escapes_single_quoted_numbers//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/16_escapes_single_quoted_numbers/05_variable_quoted_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("05_variable_quoted_double") } #[test] fn test() { assert_eq!( runner().ok("$input: \'\\1\\2\\3\\4\\5\\6\\7\\8\\9\';\ \n.result {\ \n dquoted: \"#{#{$input}}\";\ \n dquoted: \"#{\"[#{$input}]\"}\";\ \n dquoted: \"#{\"#{$input}\"}\";\ \n dquoted: \"#{\'#{$input}\'}\";\ \n dquoted: \"#{\"[\'#{$input}\']\"}\";\ \n squoted: \'#{#{$input}}\';\ \n squoted: \'#{\"[#{$input}]\"}\';\ \n squoted: \'#{\"#{$input}\"}\';\ \n squoted: \'#{\'#{$input}\'}\';\ \n squoted: \'#{\"[\'#{$input}\']\"}\';\ \n}\n"), ".result {\ \n dquoted: \"\\1\\2\\3\\4\\5\\6\\7\\8 \t\";\ \n dquoted: \"[\\1\\2\\3\\4\\5\\6\\7\\8 \t]\";\ \n dquoted: \"\\1\\2\\3\\4\\5\\6\\7\\8 \t\";\ \n dquoted: \"\\1\\2\\3\\4\\5\\6\\7\\8 \t\";\ \n dquoted: \"[\'\\1\\2\\3\\4\\5\\6\\7\\8 \t\']\";\ \n squoted: \"\\1\\2\\3\\4\\5\\6\\7\\8 \t\";\ \n squoted: \"[\\1\\2\\3\\4\\5\\6\\7\\8 \t]\";\ \n squoted: \"\\1\\2\\3\\4\\5\\6\\7\\8 \t\";\ \n squoted: \"\\1\\2\\3\\4\\5\\6\\7\\8 \t\";\ \n squoted: \"[\'\\1\\2\\3\\4\\5\\6\\7\\8 \t\']\";\ \n}\n" ); } t06_escape_interpolation.rs000066400000000000000000000017411474765622100410300ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t16_escapes_single_quoted_numbers//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/16_escapes_single_quoted_numbers/06_escape_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("06_escape_interpolation") } #[test] fn test() { assert_eq!( runner().ok("$input: \'\\1\\2\\3\\4\\5\\6\\7\\8\\9\';\ \n.result {\ \n output: \"[\\#{\'\\1\\2\\3\\4\\5\\6\\7\\8\\9\'}]\";\ \n output: \"\\#{\'\\1\\2\\3\\4\\5\\6\\7\\8\\9\'}\";\ \n output: \'\\#{\'\\1\\2\\3\\4\\5\\6\\7\\8\\9\'}\';\ \n output: \"[\'\\#{\'\\1\\2\\3\\4\\5\\6\\7\\8\\9\'}\']\";\ \n}\n"), ".result {\ \n output: \"[#{\'\\1\\2\\3\\4\\5\\6\\7\\8 \t\'}]\";\ \n output: \"#{\'\\1\\2\\3\\4\\5\\6\\7\\8 \t\'}\";\ \n output: \"#{\" \\1 \\2 \\3 \\4 \\5 \\6 \\7 \\8 \\9 \"}\";\ \n output: \"[\'#{\'\\1\\2\\3\\4\\5\\6\\7\\8 \t\'}\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t17_escapes_literal_lowercase/000077500000000000000000000000001474765622100327425ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t17_escapes_literal_lowercase/mod.rs000066400000000000000000000005701474765622100340710ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/17_escapes_literal_lowercase" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("17_escapes_literal_lowercase") } mod t01_inline; mod t02_variable; mod t03_inline_double; mod t04_variable_double; mod t05_variable_quoted_double; mod t06_escape_interpolation; t01_inline.rs000066400000000000000000000027141474765622100351770ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t17_escapes_literal_lowercase//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/17_escapes_literal_lowercase/01_inline.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("01_inline") } #[test] fn test() { assert_eq!( runner().ok( ".result {\ \n output: \\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z;\ \n output: #{\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z};\ \n output: \"[#{\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z}]\";\ \n output: \"#{\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z}\";\ \n output: \'#{\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z}\';\ \n output: \"[\'#{\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z}\']\";\ \n}\n" ), ".result {\ \n output: \\b \\c \\d \\e \\f ghijklmnopqrstuvwxyz;\ \n output: \\b \\c \\d \\e \\f ghijklmnopqrstuvwxyz;\ \n output: \"[\\\\b \\\\c \\\\d \\\\e \\\\f ghijklmnopqrstuvwxyz]\";\ \n output: \"\\\\b \\\\c \\\\d \\\\e \\\\f ghijklmnopqrstuvwxyz\";\ \n output: \"\\\\b \\\\c \\\\d \\\\e \\\\f ghijklmnopqrstuvwxyz\";\ \n output: \"[\'\\\\b \\\\c \\\\d \\\\e \\\\f ghijklmnopqrstuvwxyz\']\";\ \n}\n" ); } t02_variable.rs000066400000000000000000000022271474765622100355060ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t17_escapes_literal_lowercase//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/17_escapes_literal_lowercase/02_variable.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("02_variable") } #[test] fn test() { assert_eq!( runner().ok( "$input: \\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z;\ \n.result {\ \n output: $input;\ \n output: #{$input};\ \n output: \"[#{$input}]\";\ \n output: \"#{$input}\";\ \n output: \'#{$input}\';\ \n output: \"[\'#{$input}\']\";\ \n}\n" ), ".result {\ \n output: \\b \\c \\d \\e \\f ghijklmnopqrstuvwxyz;\ \n output: \\b \\c \\d \\e \\f ghijklmnopqrstuvwxyz;\ \n output: \"[\\\\b \\\\c \\\\d \\\\e \\\\f ghijklmnopqrstuvwxyz]\";\ \n output: \"\\\\b \\\\c \\\\d \\\\e \\\\f ghijklmnopqrstuvwxyz\";\ \n output: \"\\\\b \\\\c \\\\d \\\\e \\\\f ghijklmnopqrstuvwxyz\";\ \n output: \"[\'\\\\b \\\\c \\\\d \\\\e \\\\f ghijklmnopqrstuvwxyz\']\";\ \n}\n" ); } t03_inline_double.rs000066400000000000000000000024121474765622100365260ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t17_escapes_literal_lowercase//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/17_escapes_literal_lowercase/03_inline_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("03_inline_double") } #[test] fn test() { assert_eq!( runner().ok( ".result {\ \n output: #{#{\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z}};\ \n output: #{\"[#{\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z}]\"};\ \n output: #{\"#{\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z}\"};\ \n output: #{\'#{\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z}\'};\ \n output: #{\"[\'#{\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z}\']\"};\ \n}\n" ), ".result {\ \n output: \\b \\c \\d \\e \\f ghijklmnopqrstuvwxyz;\ \n output: [\\b \\c \\d \\e \\f ghijklmnopqrstuvwxyz];\ \n output: \\b \\c \\d \\e \\f ghijklmnopqrstuvwxyz;\ \n output: \\b \\c \\d \\e \\f ghijklmnopqrstuvwxyz;\ \n output: [\'\\b \\c \\d \\e \\f ghijklmnopqrstuvwxyz\'];\ \n}\n" ); } t04_variable_double.rs000066400000000000000000000020321474765622100370340ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t17_escapes_literal_lowercase//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/17_escapes_literal_lowercase/04_variable_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("04_variable_double") } #[test] fn test() { assert_eq!( runner().ok( "$input: \\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z;\ \n.result {\ \n output: #{#{$input}};\ \n output: #{\"[#{$input}]\"};\ \n output: #{\"#{$input}\"};\ \n output: #{\'#{$input}\'};\ \n output: #{\"[\'#{$input}\']\"};\ \n}\n" ), ".result {\ \n output: \\b \\c \\d \\e \\f ghijklmnopqrstuvwxyz;\ \n output: [\\b \\c \\d \\e \\f ghijklmnopqrstuvwxyz];\ \n output: \\b \\c \\d \\e \\f ghijklmnopqrstuvwxyz;\ \n output: \\b \\c \\d \\e \\f ghijklmnopqrstuvwxyz;\ \n output: [\'\\b \\c \\d \\e \\f ghijklmnopqrstuvwxyz\'];\ \n}\n" ); } t05_variable_quoted_double.rs000066400000000000000000000034301474765622100404210ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t17_escapes_literal_lowercase//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/17_escapes_literal_lowercase/05_variable_quoted_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("05_variable_quoted_double") } #[test] fn test() { assert_eq!( runner().ok( "$input: \\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z;\ \n.result {\ \n dquoted: \"#{#{$input}}\";\ \n dquoted: \"#{\"[#{$input}]\"}\";\ \n dquoted: \"#{\"#{$input}\"}\";\ \n dquoted: \"#{\'#{$input}\'}\";\ \n dquoted: \"#{\"[\'#{$input}\']\"}\";\ \n squoted: \'#{#{$input}}\';\ \n squoted: \'#{\"[#{$input}]\"}\';\ \n squoted: \'#{\"#{$input}\"}\';\ \n squoted: \'#{\'#{$input}\'}\';\ \n squoted: \'#{\"[\'#{$input}\']\"}\';\ \n}\n" ), ".result {\ \n dquoted: \"\\\\b \\\\c \\\\d \\\\e \\\\f ghijklmnopqrstuvwxyz\";\ \n dquoted: \"[\\\\b \\\\c \\\\d \\\\e \\\\f ghijklmnopqrstuvwxyz]\";\ \n dquoted: \"\\\\b \\\\c \\\\d \\\\e \\\\f ghijklmnopqrstuvwxyz\";\ \n dquoted: \"\\\\b \\\\c \\\\d \\\\e \\\\f ghijklmnopqrstuvwxyz\";\ \n dquoted: \"[\'\\\\b \\\\c \\\\d \\\\e \\\\f ghijklmnopqrstuvwxyz\']\";\ \n squoted: \"\\\\b \\\\c \\\\d \\\\e \\\\f ghijklmnopqrstuvwxyz\";\ \n squoted: \"[\\\\b \\\\c \\\\d \\\\e \\\\f ghijklmnopqrstuvwxyz]\";\ \n squoted: \"\\\\b \\\\c \\\\d \\\\e \\\\f ghijklmnopqrstuvwxyz\";\ \n squoted: \"\\\\b \\\\c \\\\d \\\\e \\\\f ghijklmnopqrstuvwxyz\";\ \n squoted: \"[\'\\\\b \\\\c \\\\d \\\\e \\\\f ghijklmnopqrstuvwxyz\']\";\ \n}\n" ); } t06_escape_interpolation.rs000066400000000000000000000023241474765622100401320ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t17_escapes_literal_lowercase//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/17_escapes_literal_lowercase/06_escape_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("06_escape_interpolation") } #[test] fn test() { assert_eq!( runner().ok( "$input: \\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z;\ \n.result {\ \n output: \"[\\#{\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z}]\";\ \n output: \"\\#{\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z}\";\ \n output: \'\\#{\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z}\';\ \n output: \"[\'\\#{\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z}\']\";\ \n}\n" ), ".result {\ \n output: \"[#{\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz}]\";\ \n output: \"#{\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz}\";\ \n output: \"#{\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz}\";\ \n output: \"[\'#{\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz}\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t18_escapes_double_quoted_lowercase/000077500000000000000000000000001474765622100341425ustar00rootroot00000000000000mod.rs000066400000000000000000000006041474765622100352100ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t18_escapes_double_quoted_lowercase//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/18_escapes_double_quoted_lowercase" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("18_escapes_double_quoted_lowercase") } mod t01_inline; mod t02_variable; mod t03_inline_double; mod t04_variable_double; mod t05_variable_quoted_double; mod t06_escape_interpolation; t01_inline.rs000066400000000000000000000026571474765622100364050ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t18_escapes_double_quoted_lowercase//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/18_escapes_double_quoted_lowercase/01_inline.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("01_inline") } #[test] fn test() { assert_eq!( runner().ok( ".result {\ \n output: \"\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z\";\ \n output: #{\"\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z\"};\ \n output: \"[#{\"\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z\"}]\";\ \n output: \"#{\"\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z\"}\";\ \n output: \'#{\"\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z\"}\';\ \n output: \"[\'#{\"\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z\"}\']\";\ \n}\n" ), ".result {\ \n output: \"\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz\";\ \n output: \u{b}\u{c}\r\u{e}\u{f}ghijklmnopqrstuvwxyz;\ \n output: \"[\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz]\";\ \n output: \"\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz\";\ \n output: \"\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz\";\ \n output: \"[\'\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz\']\";\ \n}\n" ); } t02_variable.rs000066400000000000000000000021461474765622100367060ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t18_escapes_double_quoted_lowercase//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/18_escapes_double_quoted_lowercase/02_variable.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("02_variable") } #[test] fn test() { assert_eq!( runner().ok( "$input: \"\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z\";\ \n.result {\ \n output: $input;\ \n output: #{$input};\ \n output: \"[#{$input}]\";\ \n output: \"#{$input}\";\ \n output: \'#{$input}\';\ \n output: \"[\'#{$input}\']\";\ \n}\n" ), ".result {\ \n output: \"\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz\";\ \n output: \u{b}\u{c}\r\u{e}\u{f}ghijklmnopqrstuvwxyz;\ \n output: \"[\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz]\";\ \n output: \"\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz\";\ \n output: \"\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz\";\ \n output: \"[\'\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz\']\";\ \n}\n" ); } t03_inline_double.rs000066400000000000000000000024561474765622100377360ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t18_escapes_double_quoted_lowercase//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/18_escapes_double_quoted_lowercase/03_inline_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("03_inline_double") } #[test] fn test() { assert_eq!( runner().ok( ".result {\ \n output: #{#{\"\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z\"}};\ \n output: #{\"[#{\"\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z\"}]\"};\ \n output: #{\"#{\"\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z\"}\"};\ \n output: #{\'#{\"\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z\"}\'};\ \n output: #{\"[\'#{\"\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z\"}\']\"};\ \n}\n" ), ".result {\ \n output: \u{b}\u{c}\r\u{e}\u{f}ghijklmnopqrstuvwxyz;\ \n output: [\u{b}\u{c}\r\u{e}\u{f}ghijklmnopqrstuvwxyz];\ \n output: \u{b}\u{c}\r\u{e}\u{f}ghijklmnopqrstuvwxyz;\ \n output: \u{b}\u{c}\r\u{e}\u{f}ghijklmnopqrstuvwxyz;\ \n output: [\'\u{b}\u{c}\r\u{e}\u{f}ghijklmnopqrstuvwxyz\'];\ \n}\n" ); } t04_variable_double.rs000066400000000000000000000020561474765622100402420ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t18_escapes_double_quoted_lowercase//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/18_escapes_double_quoted_lowercase/04_variable_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("04_variable_double") } #[test] fn test() { assert_eq!( runner().ok( "$input: \"\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z\";\ \n.result {\ \n output: #{#{$input}};\ \n output: #{\"[#{$input}]\"};\ \n output: #{\"#{$input}\"};\ \n output: #{\'#{$input}\'};\ \n output: #{\"[\'#{$input}\']\"};\ \n}\n" ), ".result {\ \n output: \u{b}\u{c}\r\u{e}\u{f}ghijklmnopqrstuvwxyz;\ \n output: [\u{b}\u{c}\r\u{e}\u{f}ghijklmnopqrstuvwxyz];\ \n output: \u{b}\u{c}\r\u{e}\u{f}ghijklmnopqrstuvwxyz;\ \n output: \u{b}\u{c}\r\u{e}\u{f}ghijklmnopqrstuvwxyz;\ \n output: [\'\u{b}\u{c}\r\u{e}\u{f}ghijklmnopqrstuvwxyz\'];\ \n}\n" ); } t05_variable_quoted_double.rs000066400000000000000000000032141474765622100416210ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t18_escapes_double_quoted_lowercase//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/18_escapes_double_quoted_lowercase/05_variable_quoted_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("05_variable_quoted_double") } #[test] fn test() { assert_eq!( runner().ok( "$input: \"\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z\";\ \n.result {\ \n dquoted: \"#{#{$input}}\";\ \n dquoted: \"#{\"[#{$input}]\"}\";\ \n dquoted: \"#{\"#{$input}\"}\";\ \n dquoted: \"#{\'#{$input}\'}\";\ \n dquoted: \"#{\"[\'#{$input}\']\"}\";\ \n squoted: \'#{#{$input}}\';\ \n squoted: \'#{\"[#{$input}]\"}\';\ \n squoted: \'#{\"#{$input}\"}\';\ \n squoted: \'#{\'#{$input}\'}\';\ \n squoted: \'#{\"[\'#{$input}\']\"}\';\ \n}\n" ), ".result {\ \n dquoted: \"\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz\";\ \n dquoted: \"[\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz]\";\ \n dquoted: \"\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz\";\ \n dquoted: \"\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz\";\ \n dquoted: \"[\'\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz\']\";\ \n squoted: \"\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz\";\ \n squoted: \"[\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz]\";\ \n squoted: \"\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz\";\ \n squoted: \"\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz\";\ \n squoted: \"[\'\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz\']\";\ \n}\n" ); } t06_escape_interpolation.rs000066400000000000000000000024231474765622100413320ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t18_escapes_double_quoted_lowercase//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/18_escapes_double_quoted_lowercase/06_escape_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("06_escape_interpolation") } #[test] fn test() { assert_eq!( runner().ok( "$input: \"\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z\";\ \n.result {\ \n output: \"[\\#{\"\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z\"}]\";\ \n output: \"\\#{\"\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z\"}\";\ \n output: \'\\#{\"\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z\"}\';\ \n output: \"[\'\\#{\"\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z\"}\']\";\ \n}\n" ), ".result {\ \n output: \"[#{\" \\b \\c \\d \\e \\f ghijklmnopqrstuvwxyz \"}]\";\ \n output: \"#{\" \\b \\c \\d \\e \\f ghijklmnopqrstuvwxyz \"}\";\ \n output: \'#{\"\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz\"}\';\ \n output: \"[\'#{\" \\b \\c \\d \\e \\f ghijklmnopqrstuvwxyz \"}\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t19_escapes_single_quoted_lowercase/000077500000000000000000000000001474765622100341525ustar00rootroot00000000000000mod.rs000066400000000000000000000006041474765622100352200ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t19_escapes_single_quoted_lowercase//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/19_escapes_single_quoted_lowercase" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("19_escapes_single_quoted_lowercase") } mod t01_inline; mod t02_variable; mod t03_inline_double; mod t04_variable_double; mod t05_variable_quoted_double; mod t06_escape_interpolation; t01_inline.rs000066400000000000000000000026571474765622100364150ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t19_escapes_single_quoted_lowercase//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/19_escapes_single_quoted_lowercase/01_inline.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("01_inline") } #[test] fn test() { assert_eq!( runner().ok( ".result {\ \n output: \'\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z\';\ \n output: #{\'\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z\'};\ \n output: \"[#{\'\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z\'}]\";\ \n output: \"#{\'\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z\'}\";\ \n output: \'#{\'\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z\'}\';\ \n output: \"[\'#{\'\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z\'}\']\";\ \n}\n" ), ".result {\ \n output: \"\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz\";\ \n output: \u{b}\u{c}\r\u{e}\u{f}ghijklmnopqrstuvwxyz;\ \n output: \"[\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz]\";\ \n output: \"\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz\";\ \n output: \"\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz\";\ \n output: \"[\'\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz\']\";\ \n}\n" ); } t02_variable.rs000066400000000000000000000021461474765622100367160ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t19_escapes_single_quoted_lowercase//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/19_escapes_single_quoted_lowercase/02_variable.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("02_variable") } #[test] fn test() { assert_eq!( runner().ok( "$input: \'\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z\';\ \n.result {\ \n output: $input;\ \n output: #{$input};\ \n output: \"[#{$input}]\";\ \n output: \"#{$input}\";\ \n output: \'#{$input}\';\ \n output: \"[\'#{$input}\']\";\ \n}\n" ), ".result {\ \n output: \"\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz\";\ \n output: \u{b}\u{c}\r\u{e}\u{f}ghijklmnopqrstuvwxyz;\ \n output: \"[\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz]\";\ \n output: \"\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz\";\ \n output: \"\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz\";\ \n output: \"[\'\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz\']\";\ \n}\n" ); } t03_inline_double.rs000066400000000000000000000024561474765622100377460ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t19_escapes_single_quoted_lowercase//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/19_escapes_single_quoted_lowercase/03_inline_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("03_inline_double") } #[test] fn test() { assert_eq!( runner().ok( ".result {\ \n output: #{#{\'\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z\'}};\ \n output: #{\"[#{\'\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z\'}]\"};\ \n output: #{\"#{\'\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z\'}\"};\ \n output: #{\'#{\'\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z\'}\'};\ \n output: #{\"[\'#{\'\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z\'}\']\"};\ \n}\n" ), ".result {\ \n output: \u{b}\u{c}\r\u{e}\u{f}ghijklmnopqrstuvwxyz;\ \n output: [\u{b}\u{c}\r\u{e}\u{f}ghijklmnopqrstuvwxyz];\ \n output: \u{b}\u{c}\r\u{e}\u{f}ghijklmnopqrstuvwxyz;\ \n output: \u{b}\u{c}\r\u{e}\u{f}ghijklmnopqrstuvwxyz;\ \n output: [\'\u{b}\u{c}\r\u{e}\u{f}ghijklmnopqrstuvwxyz\'];\ \n}\n" ); } t04_variable_double.rs000066400000000000000000000020561474765622100402520ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t19_escapes_single_quoted_lowercase//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/19_escapes_single_quoted_lowercase/04_variable_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("04_variable_double") } #[test] fn test() { assert_eq!( runner().ok( "$input: \'\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z\';\ \n.result {\ \n output: #{#{$input}};\ \n output: #{\"[#{$input}]\"};\ \n output: #{\"#{$input}\"};\ \n output: #{\'#{$input}\'};\ \n output: #{\"[\'#{$input}\']\"};\ \n}\n" ), ".result {\ \n output: \u{b}\u{c}\r\u{e}\u{f}ghijklmnopqrstuvwxyz;\ \n output: [\u{b}\u{c}\r\u{e}\u{f}ghijklmnopqrstuvwxyz];\ \n output: \u{b}\u{c}\r\u{e}\u{f}ghijklmnopqrstuvwxyz;\ \n output: \u{b}\u{c}\r\u{e}\u{f}ghijklmnopqrstuvwxyz;\ \n output: [\'\u{b}\u{c}\r\u{e}\u{f}ghijklmnopqrstuvwxyz\'];\ \n}\n" ); } t05_variable_quoted_double.rs000066400000000000000000000032141474765622100416310ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t19_escapes_single_quoted_lowercase//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/19_escapes_single_quoted_lowercase/05_variable_quoted_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("05_variable_quoted_double") } #[test] fn test() { assert_eq!( runner().ok( "$input: \'\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z\';\ \n.result {\ \n dquoted: \"#{#{$input}}\";\ \n dquoted: \"#{\"[#{$input}]\"}\";\ \n dquoted: \"#{\"#{$input}\"}\";\ \n dquoted: \"#{\'#{$input}\'}\";\ \n dquoted: \"#{\"[\'#{$input}\']\"}\";\ \n squoted: \'#{#{$input}}\';\ \n squoted: \'#{\"[#{$input}]\"}\';\ \n squoted: \'#{\"#{$input}\"}\';\ \n squoted: \'#{\'#{$input}\'}\';\ \n squoted: \'#{\"[\'#{$input}\']\"}\';\ \n}\n" ), ".result {\ \n dquoted: \"\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz\";\ \n dquoted: \"[\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz]\";\ \n dquoted: \"\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz\";\ \n dquoted: \"\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz\";\ \n dquoted: \"[\'\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz\']\";\ \n squoted: \"\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz\";\ \n squoted: \"[\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz]\";\ \n squoted: \"\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz\";\ \n squoted: \"\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz\";\ \n squoted: \"[\'\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz\']\";\ \n}\n" ); } t06_escape_interpolation.rs000066400000000000000000000024051474765622100413420ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t19_escapes_single_quoted_lowercase//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/19_escapes_single_quoted_lowercase/06_escape_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("06_escape_interpolation") } #[test] fn test() { assert_eq!( runner().ok( "$input: \'\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z\';\ \n.result {\ \n output: \"[\\#{\'\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z\'}]\";\ \n output: \"\\#{\'\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z\'}\";\ \n output: \'\\#{\'\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z\'}\';\ \n output: \"[\'\\#{\'\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z\'}\']\";\ \n}\n" ), ".result {\ \n output: \"[#{\'\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz\'}]\";\ \n output: \"#{\'\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz\'}\";\ \n output: \"#{\" \\b \\c \\d \\e \\f ghijklmnopqrstuvwxyz \"}\";\ \n output: \"[\'#{\'\\b\\c\\d\\e\\fghijklmnopqrstuvwxyz\'}\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t20_escapes_literal_uppercase/000077500000000000000000000000001474765622100327375ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t20_escapes_literal_uppercase/mod.rs000066400000000000000000000005701474765622100340660ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/20_escapes_literal_uppercase" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("20_escapes_literal_uppercase") } mod t01_inline; mod t02_variable; mod t03_inline_double; mod t04_variable_double; mod t05_variable_quoted_double; mod t06_escape_interpolation; t01_inline.rs000066400000000000000000000027141474765622100351740ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t20_escapes_literal_uppercase//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/20_escapes_literal_uppercase/01_inline.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("01_inline") } #[test] fn test() { assert_eq!( runner().ok( ".result {\ \n output: \\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z;\ \n output: #{\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z};\ \n output: \"[#{\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z}]\";\ \n output: \"#{\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z}\";\ \n output: \'#{\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z}\';\ \n output: \"[\'#{\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z}\']\";\ \n}\n" ), ".result {\ \n output: \\b \\c \\d \\e \\f GHIJKLMNOPQRSTUVWXYZ;\ \n output: \\b \\c \\d \\e \\f GHIJKLMNOPQRSTUVWXYZ;\ \n output: \"[\\\\b \\\\c \\\\d \\\\e \\\\f GHIJKLMNOPQRSTUVWXYZ]\";\ \n output: \"\\\\b \\\\c \\\\d \\\\e \\\\f GHIJKLMNOPQRSTUVWXYZ\";\ \n output: \"\\\\b \\\\c \\\\d \\\\e \\\\f GHIJKLMNOPQRSTUVWXYZ\";\ \n output: \"[\'\\\\b \\\\c \\\\d \\\\e \\\\f GHIJKLMNOPQRSTUVWXYZ\']\";\ \n}\n" ); } t02_variable.rs000066400000000000000000000022271474765622100355030ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t20_escapes_literal_uppercase//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/20_escapes_literal_uppercase/02_variable.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("02_variable") } #[test] fn test() { assert_eq!( runner().ok( "$input: \\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z;\ \n.result {\ \n output: $input;\ \n output: #{$input};\ \n output: \"[#{$input}]\";\ \n output: \"#{$input}\";\ \n output: \'#{$input}\';\ \n output: \"[\'#{$input}\']\";\ \n}\n" ), ".result {\ \n output: \\b \\c \\d \\e \\f GHIJKLMNOPQRSTUVWXYZ;\ \n output: \\b \\c \\d \\e \\f GHIJKLMNOPQRSTUVWXYZ;\ \n output: \"[\\\\b \\\\c \\\\d \\\\e \\\\f GHIJKLMNOPQRSTUVWXYZ]\";\ \n output: \"\\\\b \\\\c \\\\d \\\\e \\\\f GHIJKLMNOPQRSTUVWXYZ\";\ \n output: \"\\\\b \\\\c \\\\d \\\\e \\\\f GHIJKLMNOPQRSTUVWXYZ\";\ \n output: \"[\'\\\\b \\\\c \\\\d \\\\e \\\\f GHIJKLMNOPQRSTUVWXYZ\']\";\ \n}\n" ); } t03_inline_double.rs000066400000000000000000000024121474765622100365230ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t20_escapes_literal_uppercase//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/20_escapes_literal_uppercase/03_inline_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("03_inline_double") } #[test] fn test() { assert_eq!( runner().ok( ".result {\ \n output: #{#{\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z}};\ \n output: #{\"[#{\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z}]\"};\ \n output: #{\"#{\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z}\"};\ \n output: #{\'#{\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z}\'};\ \n output: #{\"[\'#{\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z}\']\"};\ \n}\n" ), ".result {\ \n output: \\b \\c \\d \\e \\f GHIJKLMNOPQRSTUVWXYZ;\ \n output: [\\b \\c \\d \\e \\f GHIJKLMNOPQRSTUVWXYZ];\ \n output: \\b \\c \\d \\e \\f GHIJKLMNOPQRSTUVWXYZ;\ \n output: \\b \\c \\d \\e \\f GHIJKLMNOPQRSTUVWXYZ;\ \n output: [\'\\b \\c \\d \\e \\f GHIJKLMNOPQRSTUVWXYZ\'];\ \n}\n" ); } t04_variable_double.rs000066400000000000000000000020321474765622100370310ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t20_escapes_literal_uppercase//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/20_escapes_literal_uppercase/04_variable_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("04_variable_double") } #[test] fn test() { assert_eq!( runner().ok( "$input: \\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z;\ \n.result {\ \n output: #{#{$input}};\ \n output: #{\"[#{$input}]\"};\ \n output: #{\"#{$input}\"};\ \n output: #{\'#{$input}\'};\ \n output: #{\"[\'#{$input}\']\"};\ \n}\n" ), ".result {\ \n output: \\b \\c \\d \\e \\f GHIJKLMNOPQRSTUVWXYZ;\ \n output: [\\b \\c \\d \\e \\f GHIJKLMNOPQRSTUVWXYZ];\ \n output: \\b \\c \\d \\e \\f GHIJKLMNOPQRSTUVWXYZ;\ \n output: \\b \\c \\d \\e \\f GHIJKLMNOPQRSTUVWXYZ;\ \n output: [\'\\b \\c \\d \\e \\f GHIJKLMNOPQRSTUVWXYZ\'];\ \n}\n" ); } t05_variable_quoted_double.rs000066400000000000000000000034301474765622100404160ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t20_escapes_literal_uppercase//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/20_escapes_literal_uppercase/05_variable_quoted_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("05_variable_quoted_double") } #[test] fn test() { assert_eq!( runner().ok( "$input: \\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z;\ \n.result {\ \n dquoted: \"#{#{$input}}\";\ \n dquoted: \"#{\"[#{$input}]\"}\";\ \n dquoted: \"#{\"#{$input}\"}\";\ \n dquoted: \"#{\'#{$input}\'}\";\ \n dquoted: \"#{\"[\'#{$input}\']\"}\";\ \n squoted: \'#{#{$input}}\';\ \n squoted: \'#{\"[#{$input}]\"}\';\ \n squoted: \'#{\"#{$input}\"}\';\ \n squoted: \'#{\'#{$input}\'}\';\ \n squoted: \'#{\"[\'#{$input}\']\"}\';\ \n}\n" ), ".result {\ \n dquoted: \"\\\\b \\\\c \\\\d \\\\e \\\\f GHIJKLMNOPQRSTUVWXYZ\";\ \n dquoted: \"[\\\\b \\\\c \\\\d \\\\e \\\\f GHIJKLMNOPQRSTUVWXYZ]\";\ \n dquoted: \"\\\\b \\\\c \\\\d \\\\e \\\\f GHIJKLMNOPQRSTUVWXYZ\";\ \n dquoted: \"\\\\b \\\\c \\\\d \\\\e \\\\f GHIJKLMNOPQRSTUVWXYZ\";\ \n dquoted: \"[\'\\\\b \\\\c \\\\d \\\\e \\\\f GHIJKLMNOPQRSTUVWXYZ\']\";\ \n squoted: \"\\\\b \\\\c \\\\d \\\\e \\\\f GHIJKLMNOPQRSTUVWXYZ\";\ \n squoted: \"[\\\\b \\\\c \\\\d \\\\e \\\\f GHIJKLMNOPQRSTUVWXYZ]\";\ \n squoted: \"\\\\b \\\\c \\\\d \\\\e \\\\f GHIJKLMNOPQRSTUVWXYZ\";\ \n squoted: \"\\\\b \\\\c \\\\d \\\\e \\\\f GHIJKLMNOPQRSTUVWXYZ\";\ \n squoted: \"[\'\\\\b \\\\c \\\\d \\\\e \\\\f GHIJKLMNOPQRSTUVWXYZ\']\";\ \n}\n" ); } t06_escape_interpolation.rs000066400000000000000000000023241474765622100401270ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t20_escapes_literal_uppercase//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/20_escapes_literal_uppercase/06_escape_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("06_escape_interpolation") } #[test] fn test() { assert_eq!( runner().ok( "$input: \\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z;\ \n.result {\ \n output: \"[\\#{\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z}]\";\ \n output: \"\\#{\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z}\";\ \n output: \'\\#{\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z}\';\ \n output: \"[\'\\#{\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z}\']\";\ \n}\n" ), ".result {\ \n output: \"[#{\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ}]\";\ \n output: \"#{\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ}\";\ \n output: \"#{\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ}\";\ \n output: \"[\'#{\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ}\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t21_escapes_double_quoted_uppercase/000077500000000000000000000000001474765622100341375ustar00rootroot00000000000000mod.rs000066400000000000000000000006041474765622100352050ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t21_escapes_double_quoted_uppercase//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/21_escapes_double_quoted_uppercase" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("21_escapes_double_quoted_uppercase") } mod t01_inline; mod t02_variable; mod t03_inline_double; mod t04_variable_double; mod t05_variable_quoted_double; mod t06_escape_interpolation; t01_inline.rs000066400000000000000000000026571474765622100364020ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t21_escapes_double_quoted_uppercase//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/21_escapes_double_quoted_uppercase/01_inline.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("01_inline") } #[test] fn test() { assert_eq!( runner().ok( ".result {\ \n output: \"\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z\";\ \n output: #{\"\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z\"};\ \n output: \"[#{\"\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z\"}]\";\ \n output: \"#{\"\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z\"}\";\ \n output: \'#{\"\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z\"}\';\ \n output: \"[\'#{\"\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z\"}\']\";\ \n}\n" ), ".result {\ \n output: \"\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ\";\ \n output: \u{b}\u{c}\r\u{e}\u{f}GHIJKLMNOPQRSTUVWXYZ;\ \n output: \"[\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ]\";\ \n output: \"\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ\";\ \n output: \"\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ\";\ \n output: \"[\'\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ\']\";\ \n}\n" ); } t02_variable.rs000066400000000000000000000021461474765622100367030ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t21_escapes_double_quoted_uppercase//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/21_escapes_double_quoted_uppercase/02_variable.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("02_variable") } #[test] fn test() { assert_eq!( runner().ok( "$input: \"\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z\";\ \n.result {\ \n output: $input;\ \n output: #{$input};\ \n output: \"[#{$input}]\";\ \n output: \"#{$input}\";\ \n output: \'#{$input}\';\ \n output: \"[\'#{$input}\']\";\ \n}\n" ), ".result {\ \n output: \"\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ\";\ \n output: \u{b}\u{c}\r\u{e}\u{f}GHIJKLMNOPQRSTUVWXYZ;\ \n output: \"[\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ]\";\ \n output: \"\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ\";\ \n output: \"\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ\";\ \n output: \"[\'\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ\']\";\ \n}\n" ); } t03_inline_double.rs000066400000000000000000000024561474765622100377330ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t21_escapes_double_quoted_uppercase//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/21_escapes_double_quoted_uppercase/03_inline_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("03_inline_double") } #[test] fn test() { assert_eq!( runner().ok( ".result {\ \n output: #{#{\"\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z\"}};\ \n output: #{\"[#{\"\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z\"}]\"};\ \n output: #{\"#{\"\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z\"}\"};\ \n output: #{\'#{\"\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z\"}\'};\ \n output: #{\"[\'#{\"\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z\"}\']\"};\ \n}\n" ), ".result {\ \n output: \u{b}\u{c}\r\u{e}\u{f}GHIJKLMNOPQRSTUVWXYZ;\ \n output: [\u{b}\u{c}\r\u{e}\u{f}GHIJKLMNOPQRSTUVWXYZ];\ \n output: \u{b}\u{c}\r\u{e}\u{f}GHIJKLMNOPQRSTUVWXYZ;\ \n output: \u{b}\u{c}\r\u{e}\u{f}GHIJKLMNOPQRSTUVWXYZ;\ \n output: [\'\u{b}\u{c}\r\u{e}\u{f}GHIJKLMNOPQRSTUVWXYZ\'];\ \n}\n" ); } t04_variable_double.rs000066400000000000000000000020561474765622100402370ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t21_escapes_double_quoted_uppercase//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/21_escapes_double_quoted_uppercase/04_variable_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("04_variable_double") } #[test] fn test() { assert_eq!( runner().ok( "$input: \"\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z\";\ \n.result {\ \n output: #{#{$input}};\ \n output: #{\"[#{$input}]\"};\ \n output: #{\"#{$input}\"};\ \n output: #{\'#{$input}\'};\ \n output: #{\"[\'#{$input}\']\"};\ \n}\n" ), ".result {\ \n output: \u{b}\u{c}\r\u{e}\u{f}GHIJKLMNOPQRSTUVWXYZ;\ \n output: [\u{b}\u{c}\r\u{e}\u{f}GHIJKLMNOPQRSTUVWXYZ];\ \n output: \u{b}\u{c}\r\u{e}\u{f}GHIJKLMNOPQRSTUVWXYZ;\ \n output: \u{b}\u{c}\r\u{e}\u{f}GHIJKLMNOPQRSTUVWXYZ;\ \n output: [\'\u{b}\u{c}\r\u{e}\u{f}GHIJKLMNOPQRSTUVWXYZ\'];\ \n}\n" ); } t05_variable_quoted_double.rs000066400000000000000000000032141474765622100416160ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t21_escapes_double_quoted_uppercase//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/21_escapes_double_quoted_uppercase/05_variable_quoted_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("05_variable_quoted_double") } #[test] fn test() { assert_eq!( runner().ok( "$input: \"\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z\";\ \n.result {\ \n dquoted: \"#{#{$input}}\";\ \n dquoted: \"#{\"[#{$input}]\"}\";\ \n dquoted: \"#{\"#{$input}\"}\";\ \n dquoted: \"#{\'#{$input}\'}\";\ \n dquoted: \"#{\"[\'#{$input}\']\"}\";\ \n squoted: \'#{#{$input}}\';\ \n squoted: \'#{\"[#{$input}]\"}\';\ \n squoted: \'#{\"#{$input}\"}\';\ \n squoted: \'#{\'#{$input}\'}\';\ \n squoted: \'#{\"[\'#{$input}\']\"}\';\ \n}\n" ), ".result {\ \n dquoted: \"\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ\";\ \n dquoted: \"[\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ]\";\ \n dquoted: \"\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ\";\ \n dquoted: \"\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ\";\ \n dquoted: \"[\'\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ\']\";\ \n squoted: \"\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ\";\ \n squoted: \"[\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ]\";\ \n squoted: \"\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ\";\ \n squoted: \"\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ\";\ \n squoted: \"[\'\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ\']\";\ \n}\n" ); } t06_escape_interpolation.rs000066400000000000000000000024231474765622100413270ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t21_escapes_double_quoted_uppercase//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/21_escapes_double_quoted_uppercase/06_escape_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("06_escape_interpolation") } #[test] fn test() { assert_eq!( runner().ok( "$input: \"\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z\";\ \n.result {\ \n output: \"[\\#{\"\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z\"}]\";\ \n output: \"\\#{\"\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z\"}\";\ \n output: \'\\#{\"\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z\"}\';\ \n output: \"[\'\\#{\"\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z\"}\']\";\ \n}\n" ), ".result {\ \n output: \"[#{\" \\b \\c \\d \\e \\f GHIJKLMNOPQRSTUVWXYZ \"}]\";\ \n output: \"#{\" \\b \\c \\d \\e \\f GHIJKLMNOPQRSTUVWXYZ \"}\";\ \n output: \'#{\"\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ\"}\';\ \n output: \"[\'#{\" \\b \\c \\d \\e \\f GHIJKLMNOPQRSTUVWXYZ \"}\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t22_escapes_single_quoted_uppercase/000077500000000000000000000000001474765622100341475ustar00rootroot00000000000000mod.rs000066400000000000000000000006041474765622100352150ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t22_escapes_single_quoted_uppercase//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/22_escapes_single_quoted_uppercase" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("22_escapes_single_quoted_uppercase") } mod t01_inline; mod t02_variable; mod t03_inline_double; mod t04_variable_double; mod t05_variable_quoted_double; mod t06_escape_interpolation; t01_inline.rs000066400000000000000000000026571474765622100364120ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t22_escapes_single_quoted_uppercase//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/22_escapes_single_quoted_uppercase/01_inline.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("01_inline") } #[test] fn test() { assert_eq!( runner().ok( ".result {\ \n output: \'\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z\';\ \n output: #{\'\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z\'};\ \n output: \"[#{\'\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z\'}]\";\ \n output: \"#{\'\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z\'}\";\ \n output: \'#{\'\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z\'}\';\ \n output: \"[\'#{\'\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z\'}\']\";\ \n}\n" ), ".result {\ \n output: \"\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ\";\ \n output: \u{b}\u{c}\r\u{e}\u{f}GHIJKLMNOPQRSTUVWXYZ;\ \n output: \"[\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ]\";\ \n output: \"\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ\";\ \n output: \"\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ\";\ \n output: \"[\'\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ\']\";\ \n}\n" ); } t02_variable.rs000066400000000000000000000021461474765622100367130ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t22_escapes_single_quoted_uppercase//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/22_escapes_single_quoted_uppercase/02_variable.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("02_variable") } #[test] fn test() { assert_eq!( runner().ok( "$input: \'\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z\';\ \n.result {\ \n output: $input;\ \n output: #{$input};\ \n output: \"[#{$input}]\";\ \n output: \"#{$input}\";\ \n output: \'#{$input}\';\ \n output: \"[\'#{$input}\']\";\ \n}\n" ), ".result {\ \n output: \"\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ\";\ \n output: \u{b}\u{c}\r\u{e}\u{f}GHIJKLMNOPQRSTUVWXYZ;\ \n output: \"[\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ]\";\ \n output: \"\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ\";\ \n output: \"\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ\";\ \n output: \"[\'\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ\']\";\ \n}\n" ); } t03_inline_double.rs000066400000000000000000000024561474765622100377430ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t22_escapes_single_quoted_uppercase//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/22_escapes_single_quoted_uppercase/03_inline_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("03_inline_double") } #[test] fn test() { assert_eq!( runner().ok( ".result {\ \n output: #{#{\'\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z\'}};\ \n output: #{\"[#{\'\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z\'}]\"};\ \n output: #{\"#{\'\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z\'}\"};\ \n output: #{\'#{\'\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z\'}\'};\ \n output: #{\"[\'#{\'\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z\'}\']\"};\ \n}\n" ), ".result {\ \n output: \u{b}\u{c}\r\u{e}\u{f}GHIJKLMNOPQRSTUVWXYZ;\ \n output: [\u{b}\u{c}\r\u{e}\u{f}GHIJKLMNOPQRSTUVWXYZ];\ \n output: \u{b}\u{c}\r\u{e}\u{f}GHIJKLMNOPQRSTUVWXYZ;\ \n output: \u{b}\u{c}\r\u{e}\u{f}GHIJKLMNOPQRSTUVWXYZ;\ \n output: [\'\u{b}\u{c}\r\u{e}\u{f}GHIJKLMNOPQRSTUVWXYZ\'];\ \n}\n" ); } t04_variable_double.rs000066400000000000000000000020561474765622100402470ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t22_escapes_single_quoted_uppercase//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/22_escapes_single_quoted_uppercase/04_variable_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("04_variable_double") } #[test] fn test() { assert_eq!( runner().ok( "$input: \'\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z\';\ \n.result {\ \n output: #{#{$input}};\ \n output: #{\"[#{$input}]\"};\ \n output: #{\"#{$input}\"};\ \n output: #{\'#{$input}\'};\ \n output: #{\"[\'#{$input}\']\"};\ \n}\n" ), ".result {\ \n output: \u{b}\u{c}\r\u{e}\u{f}GHIJKLMNOPQRSTUVWXYZ;\ \n output: [\u{b}\u{c}\r\u{e}\u{f}GHIJKLMNOPQRSTUVWXYZ];\ \n output: \u{b}\u{c}\r\u{e}\u{f}GHIJKLMNOPQRSTUVWXYZ;\ \n output: \u{b}\u{c}\r\u{e}\u{f}GHIJKLMNOPQRSTUVWXYZ;\ \n output: [\'\u{b}\u{c}\r\u{e}\u{f}GHIJKLMNOPQRSTUVWXYZ\'];\ \n}\n" ); } t05_variable_quoted_double.rs000066400000000000000000000032141474765622100416260ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t22_escapes_single_quoted_uppercase//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/22_escapes_single_quoted_uppercase/05_variable_quoted_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("05_variable_quoted_double") } #[test] fn test() { assert_eq!( runner().ok( "$input: \'\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z\';\ \n.result {\ \n dquoted: \"#{#{$input}}\";\ \n dquoted: \"#{\"[#{$input}]\"}\";\ \n dquoted: \"#{\"#{$input}\"}\";\ \n dquoted: \"#{\'#{$input}\'}\";\ \n dquoted: \"#{\"[\'#{$input}\']\"}\";\ \n squoted: \'#{#{$input}}\';\ \n squoted: \'#{\"[#{$input}]\"}\';\ \n squoted: \'#{\"#{$input}\"}\';\ \n squoted: \'#{\'#{$input}\'}\';\ \n squoted: \'#{\"[\'#{$input}\']\"}\';\ \n}\n" ), ".result {\ \n dquoted: \"\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ\";\ \n dquoted: \"[\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ]\";\ \n dquoted: \"\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ\";\ \n dquoted: \"\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ\";\ \n dquoted: \"[\'\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ\']\";\ \n squoted: \"\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ\";\ \n squoted: \"[\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ]\";\ \n squoted: \"\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ\";\ \n squoted: \"\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ\";\ \n squoted: \"[\'\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ\']\";\ \n}\n" ); } t06_escape_interpolation.rs000066400000000000000000000024051474765622100413370ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t22_escapes_single_quoted_uppercase//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/22_escapes_single_quoted_uppercase/06_escape_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("06_escape_interpolation") } #[test] fn test() { assert_eq!( runner().ok( "$input: \'\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z\';\ \n.result {\ \n output: \"[\\#{\'\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z\'}]\";\ \n output: \"\\#{\'\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z\'}\";\ \n output: \'\\#{\'\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z\'}\';\ \n output: \"[\'\\#{\'\\B\\C\\D\\E\\F\\G\\H\\I\\J\\K\\L\\M\\N\\O\\P\\Q\\R\\S\\T\\U\\V\\W\\X\\Y\\Z\'}\']\";\ \n}\n" ), ".result {\ \n output: \"[#{\'\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ\'}]\";\ \n output: \"#{\'\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ\'}\";\ \n output: \"#{\" \\b \\c \\d \\e \\f GHIJKLMNOPQRSTUVWXYZ \"}\";\ \n output: \"[\'#{\'\\b\\c\\d\\e\\fGHIJKLMNOPQRSTUVWXYZ\'}\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t23_escapes_literal_specials/000077500000000000000000000000001474765622100325565ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t23_escapes_literal_specials/mod.rs000066400000000000000000000005661474765622100337120ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/23_escapes_literal_specials" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("23_escapes_literal_specials") } mod t01_inline; mod t02_variable; mod t03_inline_double; mod t04_variable_double; mod t05_variable_quoted_double; mod t06_escape_interpolation; t01_inline.rs000066400000000000000000000016111474765622100350060ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t23_escapes_literal_specials//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/23_escapes_literal_specials/01_inline.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("01_inline") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: \\0_\\a_\\A;\ \n output: #{\\0_\\a_\\A};\ \n output: \"[#{\\0_\\a_\\A}]\";\ \n output: \"#{\\0_\\a_\\A}\";\ \n output: \'#{\\0_\\a_\\A}\';\ \n output: \"[\'#{\\0_\\a_\\A}\']\";\ \n}\n"), ".result {\ \n output: \\0 _\\a _\\a ;\ \n output: \\0 _\\a _\\a ;\ \n output: \"[\\\\0 _\\\\a _\\\\a ]\";\ \n output: \"\\\\0 _\\\\a _\\\\a \";\ \n output: \"\\\\0 _\\\\a _\\\\a \";\ \n output: \"[\'\\\\0 _\\\\a _\\\\a \']\";\ \n}\n" ); } t02_variable.rs000066400000000000000000000016241474765622100353220ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t23_escapes_literal_specials//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/23_escapes_literal_specials/02_variable.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("02_variable") } #[test] fn test() { assert_eq!( runner().ok("$input: \\0_\\a_\\A;\ \n.result {\ \n output: $input;\ \n output: #{$input};\ \n output: \"[#{$input}]\";\ \n output: \"#{$input}\";\ \n output: \'#{$input}\';\ \n output: \"[\'#{$input}\']\";\ \n}\n"), ".result {\ \n output: \\0 _\\a _\\a ;\ \n output: \\0 _\\a _\\a ;\ \n output: \"[\\\\0 _\\\\a _\\\\a ]\";\ \n output: \"\\\\0 _\\\\a _\\\\a \";\ \n output: \"\\\\0 _\\\\a _\\\\a \";\ \n output: \"[\'\\\\0 _\\\\a _\\\\a \']\";\ \n}\n" ); } t03_inline_double.rs000066400000000000000000000014611474765622100363450ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t23_escapes_literal_specials//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/23_escapes_literal_specials/03_inline_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("03_inline_double") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: #{#{\\0_\\a_\\A}};\ \n output: #{\"[#{\\0_\\a_\\A}]\"};\ \n output: #{\"#{\\0_\\a_\\A}\"};\ \n output: #{\'#{\\0_\\a_\\A}\'};\ \n output: #{\"[\'#{\\0_\\a_\\A}\']\"};\ \n}\n"), ".result {\ \n output: \\0 _\\a _\\a ;\ \n output: [\\0 _\\a _\\a ];\ \n output: \\0 _\\a _\\a ;\ \n output: \\0 _\\a _\\a ;\ \n output: [\'\\0 _\\a _\\a \'];\ \n}\n" ); } t04_variable_double.rs000066400000000000000000000015011474765622100366500ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t23_escapes_literal_specials//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/23_escapes_literal_specials/04_variable_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("04_variable_double") } #[test] fn test() { assert_eq!( runner().ok("$input: \\0_\\a_\\A;\ \n.result {\ \n output: #{#{$input}};\ \n output: #{\"[#{$input}]\"};\ \n output: #{\"#{$input}\"};\ \n output: #{\'#{$input}\'};\ \n output: #{\"[\'#{$input}\']\"};\ \n}\n"), ".result {\ \n output: \\0 _\\a _\\a ;\ \n output: [\\0 _\\a _\\a ];\ \n output: \\0 _\\a _\\a ;\ \n output: \\0 _\\a _\\a ;\ \n output: [\'\\0 _\\a _\\a \'];\ \n}\n" ); } t05_variable_quoted_double.rs000066400000000000000000000026251474765622100402420ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t23_escapes_literal_specials//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/23_escapes_literal_specials/05_variable_quoted_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("05_variable_quoted_double") } #[test] fn test() { assert_eq!( runner().ok("$input: \\0_\\a_\\A;\ \n.result {\ \n dquoted: \"#{#{$input}}\";\ \n dquoted: \"#{\"[#{$input}]\"}\";\ \n dquoted: \"#{\"#{$input}\"}\";\ \n dquoted: \"#{\'#{$input}\'}\";\ \n dquoted: \"#{\"[\'#{$input}\']\"}\";\ \n squoted: \'#{#{$input}}\';\ \n squoted: \'#{\"[#{$input}]\"}\';\ \n squoted: \'#{\"#{$input}\"}\';\ \n squoted: \'#{\'#{$input}\'}\';\ \n squoted: \'#{\"[\'#{$input}\']\"}\';\ \n}\n"), ".result {\ \n dquoted: \"\\\\0 _\\\\a _\\\\a \";\ \n dquoted: \"[\\\\0 _\\\\a _\\\\a ]\";\ \n dquoted: \"\\\\0 _\\\\a _\\\\a \";\ \n dquoted: \"\\\\0 _\\\\a _\\\\a \";\ \n dquoted: \"[\'\\\\0 _\\\\a _\\\\a \']\";\ \n squoted: \"\\\\0 _\\\\a _\\\\a \";\ \n squoted: \"[\\\\0 _\\\\a _\\\\a ]\";\ \n squoted: \"\\\\0 _\\\\a _\\\\a \";\ \n squoted: \"\\\\0 _\\\\a _\\\\a \";\ \n squoted: \"[\'\\\\0 _\\\\a _\\\\a \']\";\ \n}\n" ); } t06_escape_interpolation.rs000066400000000000000000000014751474765622100377540ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t23_escapes_literal_specials//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/23_escapes_literal_specials/06_escape_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("06_escape_interpolation") } #[test] fn test() { assert_eq!( runner().ok("$input: \\0_\\a_\\A;\ \n.result {\ \n output: \"[\\#{\\0_\\a_\\A}]\";\ \n output: \"\\#{\\0_\\a_\\A}\";\ \n output: \'\\#{\\0_\\a_\\A}\';\ \n output: \"[\'\\#{\\0_\\a_\\A}\']\";\ \n}\n"), "@charset \"UTF-8\";\ \n.result {\ \n output: \"[#{�_\\a_\\a}]\";\ \n output: \"#{�_\\a_\\a}\";\ \n output: \"#{�_\\a_\\a}\";\ \n output: \"[\'#{�_\\a_\\a}\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t24_escapes_double_quoted_specials/000077500000000000000000000000001474765622100337565ustar00rootroot00000000000000mod.rs000066400000000000000000000006061474765622100350260ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t24_escapes_double_quoted_specials//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/24_escapes_double_quoted_specials" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("24_escapes_double_quoted_specials") } mod t01_inline; mod t02_variable; mod t03_inline_double; mod t04_variable_double; mod t06_escape_interpolation; mod todo_05_variable_quoted_double; t01_inline.rs000066400000000000000000000016351474765622100362140ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t24_escapes_double_quoted_specials//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/24_escapes_double_quoted_specials/01_inline.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("01_inline") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: \"\\0_\\a_\\A\";\ \n output: #{\"\\0_\\a_\\A\"};\ \n output: \"[#{\"\\0_\\a_\\A\"}]\";\ \n output: \"#{\"\\0_\\a_\\A\"}\";\ \n output: \'#{\"\\0_\\a_\\A\"}\';\ \n output: \"[\'#{\"\\0_\\a_\\A\"}\']\";\ \n}\n"), "@charset \"UTF-8\";\ \n.result {\ \n output: \"�_\\a_\\a\";\ \n output: �_ _ ;\ \n output: \"[�_\\a_\\a]\";\ \n output: \"�_\\a_\\a\";\ \n output: \"�_\\a_\\a\";\ \n output: \"[\'�_\\a_\\a\']\";\ \n}\n" ); } t02_variable.rs000066400000000000000000000016241474765622100365220ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t24_escapes_double_quoted_specials//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/24_escapes_double_quoted_specials/02_variable.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("02_variable") } #[test] fn test() { assert_eq!( runner().ok("$input: \"\\0_\\a_\\A\";\ \n.result {\ \n output: $input;\ \n output: #{$input};\ \n output: \"[#{$input}]\";\ \n output: \"#{$input}\";\ \n output: \'#{$input}\';\ \n output: \"[\'#{$input}\']\";\ \n}\n"), "@charset \"UTF-8\";\ \n.result {\ \n output: \"�_\\a_\\a\";\ \n output: �_ _ ;\ \n output: \"[�_\\a_\\a]\";\ \n output: \"�_\\a_\\a\";\ \n output: \"�_\\a_\\a\";\ \n output: \"[\'�_\\a_\\a\']\";\ \n}\n" ); } t03_inline_double.rs000066400000000000000000000015101474765622100375400ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t24_escapes_double_quoted_specials//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/24_escapes_double_quoted_specials/03_inline_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("03_inline_double") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: #{#{\"\\0_\\a_\\A\"}};\ \n output: #{\"[#{\"\\0_\\a_\\A\"}]\"};\ \n output: #{\"#{\"\\0_\\a_\\A\"}\"};\ \n output: #{\'#{\"\\0_\\a_\\A\"}\'};\ \n output: #{\"[\'#{\"\\0_\\a_\\A\"}\']\"};\ \n}\n"), "@charset \"UTF-8\";\ \n.result {\ \n output: �_ _ ;\ \n output: [�_ _ ];\ \n output: �_ _ ;\ \n output: �_ _ ;\ \n output: [\'�_ _ \'];\ \n}\n" ); } t04_variable_double.rs000066400000000000000000000015101474765622100400500ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t24_escapes_double_quoted_specials//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/24_escapes_double_quoted_specials/04_variable_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("04_variable_double") } #[test] fn test() { assert_eq!( runner().ok("$input: \"\\0_\\a_\\A\";\ \n.result {\ \n output: #{#{$input}};\ \n output: #{\"[#{$input}]\"};\ \n output: #{\"#{$input}\"};\ \n output: #{\'#{$input}\'};\ \n output: #{\"[\'#{$input}\']\"};\ \n}\n"), "@charset \"UTF-8\";\ \n.result {\ \n output: �_ _ ;\ \n output: [�_ _ ];\ \n output: �_ _ ;\ \n output: �_ _ ;\ \n output: [\'�_ _ \'];\ \n}\n" ); } t06_escape_interpolation.rs000066400000000000000000000015661474765622100411550ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t24_escapes_double_quoted_specials//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/24_escapes_double_quoted_specials/06_escape_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("06_escape_interpolation") } #[test] fn test() { assert_eq!( runner().ok("$input: \"\\0_\\a_\\A\";\ \n.result {\ \n output: \"[\\#{\"\\0_\\a_\\A\"}]\";\ \n output: \"\\#{\"\\0_\\a_\\A\"}\";\ \n output: \'\\#{\"\\0_\\a_\\A\"}\';\ \n output: \"[\'\\#{\"\\0_\\a_\\A\"}\']\";\ \n}\n"), "@charset \"UTF-8\";\ \n.result {\ \n output: \"[#{\" \\0 _\\a _\\a \"}]\";\ \n output: \"#{\" \\0 _\\a _\\a \"}\";\ \n output: \'#{\"�_\\a_\\a\"}\';\ \n output: \"[\'#{\" \\0 _\\a _\\a \"}\']\";\ \n}\n" ); } todo_05_variable_quoted_double.rs000066400000000000000000000027421474765622100423030ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t24_escapes_double_quoted_specials//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/24_escapes_double_quoted_specials/todo_05_variable_quoted_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("todo_05_variable_quoted_double") .mock_file("todo.txt", "Fails on shared build (gcc/clang)\r\nLooks like some issue with \"\\r\"") } #[test] fn test() { assert_eq!( runner().ok("$input: \"\\0_\\a_\\A\";\ \n.result {\ \n dquoted: \"#{#{$input}}\";\ \n dquoted: \"#{\"[#{$input}]\"}\";\ \n dquoted: \"#{\"#{$input}\"}\";\ \n dquoted: \"#{\'#{$input}\'}\";\ \n dquoted: \"#{\"[\'#{$input}\']\"}\";\ \n squoted: \'#{#{$input}}\';\ \n squoted: \'#{\"[#{$input}]\"}\';\ \n squoted: \'#{\"#{$input}\"}\';\ \n squoted: \'#{\'#{$input}\'}\';\ \n squoted: \'#{\"[\'#{$input}\']\"}\';\ \n}\n"), "@charset \"UTF-8\";\ \n.result {\ \n dquoted: \"�_\\a_\\a\";\ \n dquoted: \"[�_\\a_\\a]\";\ \n dquoted: \"�_\\a_\\a\";\ \n dquoted: \"�_\\a_\\a\";\ \n dquoted: \"[\'�_\\a_\\a\']\";\ \n squoted: \"�_\\a_\\a\";\ \n squoted: \"[�_\\a_\\a]\";\ \n squoted: \"�_\\a_\\a\";\ \n squoted: \"�_\\a_\\a\";\ \n squoted: \"[\'�_\\a_\\a\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t25_escapes_single_quoted_specials/000077500000000000000000000000001474765622100337665ustar00rootroot00000000000000mod.rs000066400000000000000000000006061474765622100350360ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t25_escapes_single_quoted_specials//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/25_escapes_single_quoted_specials" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("25_escapes_single_quoted_specials") } mod t01_inline; mod t02_variable; mod t03_inline_double; mod t04_variable_double; mod t06_escape_interpolation; mod todo_05_variable_quoted_double; t01_inline.rs000066400000000000000000000016351474765622100362240ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t25_escapes_single_quoted_specials//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/25_escapes_single_quoted_specials/01_inline.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("01_inline") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: \'\\0_\\a_\\A\';\ \n output: #{\'\\0_\\a_\\A\'};\ \n output: \"[#{\'\\0_\\a_\\A\'}]\";\ \n output: \"#{\'\\0_\\a_\\A\'}\";\ \n output: \'#{\'\\0_\\a_\\A\'}\';\ \n output: \"[\'#{\'\\0_\\a_\\A\'}\']\";\ \n}\n"), "@charset \"UTF-8\";\ \n.result {\ \n output: \"�_\\a_\\a\";\ \n output: �_ _ ;\ \n output: \"[�_\\a_\\a]\";\ \n output: \"�_\\a_\\a\";\ \n output: \"�_\\a_\\a\";\ \n output: \"[\'�_\\a_\\a\']\";\ \n}\n" ); } t02_variable.rs000066400000000000000000000016241474765622100365320ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t25_escapes_single_quoted_specials//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/25_escapes_single_quoted_specials/02_variable.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("02_variable") } #[test] fn test() { assert_eq!( runner().ok("$input: \'\\0_\\a_\\A\';\ \n.result {\ \n output: $input;\ \n output: #{$input};\ \n output: \"[#{$input}]\";\ \n output: \"#{$input}\";\ \n output: \'#{$input}\';\ \n output: \"[\'#{$input}\']\";\ \n}\n"), "@charset \"UTF-8\";\ \n.result {\ \n output: \"�_\\a_\\a\";\ \n output: �_ _ ;\ \n output: \"[�_\\a_\\a]\";\ \n output: \"�_\\a_\\a\";\ \n output: \"�_\\a_\\a\";\ \n output: \"[\'�_\\a_\\a\']\";\ \n}\n" ); } t03_inline_double.rs000066400000000000000000000015101474765622100375500ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t25_escapes_single_quoted_specials//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/25_escapes_single_quoted_specials/03_inline_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("03_inline_double") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: #{#{\'\\0_\\a_\\A\'}};\ \n output: #{\"[#{\'\\0_\\a_\\A\'}]\"};\ \n output: #{\"#{\'\\0_\\a_\\A\'}\"};\ \n output: #{\'#{\'\\0_\\a_\\A\'}\'};\ \n output: #{\"[\'#{\'\\0_\\a_\\A\'}\']\"};\ \n}\n"), "@charset \"UTF-8\";\ \n.result {\ \n output: �_ _ ;\ \n output: [�_ _ ];\ \n output: �_ _ ;\ \n output: �_ _ ;\ \n output: [\'�_ _ \'];\ \n}\n" ); } t04_variable_double.rs000066400000000000000000000015101474765622100400600ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t25_escapes_single_quoted_specials//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/25_escapes_single_quoted_specials/04_variable_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("04_variable_double") } #[test] fn test() { assert_eq!( runner().ok("$input: \'\\0_\\a_\\A\';\ \n.result {\ \n output: #{#{$input}};\ \n output: #{\"[#{$input}]\"};\ \n output: #{\"#{$input}\"};\ \n output: #{\'#{$input}\'};\ \n output: #{\"[\'#{$input}\']\"};\ \n}\n"), "@charset \"UTF-8\";\ \n.result {\ \n output: �_ _ ;\ \n output: [�_ _ ];\ \n output: �_ _ ;\ \n output: �_ _ ;\ \n output: [\'�_ _ \'];\ \n}\n" ); } t06_escape_interpolation.rs000066400000000000000000000015541474765622100411620ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t25_escapes_single_quoted_specials//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/25_escapes_single_quoted_specials/06_escape_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("06_escape_interpolation") } #[test] fn test() { assert_eq!( runner().ok("$input: \'\\0_\\a_\\A\';\ \n.result {\ \n output: \"[\\#{\'\\0_\\a_\\A\'}]\";\ \n output: \"\\#{\'\\0_\\a_\\A\'}\";\ \n output: \'\\#{\'\\0_\\a_\\A\'}\';\ \n output: \"[\'\\#{\'\\0_\\a_\\A\'}\']\";\ \n}\n"), "@charset \"UTF-8\";\ \n.result {\ \n output: \"[#{\'�_\\a_\\a\'}]\";\ \n output: \"#{\'�_\\a_\\a\'}\";\ \n output: \"#{\" \\0 _\\a _\\a \"}\";\ \n output: \"[\'#{\'�_\\a_\\a\'}\']\";\ \n}\n" ); } todo_05_variable_quoted_double.rs000066400000000000000000000027421474765622100423130ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t25_escapes_single_quoted_specials//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/25_escapes_single_quoted_specials/todo_05_variable_quoted_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("todo_05_variable_quoted_double") .mock_file("todo.txt", "Fails on shared build (gcc/clang)\r\nLooks like some issue with \"\\r\"") } #[test] fn test() { assert_eq!( runner().ok("$input: \'\\0_\\a_\\A\';\ \n.result {\ \n dquoted: \"#{#{$input}}\";\ \n dquoted: \"#{\"[#{$input}]\"}\";\ \n dquoted: \"#{\"#{$input}\"}\";\ \n dquoted: \"#{\'#{$input}\'}\";\ \n dquoted: \"#{\"[\'#{$input}\']\"}\";\ \n squoted: \'#{#{$input}}\';\ \n squoted: \'#{\"[#{$input}]\"}\';\ \n squoted: \'#{\"#{$input}\"}\';\ \n squoted: \'#{\'#{$input}\'}\';\ \n squoted: \'#{\"[\'#{$input}\']\"}\';\ \n}\n"), "@charset \"UTF-8\";\ \n.result {\ \n dquoted: \"�_\\a_\\a\";\ \n dquoted: \"[�_\\a_\\a]\";\ \n dquoted: \"�_\\a_\\a\";\ \n dquoted: \"�_\\a_\\a\";\ \n dquoted: \"[\'�_\\a_\\a\']\";\ \n squoted: \"�_\\a_\\a\";\ \n squoted: \"[�_\\a_\\a]\";\ \n squoted: \"�_\\a_\\a\";\ \n squoted: \"�_\\a_\\a\";\ \n squoted: \"[\'�_\\a_\\a\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t26_escaped_literal_quotes/000077500000000000000000000000001474765622100322575ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t26_escaped_literal_quotes/mod.rs000066400000000000000000000005621474765622100334070ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/26_escaped_literal_quotes" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("26_escaped_literal_quotes") } mod t01_inline; mod t02_variable; mod t03_inline_double; mod t04_variable_double; mod t05_variable_quoted_double; mod t06_escape_interpolation; t01_inline.rs000066400000000000000000000015211474765622100345070ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t26_escaped_literal_quotes//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/26_escaped_literal_quotes/01_inline.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("01_inline") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: \\\"\\\';\ \n output: #{\\\"\\\'};\ \n output: \"[#{\\\"\\\'}]\";\ \n output: \"#{\\\"\\\'}\";\ \n output: \'#{\\\"\\\'}\';\ \n output: \"[\'#{\\\"\\\'}\']\";\ \n}\n"), ".result {\ \n output: \\\"\\\';\ \n output: \\\"\\\';\ \n output: \"[\\\\\\\"\\\\\']\";\ \n output: \"\\\\\\\"\\\\\'\";\ \n output: \"\\\\\\\"\\\\\'\";\ \n output: \"[\'\\\\\\\"\\\\\'\']\";\ \n}\n" ); } t02_variable.rs000066400000000000000000000015531474765622100350240ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t26_escaped_literal_quotes//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/26_escaped_literal_quotes/02_variable.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("02_variable") } #[test] fn test() { assert_eq!( runner().ok("$input: \\\"\\\';\ \n.result {\ \n output: $input;\ \n output: #{$input};\ \n output: \"[#{$input}]\";\ \n output: \"#{$input}\";\ \n output: \'#{$input}\';\ \n output: \"[\'#{$input}\']\";\ \n}\n"), ".result {\ \n output: \\\"\\\';\ \n output: \\\"\\\';\ \n output: \"[\\\\\\\"\\\\\']\";\ \n output: \"\\\\\\\"\\\\\'\";\ \n output: \"\\\\\\\"\\\\\'\";\ \n output: \"[\'\\\\\\\"\\\\\'\']\";\ \n}\n" ); } t03_inline_double.rs000066400000000000000000000014021474765622100360410ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t26_escaped_literal_quotes//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/26_escaped_literal_quotes/03_inline_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("03_inline_double") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: #{#{\\\"\\\'}};\ \n output: #{\"[#{\\\"\\\'}]\"};\ \n output: #{\"#{\\\"\\\'}\"};\ \n output: #{\'#{\\\"\\\'}\'};\ \n output: #{\"[\'#{\\\"\\\'}\']\"};\ \n}\n"), ".result {\ \n output: \\\"\\\';\ \n output: [\\\"\\\'];\ \n output: \\\"\\\';\ \n output: \\\"\\\';\ \n output: [\'\\\"\\\'\'];\ \n}\n" ); } t04_variable_double.rs000066400000000000000000000014361474765622100363600ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t26_escaped_literal_quotes//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/26_escaped_literal_quotes/04_variable_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("04_variable_double") } #[test] fn test() { assert_eq!( runner().ok("$input: \\\"\\\';\ \n.result {\ \n output: #{#{$input}};\ \n output: #{\"[#{$input}]\"};\ \n output: #{\"#{$input}\"};\ \n output: #{\'#{$input}\'};\ \n output: #{\"[\'#{$input}\']\"};\ \n}\n"), ".result {\ \n output: \\\"\\\';\ \n output: [\\\"\\\'];\ \n output: \\\"\\\';\ \n output: \\\"\\\';\ \n output: [\'\\\"\\\'\'];\ \n}\n" ); } t05_variable_quoted_double.rs000066400000000000000000000025241474765622100377410ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t26_escaped_literal_quotes//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/26_escaped_literal_quotes/05_variable_quoted_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("05_variable_quoted_double") } #[test] fn test() { assert_eq!( runner().ok("$input: \\\"\\\';\ \n.result {\ \n dquoted: \"#{#{$input}}\";\ \n dquoted: \"#{\"[#{$input}]\"}\";\ \n dquoted: \"#{\"#{$input}\"}\";\ \n dquoted: \"#{\'#{$input}\'}\";\ \n dquoted: \"#{\"[\'#{$input}\']\"}\";\ \n squoted: \'#{#{$input}}\';\ \n squoted: \'#{\"[#{$input}]\"}\';\ \n squoted: \'#{\"#{$input}\"}\';\ \n squoted: \'#{\'#{$input}\'}\';\ \n squoted: \'#{\"[\'#{$input}\']\"}\';\ \n}\n"), ".result {\ \n dquoted: \"\\\\\\\"\\\\\'\";\ \n dquoted: \"[\\\\\\\"\\\\\']\";\ \n dquoted: \"\\\\\\\"\\\\\'\";\ \n dquoted: \"\\\\\\\"\\\\\'\";\ \n dquoted: \"[\'\\\\\\\"\\\\\'\']\";\ \n squoted: \"\\\\\\\"\\\\\'\";\ \n squoted: \"[\\\\\\\"\\\\\']\";\ \n squoted: \"\\\\\\\"\\\\\'\";\ \n squoted: \"\\\\\\\"\\\\\'\";\ \n squoted: \"[\'\\\\\\\"\\\\\'\']\";\ \n}\n" ); } t06_escape_interpolation.rs000066400000000000000000000013701474765622100374470ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t26_escaped_literal_quotes//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/26_escaped_literal_quotes/06_escape_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("06_escape_interpolation") } #[test] fn test() { assert_eq!( runner().ok("$input: \\\"\\\';\ \n.result {\ \n output: \"[\\#{\\\"\\\'}]\";\ \n output: \"\\#{\\\"\\\'}\";\ \n output: \'\\#{\\\"\\\'}\';\ \n output: \"[\'\\#{\\\"\\\'}\']\";\ \n}\n"), ".result {\ \n output: \"[#{\\\"\'}]\";\ \n output: \"#{\\\"\'}\";\ \n output: \"#{\\\"\'}\";\ \n output: \"[\'#{\\\"\'}\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t27_escaped_double_quotes/000077500000000000000000000000001474765622100320765ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t27_escaped_double_quotes/mod.rs000066400000000000000000000005601474765622100332240ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/27_escaped_double_quotes" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("27_escaped_double_quotes") } mod t01_inline; mod t02_variable; mod t03_inline_double; mod t04_variable_double; mod t05_variable_quoted_double; mod t06_escape_interpolation; t01_inline.rs000066400000000000000000000014321474765622100343270ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t27_escaped_double_quotes//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/27_escaped_double_quotes/01_inline.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("01_inline") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: \"\\\"\";\ \n output: #{\"\\\"\"};\ \n output: \"[#{\"\\\"\"}]\";\ \n output: \"#{\"\\\"\"}\";\ \n output: \'#{\"\\\"\"}\';\ \n output: \"[\'#{\"\\\"\"}\']\";\ \n}\n"), ".result {\ \n output: \'\"\';\ \n output: \";\ \n output: \'[\"]\';\ \n output: \'\"\';\ \n output: \'\"\';\ \n output: \"[\'\\\"\']\";\ \n}\n" ); } t02_variable.rs000066400000000000000000000014641474765622100346440ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t27_escaped_double_quotes//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/27_escaped_double_quotes/02_variable.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("02_variable") } #[test] fn test() { assert_eq!( runner().ok("$input: \"\\\"\";\ \n.result {\ \n output: $input;\ \n output: #{$input};\ \n output: \"[#{$input}]\";\ \n output: \"#{$input}\";\ \n output: \'#{$input}\';\ \n output: \"[\'#{$input}\']\";\ \n}\n"), ".result {\ \n output: \'\"\';\ \n output: \";\ \n output: \'[\"]\';\ \n output: \'\"\';\ \n output: \'\"\';\ \n output: \"[\'\\\"\']\";\ \n}\n" ); } t03_inline_double.rs000066400000000000000000000013431474765622100356640ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t27_escaped_double_quotes//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/27_escaped_double_quotes/03_inline_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("03_inline_double") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: #{#{\"\\\"\"}};\ \n output: #{\"[#{\"\\\"\"}]\"};\ \n output: #{\"#{\"\\\"\"}\"};\ \n output: #{\'#{\"\\\"\"}\'};\ \n output: #{\"[\'#{\"\\\"\"}\']\"};\ \n}\n"), ".result {\ \n output: \";\ \n output: [\"];\ \n output: \";\ \n output: \";\ \n output: [\'\"\'];\ \n}\n" ); } t04_variable_double.rs000066400000000000000000000013771474765622100362030ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t27_escaped_double_quotes//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/27_escaped_double_quotes/04_variable_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("04_variable_double") } #[test] fn test() { assert_eq!( runner().ok("$input: \"\\\"\";\ \n.result {\ \n output: #{#{$input}};\ \n output: #{\"[#{$input}]\"};\ \n output: #{\"#{$input}\"};\ \n output: #{\'#{$input}\'};\ \n output: #{\"[\'#{$input}\']\"};\ \n}\n"), ".result {\ \n output: \";\ \n output: [\"];\ \n output: \";\ \n output: \";\ \n output: [\'\"\'];\ \n}\n" ); } t05_variable_quoted_double.rs000066400000000000000000000023371474765622100375620ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t27_escaped_double_quotes//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/27_escaped_double_quotes/05_variable_quoted_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("05_variable_quoted_double") } #[test] fn test() { assert_eq!( runner().ok("$input: \"\\\"\";\ \n.result {\ \n dquoted: \"#{#{$input}}\";\ \n dquoted: \"#{\"[#{$input}]\"}\";\ \n dquoted: \"#{\"#{$input}\"}\";\ \n dquoted: \"#{\'#{$input}\'}\";\ \n dquoted: \"#{\"[\'#{$input}\']\"}\";\ \n squoted: \'#{#{$input}}\';\ \n squoted: \'#{\"[#{$input}]\"}\';\ \n squoted: \'#{\"#{$input}\"}\';\ \n squoted: \'#{\'#{$input}\'}\';\ \n squoted: \'#{\"[\'#{$input}\']\"}\';\ \n}\n"), ".result {\ \n dquoted: \'\"\';\ \n dquoted: \'[\"]\';\ \n dquoted: \'\"\';\ \n dquoted: \'\"\';\ \n dquoted: \"[\'\\\"\']\";\ \n squoted: \'\"\';\ \n squoted: \'[\"]\';\ \n squoted: \'\"\';\ \n squoted: \'\"\';\ \n squoted: \"[\'\\\"\']\";\ \n}\n" ); } t06_escape_interpolation.rs000066400000000000000000000014031474765622100372630ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t27_escaped_double_quotes//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/27_escaped_double_quotes/06_escape_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("06_escape_interpolation") } #[test] fn test() { assert_eq!( runner().ok("$input: \"\\\"\";\ \n.result {\ \n output: \"[\\#{\"\\\"\"}]\";\ \n output: \"\\#{\"\\\"\"}\";\ \n output: \'\\#{\"\\\"\"}\';\ \n output: \"[\'\\#{\"\\\"\"}\']\";\ \n}\n"), ".result {\ \n output: \"[#{\" \\\" \"}]\";\ \n output: \"#{\" \\\" \"}\";\ \n output: \'#{\"\"\"}\';\ \n output: \"[\'#{\" \\\" \"}\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t28_escaped_single_quotes/000077500000000000000000000000001474765622100321065ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t28_escaped_single_quotes/mod.rs000066400000000000000000000005601474765622100332340ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/28_escaped_single_quotes" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("28_escaped_single_quotes") } mod t01_inline; mod t02_variable; mod t03_inline_double; mod t04_variable_double; mod t05_variable_quoted_double; mod t06_escape_interpolation; t01_inline.rs000066400000000000000000000014301474765622100343350ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t28_escaped_single_quotes//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/28_escaped_single_quotes/01_inline.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("01_inline") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: \'\\\'\';\ \n output: #{\'\\\'\'};\ \n output: \"[#{\'\\\'\'}]\";\ \n output: \"#{\'\\\'\'}\";\ \n output: \'#{\'\\\'\'}\';\ \n output: \"[\'#{\'\\\'\'}\']\";\ \n}\n"), ".result {\ \n output: \"\'\";\ \n output: \';\ \n output: \"[\']\";\ \n output: \"\'\";\ \n output: \"\'\";\ \n output: \"[\'\'\']\";\ \n}\n" ); } t02_variable.rs000066400000000000000000000014621474765622100346520ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t28_escaped_single_quotes//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/28_escaped_single_quotes/02_variable.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("02_variable") } #[test] fn test() { assert_eq!( runner().ok("$input: \'\\\'\';\ \n.result {\ \n output: $input;\ \n output: #{$input};\ \n output: \"[#{$input}]\";\ \n output: \"#{$input}\";\ \n output: \'#{$input}\';\ \n output: \"[\'#{$input}\']\";\ \n}\n"), ".result {\ \n output: \"\'\";\ \n output: \';\ \n output: \"[\']\";\ \n output: \"\'\";\ \n output: \"\'\";\ \n output: \"[\'\'\']\";\ \n}\n" ); } t03_inline_double.rs000066400000000000000000000013431474765622100356740ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t28_escaped_single_quotes//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/28_escaped_single_quotes/03_inline_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("03_inline_double") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: #{#{\'\\\'\'}};\ \n output: #{\"[#{\'\\\'\'}]\"};\ \n output: #{\"#{\'\\\'\'}\"};\ \n output: #{\'#{\'\\\'\'}\'};\ \n output: #{\"[\'#{\'\\\'\'}\']\"};\ \n}\n"), ".result {\ \n output: \';\ \n output: [\'];\ \n output: \';\ \n output: \';\ \n output: [\'\'\'];\ \n}\n" ); } t04_variable_double.rs000066400000000000000000000013771474765622100362130ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t28_escaped_single_quotes//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/28_escaped_single_quotes/04_variable_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("04_variable_double") } #[test] fn test() { assert_eq!( runner().ok("$input: \'\\\'\';\ \n.result {\ \n output: #{#{$input}};\ \n output: #{\"[#{$input}]\"};\ \n output: #{\"#{$input}\"};\ \n output: #{\'#{$input}\'};\ \n output: #{\"[\'#{$input}\']\"};\ \n}\n"), ".result {\ \n output: \';\ \n output: [\'];\ \n output: \';\ \n output: \';\ \n output: [\'\'\'];\ \n}\n" ); } t05_variable_quoted_double.rs000066400000000000000000000023331474765622100375660ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t28_escaped_single_quotes//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/28_escaped_single_quotes/05_variable_quoted_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("05_variable_quoted_double") } #[test] fn test() { assert_eq!( runner().ok("$input: \'\\\'\';\ \n.result {\ \n dquoted: \"#{#{$input}}\";\ \n dquoted: \"#{\"[#{$input}]\"}\";\ \n dquoted: \"#{\"#{$input}\"}\";\ \n dquoted: \"#{\'#{$input}\'}\";\ \n dquoted: \"#{\"[\'#{$input}\']\"}\";\ \n squoted: \'#{#{$input}}\';\ \n squoted: \'#{\"[#{$input}]\"}\';\ \n squoted: \'#{\"#{$input}\"}\';\ \n squoted: \'#{\'#{$input}\'}\';\ \n squoted: \'#{\"[\'#{$input}\']\"}\';\ \n}\n"), ".result {\ \n dquoted: \"\'\";\ \n dquoted: \"[\']\";\ \n dquoted: \"\'\";\ \n dquoted: \"\'\";\ \n dquoted: \"[\'\'\']\";\ \n squoted: \"\'\";\ \n squoted: \"[\']\";\ \n squoted: \"\'\";\ \n squoted: \"\'\";\ \n squoted: \"[\'\'\']\";\ \n}\n" ); } t06_escape_interpolation.rs000066400000000000000000000013731474765622100373010ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t28_escaped_single_quotes//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/28_escaped_single_quotes/06_escape_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("06_escape_interpolation") } #[test] fn test() { assert_eq!( runner().ok("$input: \'\\\'\';\ \n.result {\ \n output: \"[\\#{\'\\\'\'}]\";\ \n output: \"\\#{\'\\\'\'}\";\ \n output: \'\\#{\'\\\'\'}\';\ \n output: \"[\'\\#{\'\\\'\'}\']\";\ \n}\n"), ".result {\ \n output: \"[#{\'\'\'}]\";\ \n output: \"#{\'\'\'}\";\ \n output: \"#{\" \\\' \"}\";\ \n output: \"[\'#{\'\'\'}\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t29_binary_operation/000077500000000000000000000000001474765622100311065ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t29_binary_operation/mod.rs000066400000000000000000000005461474765622100322400ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/29_binary_operation" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("29_binary_operation") } mod t01_inline; mod t02_variable; mod t03_inline_double; mod t04_variable_double; mod t05_variable_quoted_double; mod t06_escape_interpolation; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t29_binary_operation/t01_inline.rs000066400000000000000000000016571474765622100334270ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/29_binary_operation/01_inline.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("01_inline") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: \"foo#{\'ba\' + \'r\'}baz\";\ \n output: #{\"foo#{\'ba\' + \'r\'}baz\"};\ \n output: \"[#{\"foo#{\'ba\' + \'r\'}baz\"}]\";\ \n output: \"#{\"foo#{\'ba\' + \'r\'}baz\"}\";\ \n output: \'#{\"foo#{\'ba\' + \'r\'}baz\"}\';\ \n output: \"[\'#{\"foo#{\'ba\' + \'r\'}baz\"}\']\";\ \n}\n"), ".result {\ \n output: \"foobarbaz\";\ \n output: foobarbaz;\ \n output: \"[foobarbaz]\";\ \n output: \"foobarbaz\";\ \n output: \"foobarbaz\";\ \n output: \"[\'foobarbaz\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t29_binary_operation/t02_variable.rs000066400000000000000000000015521474765622100337310ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/29_binary_operation/02_variable.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("02_variable") } #[test] fn test() { assert_eq!( runner().ok("$input: \"foo#{\'ba\' + \'r\'}baz\";\ \n.result {\ \n output: $input;\ \n output: #{$input};\ \n output: \"[#{$input}]\";\ \n output: \"#{$input}\";\ \n output: \'#{$input}\';\ \n output: \"[\'#{$input}\']\";\ \n}\n"), ".result {\ \n output: \"foobarbaz\";\ \n output: foobarbaz;\ \n output: \"[foobarbaz]\";\ \n output: \"foobarbaz\";\ \n output: \"foobarbaz\";\ \n output: \"[\'foobarbaz\']\";\ \n}\n" ); } t03_inline_double.rs000066400000000000000000000015401474765622100346730ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t29_binary_operation//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/29_binary_operation/03_inline_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("03_inline_double") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: #{#{\"foo#{\'ba\' + \'r\'}baz\"}};\ \n output: #{\"[#{\"foo#{\'ba\' + \'r\'}baz\"}]\"};\ \n output: #{\"#{\"foo#{\'ba\' + \'r\'}baz\"}\"};\ \n output: #{\'#{\"foo#{\'ba\' + \'r\'}baz\"}\'};\ \n output: #{\"[\'#{\"foo#{\'ba\' + \'r\'}baz\"}\']\"};\ \n}\n"), ".result {\ \n output: foobarbaz;\ \n output: [foobarbaz];\ \n output: foobarbaz;\ \n output: foobarbaz;\ \n output: [\'foobarbaz\'];\ \n}\n" ); } t04_variable_double.rs000066400000000000000000000014601474765622100352040ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t29_binary_operation//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/29_binary_operation/04_variable_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("04_variable_double") } #[test] fn test() { assert_eq!( runner().ok("$input: \"foo#{\'ba\' + \'r\'}baz\";\ \n.result {\ \n output: #{#{$input}};\ \n output: #{\"[#{$input}]\"};\ \n output: #{\"#{$input}\"};\ \n output: #{\'#{$input}\'};\ \n output: #{\"[\'#{$input}\']\"};\ \n}\n"), ".result {\ \n output: foobarbaz;\ \n output: [foobarbaz];\ \n output: foobarbaz;\ \n output: foobarbaz;\ \n output: [\'foobarbaz\'];\ \n}\n" ); } t05_variable_quoted_double.rs000066400000000000000000000024571474765622100365750ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t29_binary_operation//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/29_binary_operation/05_variable_quoted_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("05_variable_quoted_double") } #[test] fn test() { assert_eq!( runner().ok("$input: \"foo#{\'ba\' + \'r\'}baz\";\ \n.result {\ \n dquoted: \"#{#{$input}}\";\ \n dquoted: \"#{\"[#{$input}]\"}\";\ \n dquoted: \"#{\"#{$input}\"}\";\ \n dquoted: \"#{\'#{$input}\'}\";\ \n dquoted: \"#{\"[\'#{$input}\']\"}\";\ \n squoted: \'#{#{$input}}\';\ \n squoted: \'#{\"[#{$input}]\"}\';\ \n squoted: \'#{\"#{$input}\"}\';\ \n squoted: \'#{\'#{$input}\'}\';\ \n squoted: \'#{\"[\'#{$input}\']\"}\';\ \n}\n"), ".result {\ \n dquoted: \"foobarbaz\";\ \n dquoted: \"[foobarbaz]\";\ \n dquoted: \"foobarbaz\";\ \n dquoted: \"foobarbaz\";\ \n dquoted: \"[\'foobarbaz\']\";\ \n squoted: \"foobarbaz\";\ \n squoted: \"[foobarbaz]\";\ \n squoted: \"foobarbaz\";\ \n squoted: \"foobarbaz\";\ \n squoted: \"[\'foobarbaz\']\";\ \n}\n" ); } t06_escape_interpolation.rs000066400000000000000000000015631474765622100363020ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t29_binary_operation//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/29_binary_operation/06_escape_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("06_escape_interpolation") } #[test] fn test() { assert_eq!( runner().ok("$input: \"foo#{\'ba\' + \'r\'}baz\";\ \n.result {\ \n output: \"[\\#{\"foo#{\'ba\' + \'r\'}baz\"}]\";\ \n output: \"\\#{\"foo#{\'ba\' + \'r\'}baz\"}\";\ \n output: \'\\#{\"foo#{\'ba\' + \'r\'}baz\"}\';\ \n output: \"[\'\\#{\"foo#{\'ba\' + \'r\'}baz\"}\']\";\ \n}\n"), ".result {\ \n output: \"[#{\" foobarbaz \"}]\";\ \n output: \"#{\" foobarbaz \"}\";\ \n output: \'#{\"foobarbaz\"}\';\ \n output: \"[\'#{\" foobarbaz \"}\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t30_base_test/000077500000000000000000000000001474765622100275035ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t30_base_test/mod.rs000066400000000000000000000005301474765622100306260ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/30_base_test" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("30_base_test") } mod t01_inline; mod t02_variable; mod t03_inline_double; mod t04_variable_double; mod t05_variable_quoted_double; mod t06_escape_interpolation; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t30_base_test/t01_inline.rs000066400000000000000000000016501474765622100320150ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/30_base_test/01_inline.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("01_inline") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: \"foo#{\'ba\' + \'r\'}baz\";\ \n output: #{\"foo#{\'ba\' + \'r\'}baz\"};\ \n output: \"[#{\"foo#{\'ba\' + \'r\'}baz\"}]\";\ \n output: \"#{\"foo#{\'ba\' + \'r\'}baz\"}\";\ \n output: \'#{\"foo#{\'ba\' + \'r\'}baz\"}\';\ \n output: \"[\'#{\"foo#{\'ba\' + \'r\'}baz\"}\']\";\ \n}\n"), ".result {\ \n output: \"foobarbaz\";\ \n output: foobarbaz;\ \n output: \"[foobarbaz]\";\ \n output: \"foobarbaz\";\ \n output: \"foobarbaz\";\ \n output: \"[\'foobarbaz\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t30_base_test/t02_variable.rs000066400000000000000000000015431474765622100323260ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/30_base_test/02_variable.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("02_variable") } #[test] fn test() { assert_eq!( runner().ok("$input: \"foo#{\'ba\' + \'r\'}baz\";\ \n.result {\ \n output: $input;\ \n output: #{$input};\ \n output: \"[#{$input}]\";\ \n output: \"#{$input}\";\ \n output: \'#{$input}\';\ \n output: \"[\'#{$input}\']\";\ \n}\n"), ".result {\ \n output: \"foobarbaz\";\ \n output: foobarbaz;\ \n output: \"[foobarbaz]\";\ \n output: \"foobarbaz\";\ \n output: \"foobarbaz\";\ \n output: \"[\'foobarbaz\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t30_base_test/t03_inline_double.rs000066400000000000000000000015311474765622100333470ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/30_base_test/03_inline_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("03_inline_double") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: #{#{\"foo#{\'ba\' + \'r\'}baz\"}};\ \n output: #{\"[#{\"foo#{\'ba\' + \'r\'}baz\"}]\"};\ \n output: #{\"#{\"foo#{\'ba\' + \'r\'}baz\"}\"};\ \n output: #{\'#{\"foo#{\'ba\' + \'r\'}baz\"}\'};\ \n output: #{\"[\'#{\"foo#{\'ba\' + \'r\'}baz\"}\']\"};\ \n}\n"), ".result {\ \n output: foobarbaz;\ \n output: [foobarbaz];\ \n output: foobarbaz;\ \n output: foobarbaz;\ \n output: [\'foobarbaz\'];\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t30_base_test/t04_variable_double.rs000066400000000000000000000014511474765622100336600ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/30_base_test/04_variable_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("04_variable_double") } #[test] fn test() { assert_eq!( runner().ok("$input: \"foo#{\'ba\' + \'r\'}baz\";\ \n.result {\ \n output: #{#{$input}};\ \n output: #{\"[#{$input}]\"};\ \n output: #{\"#{$input}\"};\ \n output: #{\'#{$input}\'};\ \n output: #{\"[\'#{$input}\']\"};\ \n}\n"), ".result {\ \n output: foobarbaz;\ \n output: [foobarbaz];\ \n output: foobarbaz;\ \n output: foobarbaz;\ \n output: [\'foobarbaz\'];\ \n}\n" ); } t05_variable_quoted_double.rs000066400000000000000000000024501474765622100351630ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t30_base_test//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/30_base_test/05_variable_quoted_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("05_variable_quoted_double") } #[test] fn test() { assert_eq!( runner().ok("$input: \"foo#{\'ba\' + \'r\'}baz\";\ \n.result {\ \n dquoted: \"#{#{$input}}\";\ \n dquoted: \"#{\"[#{$input}]\"}\";\ \n dquoted: \"#{\"#{$input}\"}\";\ \n dquoted: \"#{\'#{$input}\'}\";\ \n dquoted: \"#{\"[\'#{$input}\']\"}\";\ \n squoted: \'#{#{$input}}\';\ \n squoted: \'#{\"[#{$input}]\"}\';\ \n squoted: \'#{\"#{$input}\"}\';\ \n squoted: \'#{\'#{$input}\'}\';\ \n squoted: \'#{\"[\'#{$input}\']\"}\';\ \n}\n"), ".result {\ \n dquoted: \"foobarbaz\";\ \n dquoted: \"[foobarbaz]\";\ \n dquoted: \"foobarbaz\";\ \n dquoted: \"foobarbaz\";\ \n dquoted: \"[\'foobarbaz\']\";\ \n squoted: \"foobarbaz\";\ \n squoted: \"[foobarbaz]\";\ \n squoted: \"foobarbaz\";\ \n squoted: \"foobarbaz\";\ \n squoted: \"[\'foobarbaz\']\";\ \n}\n" ); } t06_escape_interpolation.rs000066400000000000000000000015541474765622100346770ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t30_base_test//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/30_base_test/06_escape_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("06_escape_interpolation") } #[test] fn test() { assert_eq!( runner().ok("$input: \"foo#{\'ba\' + \'r\'}baz\";\ \n.result {\ \n output: \"[\\#{\"foo#{\'ba\' + \'r\'}baz\"}]\";\ \n output: \"\\#{\"foo#{\'ba\' + \'r\'}baz\"}\";\ \n output: \'\\#{\"foo#{\'ba\' + \'r\'}baz\"}\';\ \n output: \"[\'\\#{\"foo#{\'ba\' + \'r\'}baz\"}\']\";\ \n}\n"), ".result {\ \n output: \"[#{\" foobarbaz \"}]\";\ \n output: \"#{\" foobarbaz \"}\";\ \n output: \'#{\"foobarbaz\"}\';\ \n output: \"[\'#{\" foobarbaz \"}\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t31_schema_simple/000077500000000000000000000000001474765622100303445ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t31_schema_simple/mod.rs000066400000000000000000000005011474765622100314650ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/31_schema_simple" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("31_schema_simple") } mod t01_inline; mod t02_variable; mod t03_inline_double; mod t04_variable_double; mod t05_variable_quoted_double; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t31_schema_simple/t01_inline.rs000066400000000000000000000015541474765622100326610ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/31_schema_simple/01_inline.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("01_inline") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: \"[\"\'foo\'\"]\";\ \n output: #{\"[\"\'foo\'\"]\"};\ \n output: \"[#{\"[\"\'foo\'\"]\"}]\";\ \n output: \"#{\"[\"\'foo\'\"]\"}\";\ \n output: \'#{\"[\"\'foo\'\"]\"}\';\ \n output: \"[\'#{\"[\"\'foo\'\"]\"}\']\";\ \n}\n"), ".result {\ \n output: \"[\" \"foo\" \"]\";\ \n output: [ foo ];\ \n output: \"[[ foo ]]\";\ \n output: \"[ foo ]\";\ \n output: \"[ foo ]\";\ \n output: \"[\'[ foo ]\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t31_schema_simple/t02_variable.rs000066400000000000000000000015311474765622100331640ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/31_schema_simple/02_variable.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("02_variable") } #[test] fn test() { assert_eq!( runner().ok("$input: \"[\"\'foo\'\"]\";\ \n.result {\ \n output: $input;\ \n output: #{$input};\ \n output: \"[#{$input}]\";\ \n output: \"#{$input}\";\ \n output: \'#{$input}\';\ \n output: \"[\'#{$input}\']\";\ \n}\n"), ".result {\ \n output: \"[\" \"foo\" \"]\";\ \n output: [ foo ];\ \n output: \"[[ foo ]]\";\ \n output: \"[ foo ]\";\ \n output: \"[ foo ]\";\ \n output: \"[\'[ foo ]\']\";\ \n}\n" ); } t03_inline_double.rs000066400000000000000000000014411474765622100341310ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t31_schema_simple//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/31_schema_simple/03_inline_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("03_inline_double") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: #{#{\"[\"\'foo\'\"]\"}};\ \n output: #{\"[#{\"[\"\'foo\'\"]\"}]\"};\ \n output: #{\"#{\"[\"\'foo\'\"]\"}\"};\ \n output: #{\'#{\"[\"\'foo\'\"]\"}\'};\ \n output: #{\"[\'#{\"[\"\'foo\'\"]\"}\']\"};\ \n}\n"), ".result {\ \n output: [ foo ];\ \n output: [[ foo ]];\ \n output: [ foo ];\ \n output: [ foo ];\ \n output: [\'[ foo ]\'];\ \n}\n" ); } t04_variable_double.rs000066400000000000000000000014311474765622100344400ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t31_schema_simple//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/31_schema_simple/04_variable_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("04_variable_double") } #[test] fn test() { assert_eq!( runner().ok("$input: \"[\"\'foo\'\"]\";\ \n.result {\ \n output: #{#{$input}};\ \n output: #{\"[#{$input}]\"};\ \n output: #{\"#{$input}\"};\ \n output: #{\'#{$input}\'};\ \n output: #{\"[\'#{$input}\']\"};\ \n}\n"), ".result {\ \n output: [ foo ];\ \n output: [[ foo ]];\ \n output: [ foo ];\ \n output: [ foo ];\ \n output: [\'[ foo ]\'];\ \n}\n" ); } t05_variable_quoted_double.rs000066400000000000000000000024161474765622100360260ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t31_schema_simple//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/31_schema_simple/05_variable_quoted_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("05_variable_quoted_double") } #[test] fn test() { assert_eq!( runner().ok("$input: \"[\"\'foo\'\"]\";\ \n.result {\ \n dquoted: \"#{#{$input}}\";\ \n dquoted: \"#{\"[#{$input}]\"}\";\ \n dquoted: \"#{\"#{$input}\"}\";\ \n dquoted: \"#{\'#{$input}\'}\";\ \n dquoted: \"#{\"[\'#{$input}\']\"}\";\ \n squoted: \'#{#{$input}}\';\ \n squoted: \'#{\"[#{$input}]\"}\';\ \n squoted: \'#{\"#{$input}\"}\';\ \n squoted: \'#{\'#{$input}\'}\';\ \n squoted: \'#{\"[\'#{$input}\']\"}\';\ \n}\n"), ".result {\ \n dquoted: \"[ foo ]\";\ \n dquoted: \"[[ foo ]]\";\ \n dquoted: \"[ foo ]\";\ \n dquoted: \"[ foo ]\";\ \n dquoted: \"[\'[ foo ]\']\";\ \n squoted: \"[ foo ]\";\ \n squoted: \"[[ foo ]]\";\ \n squoted: \"[ foo ]\";\ \n squoted: \"[ foo ]\";\ \n squoted: \"[\'[ foo ]\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t32_comma_list/000077500000000000000000000000001474765622100276635ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t32_comma_list/mod.rs000066400000000000000000000004731474765622100310140ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/32_comma_list" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("32_comma_list") } mod t01_inline; mod t02_variable; mod t03_inline_double; mod t04_variable_double; mod t05_variable_quoted_double; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t32_comma_list/t01_inline.rs000066400000000000000000000016451474765622100322010ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/32_comma_list/01_inline.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("01_inline") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: \"[\"\',foo, \'\"]\";\ \n output: #{\"[\"\',foo, \'\"]\"};\ \n output: \"[#{\"[\"\',foo, \'\"]\"}]\";\ \n output: \"#{\"[\"\',foo, \'\"]\"}\";\ \n output: \'#{\"[\"\',foo, \'\"]\"}\';\ \n output: \"[\'#{\"[\"\',foo, \'\"]\"}\']\";\ \n}\n"), ".result {\ \n output: \"[\" \",foo, \" \"]\";\ \n output: [ ,foo, ];\ \n output: \"[[ ,foo, ]]\";\ \n output: \"[ ,foo, ]\";\ \n output: \"[ ,foo, ]\";\ \n output: \"[\'[ ,foo, ]\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t32_comma_list/t02_variable.rs000066400000000000000000000015711474765622100325070ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/32_comma_list/02_variable.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("02_variable") } #[test] fn test() { assert_eq!( runner().ok("$input: \"[\"\',foo, \'\"]\";\ \n.result {\ \n output: $input;\ \n output: #{$input};\ \n output: \"[#{$input}]\";\ \n output: \"#{$input}\";\ \n output: \'#{$input}\';\ \n output: \"[\'#{$input}\']\";\ \n}\n"), ".result {\ \n output: \"[\" \",foo, \" \"]\";\ \n output: [ ,foo, ];\ \n output: \"[[ ,foo, ]]\";\ \n output: \"[ ,foo, ]\";\ \n output: \"[ ,foo, ]\";\ \n output: \"[\'[ ,foo, ]\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t32_comma_list/t03_inline_double.rs000066400000000000000000000015201474765622100335250ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/32_comma_list/03_inline_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("03_inline_double") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: #{#{\"[\"\',foo, \'\"]\"}};\ \n output: #{\"[#{\"[\"\',foo, \'\"]\"}]\"};\ \n output: #{\"#{\"[\"\',foo, \'\"]\"}\"};\ \n output: #{\'#{\"[\"\',foo, \'\"]\"}\'};\ \n output: #{\"[\'#{\"[\"\',foo, \'\"]\"}\']\"};\ \n}\n"), ".result {\ \n output: [ ,foo, ];\ \n output: [[ ,foo, ]];\ \n output: [ ,foo, ];\ \n output: [ ,foo, ];\ \n output: [\'[ ,foo, ]\'];\ \n}\n" ); } t04_variable_double.rs000066400000000000000000000014641474765622100337650ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t32_comma_list//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/32_comma_list/04_variable_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("04_variable_double") } #[test] fn test() { assert_eq!( runner().ok("$input: \"[\"\',foo, \'\"]\";\ \n.result {\ \n output: #{#{$input}};\ \n output: #{\"[#{$input}]\"};\ \n output: #{\"#{$input}\"};\ \n output: #{\'#{$input}\'};\ \n output: #{\"[\'#{$input}\']\"};\ \n}\n"), ".result {\ \n output: [ ,foo, ];\ \n output: [[ ,foo, ]];\ \n output: [ ,foo, ];\ \n output: [ ,foo, ];\ \n output: [\'[ ,foo, ]\'];\ \n}\n" ); } t05_variable_quoted_double.rs000066400000000000000000000025021474765622100353410ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t32_comma_list//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/32_comma_list/05_variable_quoted_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("05_variable_quoted_double") } #[test] fn test() { assert_eq!( runner().ok("$input: \"[\"\',foo, \'\"]\";\ \n.result {\ \n dquoted: \"#{#{$input}}\";\ \n dquoted: \"#{\"[#{$input}]\"}\";\ \n dquoted: \"#{\"#{$input}\"}\";\ \n dquoted: \"#{\'#{$input}\'}\";\ \n dquoted: \"#{\"[\'#{$input}\']\"}\";\ \n squoted: \'#{#{$input}}\';\ \n squoted: \'#{\"[#{$input}]\"}\';\ \n squoted: \'#{\"#{$input}\"}\';\ \n squoted: \'#{\'#{$input}\'}\';\ \n squoted: \'#{\"[\'#{$input}\']\"}\';\ \n}\n"), ".result {\ \n dquoted: \"[ ,foo, ]\";\ \n dquoted: \"[[ ,foo, ]]\";\ \n dquoted: \"[ ,foo, ]\";\ \n dquoted: \"[ ,foo, ]\";\ \n dquoted: \"[\'[ ,foo, ]\']\";\ \n squoted: \"[ ,foo, ]\";\ \n squoted: \"[[ ,foo, ]]\";\ \n squoted: \"[ ,foo, ]\";\ \n squoted: \"[ ,foo, ]\";\ \n squoted: \"[\'[ ,foo, ]\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t33_space_list/000077500000000000000000000000001474765622100276635ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t33_space_list/mod.rs000066400000000000000000000004731474765622100310140ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/33_space_list" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("33_space_list") } mod t01_inline; mod t02_variable; mod t03_inline_double; mod t04_variable_double; mod t05_variable_quoted_double; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t33_space_list/t01_inline.rs000066400000000000000000000017531474765622100322010ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/33_space_list/01_inline.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("01_inline") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: \"[\"\'foo \'\"]\" \"bar\";\ \n output: #{\"[\"\'foo \'\"]\" \"bar\"};\ \n output: \"[#{\"[\"\'foo \'\"]\" \"bar\"}]\";\ \n output: \"#{\"[\"\'foo \'\"]\" \"bar\"}\";\ \n output: \'#{\"[\"\'foo \'\"]\" \"bar\"}\';\ \n output: \"[\'#{\"[\"\'foo \'\"]\" \"bar\"}\']\";\ \n}\n"), ".result {\ \n output: \"[\" \"foo \" \"]\" \"bar\";\ \n output: [ foo ] bar;\ \n output: \"[[ foo ] bar]\";\ \n output: \"[ foo ] bar\";\ \n output: \"[ foo ] bar\";\ \n output: \"[\'[ foo ] bar\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t33_space_list/t02_variable.rs000066400000000000000000000016221474765622100325040ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/33_space_list/02_variable.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("02_variable") } #[test] fn test() { assert_eq!( runner().ok("$input: \"[\"\'foo \'\"]\" \"bar\";\ \n.result {\ \n output: $input;\ \n output: #{$input};\ \n output: \"[#{$input}]\";\ \n output: \"#{$input}\";\ \n output: \'#{$input}\';\ \n output: \"[\'#{$input}\']\";\ \n}\n"), ".result {\ \n output: \"[\" \"foo \" \"]\" \"bar\";\ \n output: [ foo ] bar;\ \n output: \"[[ foo ] bar]\";\ \n output: \"[ foo ] bar\";\ \n output: \"[ foo ] bar\";\ \n output: \"[\'[ foo ] bar\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t33_space_list/t03_inline_double.rs000066400000000000000000000016071474765622100335330ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/33_space_list/03_inline_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("03_inline_double") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: #{#{\"[\"\'foo \'\"]\" \"bar\"}};\ \n output: #{\"[#{\"[\"\'foo \'\"]\" \"bar\"}]\"};\ \n output: #{\"#{\"[\"\'foo \'\"]\" \"bar\"}\"};\ \n output: #{\'#{\"[\"\'foo \'\"]\" \"bar\"}\'};\ \n output: #{\"[\'#{\"[\"\'foo \'\"]\" \"bar\"}\']\"};\ \n}\n"), ".result {\ \n output: [ foo ] bar;\ \n output: [[ foo ] bar];\ \n output: [ foo ] bar;\ \n output: [ foo ] bar;\ \n output: [\'[ foo ] bar\'];\ \n}\n" ); } t04_variable_double.rs000066400000000000000000000015071474765622100337630ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t33_space_list//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/33_space_list/04_variable_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("04_variable_double") } #[test] fn test() { assert_eq!( runner().ok("$input: \"[\"\'foo \'\"]\" \"bar\";\ \n.result {\ \n output: #{#{$input}};\ \n output: #{\"[#{$input}]\"};\ \n output: #{\"#{$input}\"};\ \n output: #{\'#{$input}\'};\ \n output: #{\"[\'#{$input}\']\"};\ \n}\n"), ".result {\ \n output: [ foo ] bar;\ \n output: [[ foo ] bar];\ \n output: [ foo ] bar;\ \n output: [ foo ] bar;\ \n output: [\'[ foo ] bar\'];\ \n}\n" ); } t05_variable_quoted_double.rs000066400000000000000000000025371474765622100353510ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t33_space_list//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/33_space_list/05_variable_quoted_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("05_variable_quoted_double") } #[test] fn test() { assert_eq!( runner().ok("$input: \"[\"\'foo \'\"]\" \"bar\";\ \n.result {\ \n dquoted: \"#{#{$input}}\";\ \n dquoted: \"#{\"[#{$input}]\"}\";\ \n dquoted: \"#{\"#{$input}\"}\";\ \n dquoted: \"#{\'#{$input}\'}\";\ \n dquoted: \"#{\"[\'#{$input}\']\"}\";\ \n squoted: \'#{#{$input}}\';\ \n squoted: \'#{\"[#{$input}]\"}\';\ \n squoted: \'#{\"#{$input}\"}\';\ \n squoted: \'#{\'#{$input}\'}\';\ \n squoted: \'#{\"[\'#{$input}\']\"}\';\ \n}\n"), ".result {\ \n dquoted: \"[ foo ] bar\";\ \n dquoted: \"[[ foo ] bar]\";\ \n dquoted: \"[ foo ] bar\";\ \n dquoted: \"[ foo ] bar\";\ \n dquoted: \"[\'[ foo ] bar\']\";\ \n squoted: \"[ foo ] bar\";\ \n squoted: \"[[ foo ] bar]\";\ \n squoted: \"[ foo ] bar\";\ \n squoted: \"[ foo ] bar\";\ \n squoted: \"[\'[ foo ] bar\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t34_mixed_list/000077500000000000000000000000001474765622100276775ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t34_mixed_list/mod.rs000066400000000000000000000004731474765622100310300ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/34_mixed_list" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("34_mixed_list") } mod t01_inline; mod t02_variable; mod t03_inline_double; mod t04_variable_double; mod t05_variable_quoted_double; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t34_mixed_list/t01_inline.rs000066400000000000000000000020471474765622100322120ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/34_mixed_list/01_inline.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("01_inline") } #[test] fn test() { assert_eq!( runner().ok(".result {\ \n output: \"[\"\',foo , \'\"]\" \"bar\";\ \n output: #{\"[\"\',foo , \'\"]\" \"bar\"};\ \n output: \"[#{\"[\"\',foo , \'\"]\" \"bar\"}]\";\ \n output: \"#{\"[\"\',foo , \'\"]\" \"bar\"}\";\ \n output: \'#{\"[\"\',foo , \'\"]\" \"bar\"}\';\ \n output: \"[\'#{\"[\"\',foo , \'\"]\" \"bar\"}\']\";\ \n}\n"), ".result {\ \n output: \"[\" \",foo , \" \"]\" \"bar\";\ \n output: [ ,foo , ] bar;\ \n output: \"[[ ,foo , ] bar]\";\ \n output: \"[ ,foo , ] bar\";\ \n output: \"[ ,foo , ] bar\";\ \n output: \"[\'[ ,foo , ] bar\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t34_mixed_list/t02_variable.rs000066400000000000000000000016651474765622100325270ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/34_mixed_list/02_variable.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("02_variable") } #[test] fn test() { assert_eq!( runner().ok("$input: \"[\"\',foo , \'\"]\" \"bar\";\ \n.result {\ \n output: $input;\ \n output: #{$input};\ \n output: \"[#{$input}]\";\ \n output: \"#{$input}\";\ \n output: \'#{$input}\';\ \n output: \"[\'#{$input}\']\";\ \n}\n"), ".result {\ \n output: \"[\" \",foo , \" \"]\" \"bar\";\ \n output: [ ,foo , ] bar;\ \n output: \"[[ ,foo , ] bar]\";\ \n output: \"[ ,foo , ] bar\";\ \n output: \"[ ,foo , ] bar\";\ \n output: \"[\'[ ,foo , ] bar\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t34_mixed_list/t03_inline_double.rs000066400000000000000000000017171474765622100335510ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/34_mixed_list/03_inline_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("03_inline_double") } #[test] fn test() { assert_eq!( runner().ok( ".result {\ \n output: #{#{\"[\"\',foo , \'\"]\" \"bar\"}};\ \n output: #{\"[#{\"[\"\',foo , \'\"]\" \"bar\"}]\"};\ \n output: #{\"#{\"[\"\',foo , \'\"]\" \"bar\"}\"};\ \n output: #{\'#{\"[\"\',foo , \'\"]\" \"bar\"}\'};\ \n output: #{\"[\'#{\"[\"\',foo , \'\"]\" \"bar\"}\']\"};\ \n}\n" ), ".result {\ \n output: [ ,foo , ] bar;\ \n output: [[ ,foo , ] bar];\ \n output: [ ,foo , ] bar;\ \n output: [ ,foo , ] bar;\ \n output: [\'[ ,foo , ] bar\'];\ \n}\n" ); } t04_variable_double.rs000066400000000000000000000015451474765622100340010ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t34_mixed_list//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/34_mixed_list/04_variable_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("04_variable_double") } #[test] fn test() { assert_eq!( runner().ok("$input: \"[\"\',foo , \'\"]\" \"bar\";\ \n.result {\ \n output: #{#{$input}};\ \n output: #{\"[#{$input}]\"};\ \n output: #{\"#{$input}\"};\ \n output: #{\'#{$input}\'};\ \n output: #{\"[\'#{$input}\']\"};\ \n}\n"), ".result {\ \n output: [ ,foo , ] bar;\ \n output: [[ ,foo , ] bar];\ \n output: [ ,foo , ] bar;\ \n output: [ ,foo , ] bar;\ \n output: [\'[ ,foo , ] bar\'];\ \n}\n" ); } t05_variable_quoted_double.rs000066400000000000000000000026261474765622100353640ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t34_mixed_list//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/34_mixed_list/05_variable_quoted_double.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("05_variable_quoted_double") } #[test] fn test() { assert_eq!( runner().ok("$input: \"[\"\',foo , \'\"]\" \"bar\";\ \n.result {\ \n dquoted: \"#{#{$input}}\";\ \n dquoted: \"#{\"[#{$input}]\"}\";\ \n dquoted: \"#{\"#{$input}\"}\";\ \n dquoted: \"#{\'#{$input}\'}\";\ \n dquoted: \"#{\"[\'#{$input}\']\"}\";\ \n squoted: \'#{#{$input}}\';\ \n squoted: \'#{\"[#{$input}]\"}\';\ \n squoted: \'#{\"#{$input}\"}\';\ \n squoted: \'#{\'#{$input}\'}\';\ \n squoted: \'#{\"[\'#{$input}\']\"}\';\ \n}\n"), ".result {\ \n dquoted: \"[ ,foo , ] bar\";\ \n dquoted: \"[[ ,foo , ] bar]\";\ \n dquoted: \"[ ,foo , ] bar\";\ \n dquoted: \"[ ,foo , ] bar\";\ \n dquoted: \"[\'[ ,foo , ] bar\']\";\ \n squoted: \"[ ,foo , ] bar\";\ \n squoted: \"[[ ,foo , ] bar]\";\ \n squoted: \"[ ,foo , ] bar\";\ \n squoted: \"[ ,foo , ] bar\";\ \n squoted: \"[\'[ ,foo , ] bar\']\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t44_selector/000077500000000000000000000000001474765622100273575ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t44_selector/colon_twice_todo.rs000066400000000000000000000013011474765622100332520ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/44_selector/colon_twice_todo.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("colon_twice_todo") } #[test] #[ignore] // missing error fn test() { assert_eq!( runner().err( "test {\ \n filter: progid:DXImageTransform.Microsoft.#{Alpha(opacity=20)};\ \n}\n" ), "Error: expected \"(\".\ \n ,\ \n2 | filter: progid:DXImageTransform.Microsoft.#{Alpha(opacity=20)};\ \n | ^\ \n \'\ \n input.scss 2:45 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t44_selector/double_escape/000077500000000000000000000000001474765622100321515ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t44_selector/double_escape/mod.rs000066400000000000000000000005211474765622100332740ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/44_selector/double_escape" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("double_escape") } mod t12_double_escaped_interpolated_value_todo; mod t22_double_escaped_interpolated_variable; mod t32_double_escaped_literal; t12_double_escaped_interpolated_value_todo.rs000066400000000000000000000007741474765622100430670ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t44_selector/double_escape//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/44_selector/double_escape/12_double_escaped_interpolated_value_todo.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("12_double_escaped_interpolated_value_todo") } #[test] fn test() { assert_eq!( runner().ok("$key: \'bar\';\ \n.test12#{\'\\\\@#{$key}\'} { content: \'1.2\'; }\n"), ".test12\\@bar {\ \n content: \"1.2\";\ \n}\n" ); } t22_double_escaped_interpolated_variable.rs000066400000000000000000000010341474765622100425020ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t44_selector/double_escape//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/44_selector/double_escape/22_double_escaped_interpolated_variable.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("22_double_escaped_interpolated_variable") } #[test] fn test() { assert_eq!( runner().ok("$key: \'bar\';\ \n$suffix2: \'\\\\@#{$key}\';\ \n.test22#{$suffix2} { content: \'2.2\'; }\n"), ".test22\\@bar {\ \n content: \"2.2\";\ \n}\n" ); } t32_double_escaped_literal.rs000066400000000000000000000006711474765622100376060ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t44_selector/double_escape//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/44_selector/double_escape/32_double_escaped_literal.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("32_double_escaped_literal") } #[test] fn test() { assert_eq!( runner().ok(".test32#{\'\\\\@baz\'} { content: \'3.2\'; }\n"), ".test32\\@baz {\ \n content: \"3.2\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t44_selector/mod.rs000066400000000000000000000004041474765622100305020ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/44_selector" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("44_selector") } mod colon_twice_todo; mod double_escape; mod todo_single_escape; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t44_selector/todo_single_escape/000077500000000000000000000000001474765622100332055ustar00rootroot00000000000000mod.rs000066400000000000000000000005011474765622100342470ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t44_selector/todo_single_escape//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/44_selector/todo_single_escape" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("todo_single_escape") } mod t11_escaped_interpolated_value; mod t21_escaped_interpolated_variable; mod t31_escaped_literal; t11_escaped_interpolated_value.rs000066400000000000000000000014511474765622100415340ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t44_selector/todo_single_escape//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/44_selector/todo_single_escape/11_escaped_interpolated_value.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("11_escaped_interpolated_value") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "$key: \'bar\';\ \n.test11#{\'\\@#{$key}\'} { content: \'1.1\'; }\n" ), "Error: expected selector.\ \n ,--> input.scss\ \n2 | .test11#{\'\\@#{$key}\'} { content: \'1.1\'; }\ \n | ^^^^^^^^^^^ \ \n \'\ \n ,\ \n1 | .test11@bar \ \n | = error in interpolated output\ \n \'\ \n input.scss 2:10 root stylesheet", ); } t21_escaped_interpolated_variable.rs000066400000000000000000000015121474765622100422040ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t44_selector/todo_single_escape//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/44_selector/todo_single_escape/21_escaped_interpolated_variable.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("21_escaped_interpolated_variable") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "$key: \'bar\';\ \n$suffix1: \'\\@#{$key}\';\ \n.test21#{$suffix1} { content: \'2.1\'; }\n" ), "Error: expected selector.\ \n ,--> input.scss\ \n3 | .test21#{$suffix1} { content: \'2.1\'; }\ \n | ^^^^^^^^ \ \n \'\ \n ,\ \n1 | .test21@bar \ \n | = error in interpolated output\ \n \'\ \n input.scss 3:10 root stylesheet", ); } t31_escaped_literal.rs000066400000000000000000000013221474765622100373010ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/interpolate/t44_selector/todo_single_escape//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/interpolate/44_selector/todo_single_escape/31_escaped_literal.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("31_escaped_literal") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err(".test31#{\'\\@baz\'} { content: \'3.1\'; }\n"), "Error: expected selector.\ \n ,--> input.scss\ \n1 | .test31#{\'\\@baz\'} { content: \'3.1\'; }\ \n | ^^^^^^^ \ \n \'\ \n ,\ \n1 | .test31@baz \ \n | = error in interpolated output\ \n \'\ \n input.scss 1:10 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/malformed_expressions/000077500000000000000000000000001474765622100271265ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/malformed_expressions/at_debug/000077500000000000000000000000001474765622100307005ustar00rootroot00000000000000incomplete_expression.rs000066400000000000000000000010151474765622100356020ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/malformed_expressions/at_debug//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/malformed_expressions/at-debug/incomplete-expression.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("incomplete-expression") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err("@debug(\"foo\";\n"), "Error: expected \")\".\ \n ,\ \n1 | @debug(\"foo\";\ \n | ^\ \n \'\ \n input.scss 1:13 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/malformed_expressions/at_debug/mod.rs000066400000000000000000000003621474765622100320260ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/malformed_expressions/at-debug" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("at-debug") } mod incomplete_expression; mod no_argument; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/malformed_expressions/at_debug/no_argument.rs000066400000000000000000000007471474765622100335740ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/malformed_expressions/at-debug/no-argument.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("no-argument") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err("@debug;\n"), "Error: Expected expression.\ \n ,\ \n1 | @debug;\ \n | ^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/malformed_expressions/at_error/000077500000000000000000000000001474765622100307435ustar00rootroot00000000000000incomplete_expression.rs000066400000000000000000000010151474765622100356450ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/malformed_expressions/at_error//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/malformed_expressions/at-error/incomplete-expression.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("incomplete-expression") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err("@error(\"foo\";\n"), "Error: expected \")\".\ \n ,\ \n1 | @error(\"foo\";\ \n | ^\ \n \'\ \n input.scss 1:13 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/malformed_expressions/at_error/mod.rs000066400000000000000000000003621474765622100320710ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/malformed_expressions/at-error" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("at-error") } mod incomplete_expression; mod no_argument; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/malformed_expressions/at_error/no_argument.rs000066400000000000000000000007471474765622100336370ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/malformed_expressions/at-error/no-argument.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("no-argument") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err("@error;\n"), "Error: Expected expression.\ \n ,\ \n1 | @error;\ \n | ^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/malformed_expressions/at_warn/000077500000000000000000000000001474765622100305615ustar00rootroot00000000000000incomplete_expression.rs000066400000000000000000000010111474765622100354570ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/malformed_expressions/at_warn//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/malformed_expressions/at-warn/incomplete-expression.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("incomplete-expression") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err("@warn(\"foo\";\n"), "Error: expected \")\".\ \n ,\ \n1 | @warn(\"foo\";\ \n | ^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/malformed_expressions/at_warn/mod.rs000066400000000000000000000003601474765622100317050ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/malformed_expressions/at-warn" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("at-warn") } mod incomplete_expression; mod no_argument; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/malformed_expressions/at_warn/no_argument.rs000066400000000000000000000007431474765622100334510ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/malformed_expressions/at-warn/no-argument.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("no-argument") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err("@warn;\n"), "Error: Expected expression.\ \n ,\ \n1 | @warn;\ \n | ^\ \n \'\ \n input.scss 1:6 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/malformed_expressions/mod.rs000066400000000000000000000003641474765622100302560ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/malformed_expressions" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("malformed_expressions") } mod at_debug; mod at_error; mod at_warn; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/mod.rs000066400000000000000000000003771474765622100236520ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("parser") } mod and_and; mod arglists; mod interpolate; mod malformed_expressions; mod operations; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/000077500000000000000000000000001474765622100247015ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/addition/000077500000000000000000000000001474765622100264745ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/addition/dimensions/000077500000000000000000000000001474765622100306445ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/addition/dimensions/mod.rs000066400000000000000000000003221474765622100317660ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/operations/addition/dimensions" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("dimensions") } mod pairs; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/addition/dimensions/pairs.rs000066400000000000000000000147051474765622100323370ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/operations/addition/dimensions/pairs.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("pairs") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n test-1: 10+10;\ \n test-2: 10 +10;\ \n test-3: 10+ 10;\ \n test-4: 10 + 10;\ \n test-5: 10+10px;\ \n test-6: 10 +10px;\ \n test-7: 10+ 10px;\ \n test-8: 10 + 10px;\ \n test-9: 10+#{10}px;\ \n test-10: 10 +#{10}px;\ \n test-11: 10+ #{10}px;\ \n test-12: 10 + #{10}px;\ \n test-13: 10+1#{0}px;\ \n test-14: 10 +1#{0}px;\ \n test-15: 10+ 1#{0}px;\ \n test-16: 10 + 1#{0}px;\ \n test-17: 10+10#{px};\ \n test-18: 10 +10#{px};\ \n test-19: 10+ 10#{px};\ \n test-20: 10 + 10#{px};\ \n test-21: 10+10#{p}x;\ \n test-22: 10 +10#{p}x;\ \n test-23: 10+ 10#{p}x;\ \n test-24: 10 + 10#{p}x;\ \n test-25: 10px+10px;\ \n test-26: 10px +10px;\ \n test-27: 10px+ 10px;\ \n test-28: 10px + 10px;\ \n test-29: 10px+#{10}px;\ \n test-30: 10px +#{10}px;\ \n test-31: 10px+ #{10}px;\ \n test-32: 10px + #{10}px;\ \n test-33: 10px+1#{0}px;\ \n test-34: 10px +1#{0}px;\ \n test-35: 10px+ 1#{0}px;\ \n test-36: 10px + 1#{0}px;\ \n test-37: 10px+10#{px};\ \n test-38: 10px +10#{px};\ \n test-39: 10px+ 10#{px};\ \n test-40: 10px + 10#{px};\ \n test-41: 10px+10#{p}x;\ \n test-42: 10px +10#{p}x;\ \n test-43: 10px+ 10#{p}x;\ \n test-44: 10px + 10#{p}x;\ \n test-45: #{10}px+#{10}px;\ \n test-46: #{10}px +#{10}px;\ \n test-47: #{10}px+ #{10}px;\ \n test-48: #{10}px + #{10}px;\ \n test-49: #{10}px+1#{0}px;\ \n test-50: #{10}px +1#{0}px;\ \n test-51: #{10}px+ 1#{0}px;\ \n test-52: #{10}px + 1#{0}px;\ \n test-53: #{10}px+10#{px};\ \n test-54: #{10}px +10#{px};\ \n test-55: #{10}px+ 10#{px};\ \n test-56: #{10}px + 10#{px};\ \n test-57: #{10}px+10#{p}x;\ \n test-58: #{10}px +10#{p}x;\ \n test-59: #{10}px+ 10#{p}x;\ \n test-60: #{10}px + 10#{p}x;\ \n test-61: 1#{0}px+1#{0}px;\ \n test-62: 1#{0}px +1#{0}px;\ \n test-63: 1#{0}px+ 1#{0}px;\ \n test-64: 1#{0}px + 1#{0}px;\ \n test-65: 1#{0}px+10#{px};\ \n test-66: 1#{0}px +10#{px};\ \n test-67: 1#{0}px+ 10#{px};\ \n test-68: 1#{0}px + 10#{px};\ \n test-69: 1#{0}px+10#{p}x;\ \n test-70: 1#{0}px +10#{p}x;\ \n test-71: 1#{0}px+ 10#{p}x;\ \n test-72: 1#{0}px + 10#{p}x;\ \n test-73: 10#{px}+10#{px};\ \n test-74: 10#{px} +10#{px};\ \n test-75: 10#{px}+ 10#{px};\ \n test-76: 10#{px} + 10#{px};\ \n test-77: 10#{px}+10#{p}x;\ \n test-78: 10#{px} +10#{p}x;\ \n test-79: 10#{px}+ 10#{p}x;\ \n test-80: 10#{px} + 10#{p}x;\ \n test-81: 10#{p}x+10#{p}x;\ \n test-82: 10#{p}x +10#{p}x;\ \n test-83: 10#{p}x+ 10#{p}x;\ \n test-84: 10#{p}x + 10#{p}x;\ \n}\n"), "foo {\ \n test-1: 20;\ \n test-2: 20;\ \n test-3: 20;\ \n test-4: 20;\ \n test-5: 20px;\ \n test-6: 20px;\ \n test-7: 20px;\ \n test-8: 20px;\ \n test-9: 1010px;\ \n test-10: 1010px;\ \n test-11: 1010px;\ \n test-12: 1010px;\ \n test-13: 11 0px;\ \n test-14: 11 0px;\ \n test-15: 11 0px;\ \n test-16: 11 0px;\ \n test-17: 20 px;\ \n test-18: 20 px;\ \n test-19: 20 px;\ \n test-20: 20 px;\ \n test-21: 20 px;\ \n test-22: 20 px;\ \n test-23: 20 px;\ \n test-24: 20 px;\ \n test-25: 20px;\ \n test-26: 20px;\ \n test-27: 20px;\ \n test-28: 20px;\ \n test-29: 10px10px;\ \n test-30: 10px10px;\ \n test-31: 10px10px;\ \n test-32: 10px10px;\ \n test-33: 11px 0px;\ \n test-34: 11px 0px;\ \n test-35: 11px 0px;\ \n test-36: 11px 0px;\ \n test-37: 20px px;\ \n test-38: 20px px;\ \n test-39: 20px px;\ \n test-40: 20px px;\ \n test-41: 20px px;\ \n test-42: 20px px;\ \n test-43: 20px px;\ \n test-44: 20px px;\ \n test-45: 10px10px;\ \n test-46: 10px10px;\ \n test-47: 10px10px;\ \n test-48: 10px10px;\ \n test-49: 10px1 0px;\ \n test-50: 10px1 0px;\ \n test-51: 10px1 0px;\ \n test-52: 10px1 0px;\ \n test-53: 10px10 px;\ \n test-54: 10px10 px;\ \n test-55: 10px10 px;\ \n test-56: 10px10 px;\ \n test-57: 10px10 px;\ \n test-58: 10px10 px;\ \n test-59: 10px10 px;\ \n test-60: 10px10 px;\ \n test-61: 1 0px1 0px;\ \n test-62: 1 0px1 0px;\ \n test-63: 1 0px1 0px;\ \n test-64: 1 0px1 0px;\ \n test-65: 1 0px10 px;\ \n test-66: 1 0px10 px;\ \n test-67: 1 0px10 px;\ \n test-68: 1 0px10 px;\ \n test-69: 1 0px10 px;\ \n test-70: 1 0px10 px;\ \n test-71: 1 0px10 px;\ \n test-72: 1 0px10 px;\ \n test-73: 10 px10 px;\ \n test-74: 10 px10 px;\ \n test-75: 10 px10 px;\ \n test-76: 10 px10 px;\ \n test-77: 10 px10 px;\ \n test-78: 10 px10 px;\ \n test-79: 10 px10 px;\ \n test-80: 10 px10 px;\ \n test-81: 10 px10 px;\ \n test-82: 10 px10 px;\ \n test-83: 10 px10 px;\ \n test-84: 10 px10 px;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/addition/mod.rs000066400000000000000000000003461474765622100276240ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/operations/addition" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("addition") } mod dimensions; mod numbers; mod strings; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/addition/numbers/000077500000000000000000000000001474765622100301475ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/addition/numbers/mod.rs000066400000000000000000000003141474765622100312720ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/operations/addition/numbers" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("numbers") } mod pairs; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/addition/numbers/pairs.rs000066400000000000000000000057621474765622100316450ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/operations/addition/numbers/pairs.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("pairs") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n test-1: 10+10;\ \n test-2: 10 +10;\ \n test-3: 10+ 10;\ \n test-4: 10 + 10;\ \n test-5: 10+#{10};\ \n test-6: 10 +#{10};\ \n test-7: 10+ #{10};\ \n test-8: 10 + #{10};\ \n test-9: 10+1#{0};\ \n test-10: 10 +1#{0};\ \n test-11: 10+ 1#{0};\ \n test-12: 10 + 1#{0};\ \n test-13: 10+#{1}0;\ \n test-14: 10 +#{1}0;\ \n test-15: 10+ #{1}0;\ \n test-16: 10 + #{1}0;\ \n test-17: #{10}+#{10};\ \n test-18: #{10} +#{10};\ \n test-19: #{10}+ #{10};\ \n test-20: #{10} + #{10};\ \n test-21: #{10}+1#{0};\ \n test-22: #{10} +1#{0};\ \n test-23: #{10}+ 1#{0};\ \n test-24: #{10} + 1#{0};\ \n test-25: #{10}+#{1}0;\ \n test-26: #{10} +#{1}0;\ \n test-27: #{10}+ #{1}0;\ \n test-28: #{10} + #{1}0;\ \n test-29: 1#{0}+1#{0};\ \n test-30: 1#{0} +1#{0};\ \n test-31: 1#{0}+ 1#{0};\ \n test-32: 1#{0} + 1#{0};\ \n test-33: 1#{0}+#{1}0;\ \n test-34: 1#{0} +#{1}0;\ \n test-35: 1#{0}+ #{1}0;\ \n test-36: 1#{0} + #{1}0;\ \n test-37: #{1}0+#{1}0;\ \n test-38: #{1}0 +#{1}0;\ \n test-39: #{1}0+ #{1}0;\ \n test-40: #{1}0 + #{1}0;\ \n}\n"), "foo {\ \n test-1: 20;\ \n test-2: 20;\ \n test-3: 20;\ \n test-4: 20;\ \n test-5: 1010;\ \n test-6: 1010;\ \n test-7: 1010;\ \n test-8: 1010;\ \n test-9: 11 0;\ \n test-10: 11 0;\ \n test-11: 11 0;\ \n test-12: 11 0;\ \n test-13: 1010;\ \n test-14: 1010;\ \n test-15: 1010;\ \n test-16: 1010;\ \n test-17: 1010;\ \n test-18: 1010;\ \n test-19: 1010;\ \n test-20: 1010;\ \n test-21: 101 0;\ \n test-22: 101 0;\ \n test-23: 101 0;\ \n test-24: 101 0;\ \n test-25: 1010;\ \n test-26: 1010;\ \n test-27: 1010;\ \n test-28: 1010;\ \n test-29: 1 01 0;\ \n test-30: 1 01 0;\ \n test-31: 1 01 0;\ \n test-32: 1 01 0;\ \n test-33: 1 010;\ \n test-34: 1 010;\ \n test-35: 1 010;\ \n test-36: 1 010;\ \n test-37: 1010;\ \n test-38: 1010;\ \n test-39: 1010;\ \n test-40: 1010;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/addition/strings/000077500000000000000000000000001474765622100301655ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/addition/strings/mod.rs000066400000000000000000000003141474765622100313100ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/operations/addition/strings" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("strings") } mod pairs; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/addition/strings/pairs.rs000066400000000000000000000144561474765622100316630ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/operations/addition/strings/pairs.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("pairs") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n test-1: literal+literal;\ \n test-2: literal +literal;\ \n test-3: literal+ literal;\ \n test-4: literal + literal;\ \n test-5: literal+\"quoted\";\ \n test-6: literal +\"quoted\";\ \n test-7: literal+ \"quoted\";\ \n test-8: literal + \"quoted\";\ \n test-9: literal+#{interpolant};\ \n test-10: literal +#{interpolant};\ \n test-11: literal+ #{interpolant};\ \n test-12: literal + #{interpolant};\ \n test-13: literal+lschema_#{ritlp};\ \n test-14: literal +lschema_#{ritlp};\ \n test-15: literal+ lschema_#{ritlp};\ \n test-16: literal + lschema_#{ritlp};\ \n test-17: literal+#{litlp}_rschema;\ \n test-18: literal +#{litlp}_rschema;\ \n test-19: literal+ #{litlp}_rschema;\ \n test-20: literal + #{litlp}_rschema;\ \n test-21: \"quoted\"+\"quoted\";\ \n test-22: \"quoted\" +\"quoted\";\ \n test-23: \"quoted\"+ \"quoted\";\ \n test-24: \"quoted\" + \"quoted\";\ \n test-25: \"quoted\"+#{interpolant};\ \n test-26: \"quoted\" +#{interpolant};\ \n test-27: \"quoted\"+ #{interpolant};\ \n test-28: \"quoted\" + #{interpolant};\ \n test-29: \"quoted\"+lschema_#{ritlp};\ \n test-30: \"quoted\" +lschema_#{ritlp};\ \n test-31: \"quoted\"+ lschema_#{ritlp};\ \n test-32: \"quoted\" + lschema_#{ritlp};\ \n test-33: \"quoted\"+#{litlp}_rschema;\ \n test-34: \"quoted\" +#{litlp}_rschema;\ \n test-35: \"quoted\"+ #{litlp}_rschema;\ \n test-36: \"quoted\" + #{litlp}_rschema;\ \n test-37: #{interpolant}+#{interpolant};\ \n test-38: #{interpolant} +#{interpolant};\ \n test-39: #{interpolant}+ #{interpolant};\ \n test-40: #{interpolant} + #{interpolant};\ \n test-41: #{interpolant}+lschema_#{ritlp};\ \n test-42: #{interpolant} +lschema_#{ritlp};\ \n test-43: #{interpolant}+ lschema_#{ritlp};\ \n test-44: #{interpolant} + lschema_#{ritlp};\ \n test-45: #{interpolant}+#{litlp}_rschema;\ \n test-46: #{interpolant} +#{litlp}_rschema;\ \n test-47: #{interpolant}+ #{litlp}_rschema;\ \n test-48: #{interpolant} + #{litlp}_rschema;\ \n test-49: lschema_#{ritlp}+lschema_#{ritlp};\ \n test-50: lschema_#{ritlp} +lschema_#{ritlp};\ \n test-51: lschema_#{ritlp}+ lschema_#{ritlp};\ \n test-52: lschema_#{ritlp} + lschema_#{ritlp};\ \n test-53: lschema_#{ritlp}+#{litlp}_rschema;\ \n test-54: lschema_#{ritlp} +#{litlp}_rschema;\ \n test-55: lschema_#{ritlp}+ #{litlp}_rschema;\ \n test-56: lschema_#{ritlp} + #{litlp}_rschema;\ \n test-57: #{litlp}_rschema+#{litlp}_rschema;\ \n test-58: #{litlp}_rschema +#{litlp}_rschema;\ \n test-59: #{litlp}_rschema+ #{litlp}_rschema;\ \n test-60: #{litlp}_rschema + #{litlp}_rschema;\ \n}\n"), "foo {\ \n test-1: literalliteral;\ \n test-2: literalliteral;\ \n test-3: literalliteral;\ \n test-4: literalliteral;\ \n test-5: literalquoted;\ \n test-6: literalquoted;\ \n test-7: literalquoted;\ \n test-8: literalquoted;\ \n test-9: literalinterpolant;\ \n test-10: literalinterpolant;\ \n test-11: literalinterpolant;\ \n test-12: literalinterpolant;\ \n test-13: literallschema_ritlp;\ \n test-14: literallschema_ritlp;\ \n test-15: literallschema_ritlp;\ \n test-16: literallschema_ritlp;\ \n test-17: literallitlp_rschema;\ \n test-18: literallitlp_rschema;\ \n test-19: literallitlp_rschema;\ \n test-20: literallitlp_rschema;\ \n test-21: \"quotedquoted\";\ \n test-22: \"quotedquoted\";\ \n test-23: \"quotedquoted\";\ \n test-24: \"quotedquoted\";\ \n test-25: \"quotedinterpolant\";\ \n test-26: \"quotedinterpolant\";\ \n test-27: \"quotedinterpolant\";\ \n test-28: \"quotedinterpolant\";\ \n test-29: \"quotedlschema_ritlp\";\ \n test-30: \"quotedlschema_ritlp\";\ \n test-31: \"quotedlschema_ritlp\";\ \n test-32: \"quotedlschema_ritlp\";\ \n test-33: \"quotedlitlp_rschema\";\ \n test-34: \"quotedlitlp_rschema\";\ \n test-35: \"quotedlitlp_rschema\";\ \n test-36: \"quotedlitlp_rschema\";\ \n test-37: interpolantinterpolant;\ \n test-38: interpolantinterpolant;\ \n test-39: interpolantinterpolant;\ \n test-40: interpolantinterpolant;\ \n test-41: interpolantlschema_ritlp;\ \n test-42: interpolantlschema_ritlp;\ \n test-43: interpolantlschema_ritlp;\ \n test-44: interpolantlschema_ritlp;\ \n test-45: interpolantlitlp_rschema;\ \n test-46: interpolantlitlp_rschema;\ \n test-47: interpolantlitlp_rschema;\ \n test-48: interpolantlitlp_rschema;\ \n test-49: lschema_ritlplschema_ritlp;\ \n test-50: lschema_ritlplschema_ritlp;\ \n test-51: lschema_ritlplschema_ritlp;\ \n test-52: lschema_ritlplschema_ritlp;\ \n test-53: lschema_ritlplitlp_rschema;\ \n test-54: lschema_ritlplitlp_rschema;\ \n test-55: lschema_ritlplitlp_rschema;\ \n test-56: lschema_ritlplitlp_rschema;\ \n test-57: litlp_rschemalitlp_rschema;\ \n test-58: litlp_rschemalitlp_rschema;\ \n test-59: litlp_rschemalitlp_rschema;\ \n test-60: litlp_rschemalitlp_rschema;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/binary_and_unary.rs000066400000000000000000000022561474765622100306000ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/operations/binary-and-unary.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("binary-and-unary") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n minus-before-minus: - 1 - 2;\ \n minus-after-minus: 1 - - 2;\ \n plus-before-minus: + 1 - 2;\ \n plus-after-minus: 1 - + 2;\ \n not-before-plus: not 1 + 2;\ \n not-after-plus: 1 + not 2;\n\ \n minus-after-comma: (1, - 2);\ \n plus-after-comma: (1, + 2);\ \n slash-after-comma: (1, / 2);\ \n not-after-comma: (1, not 2);\ \n}\n"), "foo {\ \n minus-before-minus: -3;\ \n minus-after-minus: 3;\ \n plus-before-minus: -1;\ \n plus-after-minus: -1;\ \n not-before-plus: false2;\ \n not-after-plus: 1false;\ \n minus-after-comma: 1, -2;\ \n plus-after-comma: 1, 2;\ \n slash-after-comma: 1, /2;\ \n not-after-comma: 1, false;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/division/000077500000000000000000000000001474765622100265255ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/division/dimensions/000077500000000000000000000000001474765622100306755ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/division/dimensions/mod.rs000066400000000000000000000003221474765622100320170ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/operations/division/dimensions" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("dimensions") } mod pairs; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/division/dimensions/pairs.rs000066400000000000000000000151411474765622100323630ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/operations/division/dimensions/pairs.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("pairs") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n test-1: 10/10;\ \n test-2: 10 /10;\ \n test-3: 10/ 10;\ \n test-4: 10 / 10;\ \n test-5: 10/10px;\ \n test-6: 10 /10px;\ \n test-7: 10/ 10px;\ \n test-8: 10 / 10px;\ \n test-9: 10/#{10}px;\ \n test-10: 10 /#{10}px;\ \n test-11: 10/ #{10}px;\ \n test-12: 10 / #{10}px;\ \n test-13: 10/1#{0}px;\ \n test-14: 10 /1#{0}px;\ \n test-15: 10/ 1#{0}px;\ \n test-16: 10 / 1#{0}px;\ \n test-17: 10/10#{px};\ \n test-18: 10 /10#{px};\ \n test-19: 10/ 10#{px};\ \n test-20: 10 / 10#{px};\ \n test-21: 10/10#{p}x;\ \n test-22: 10 /10#{p}x;\ \n test-23: 10/ 10#{p}x;\ \n test-24: 10 / 10#{p}x;\ \n test-25: 10px/10px;\ \n test-26: 10px /10px;\ \n test-27: 10px/ 10px;\ \n test-28: 10px / 10px;\ \n test-29: 10px/#{10}px;\ \n test-30: 10px /#{10}px;\ \n test-31: 10px/ #{10}px;\ \n test-32: 10px / #{10}px;\ \n test-33: 10px/1#{0}px;\ \n test-34: 10px /1#{0}px;\ \n test-35: 10px/ 1#{0}px;\ \n test-36: 10px / 1#{0}px;\ \n test-37: 10px/10#{px};\ \n test-38: 10px /10#{px};\ \n test-39: 10px/ 10#{px};\ \n test-40: 10px / 10#{px};\ \n test-41: 10px/10#{p}x;\ \n test-42: 10px /10#{p}x;\ \n test-43: 10px/ 10#{p}x;\ \n test-44: 10px / 10#{p}x;\ \n test-45: #{10}px/#{10}px;\ \n test-46: #{10}px /#{10}px;\ \n test-47: #{10}px/ #{10}px;\ \n test-48: #{10}px / #{10}px;\ \n test-49: #{10}px/1#{0}px;\ \n test-50: #{10}px /1#{0}px;\ \n test-51: #{10}px/ 1#{0}px;\ \n test-52: #{10}px / 1#{0}px;\ \n test-53: #{10}px/10#{px};\ \n test-54: #{10}px /10#{px};\ \n test-55: #{10}px/ 10#{px};\ \n test-56: #{10}px / 10#{px};\ \n test-57: #{10}px/10#{p}x;\ \n test-58: #{10}px /10#{p}x;\ \n test-59: #{10}px/ 10#{p}x;\ \n test-60: #{10}px / 10#{p}x;\ \n test-61: 1#{0}px/1#{0}px;\ \n test-62: 1#{0}px /1#{0}px;\ \n test-63: 1#{0}px/ 1#{0}px;\ \n test-64: 1#{0}px / 1#{0}px;\ \n test-65: 1#{0}px/10#{px};\ \n test-66: 1#{0}px /10#{px};\ \n test-67: 1#{0}px/ 10#{px};\ \n test-68: 1#{0}px / 10#{px};\ \n test-69: 1#{0}px/10#{p}x;\ \n test-70: 1#{0}px /10#{p}x;\ \n test-71: 1#{0}px/ 10#{p}x;\ \n test-72: 1#{0}px / 10#{p}x;\ \n test-73: 10#{px}/10#{px};\ \n test-74: 10#{px} /10#{px};\ \n test-75: 10#{px}/ 10#{px};\ \n test-76: 10#{px} / 10#{px};\ \n test-77: 10#{px}/10#{p}x;\ \n test-78: 10#{px} /10#{p}x;\ \n test-79: 10#{px}/ 10#{p}x;\ \n test-80: 10#{px} / 10#{p}x;\ \n test-81: 10#{p}x/10#{p}x;\ \n test-82: 10#{p}x /10#{p}x;\ \n test-83: 10#{p}x/ 10#{p}x;\ \n test-84: 10#{p}x / 10#{p}x;\ \n}\n"), "foo {\ \n test-1: 10/10;\ \n test-2: 10/10;\ \n test-3: 10/10;\ \n test-4: 10/10;\ \n test-5: 10/10px;\ \n test-6: 10/10px;\ \n test-7: 10/10px;\ \n test-8: 10/10px;\ \n test-9: 10/10px;\ \n test-10: 10/10px;\ \n test-11: 10/10px;\ \n test-12: 10/10px;\ \n test-13: 10/1 0px;\ \n test-14: 10/1 0px;\ \n test-15: 10/1 0px;\ \n test-16: 10/1 0px;\ \n test-17: 10/10 px;\ \n test-18: 10/10 px;\ \n test-19: 10/10 px;\ \n test-20: 10/10 px;\ \n test-21: 10/10 px;\ \n test-22: 10/10 px;\ \n test-23: 10/10 px;\ \n test-24: 10/10 px;\ \n test-25: 10px/10px;\ \n test-26: 10px/10px;\ \n test-27: 10px/10px;\ \n test-28: 10px/10px;\ \n test-29: 10px/10px;\ \n test-30: 10px/10px;\ \n test-31: 10px/10px;\ \n test-32: 10px/10px;\ \n test-33: 10px/1 0px;\ \n test-34: 10px/1 0px;\ \n test-35: 10px/1 0px;\ \n test-36: 10px/1 0px;\ \n test-37: 10px/10 px;\ \n test-38: 10px/10 px;\ \n test-39: 10px/10 px;\ \n test-40: 10px/10 px;\ \n test-41: 10px/10 px;\ \n test-42: 10px/10 px;\ \n test-43: 10px/10 px;\ \n test-44: 10px/10 px;\ \n test-45: 10px/10px;\ \n test-46: 10px/10px;\ \n test-47: 10px/10px;\ \n test-48: 10px/10px;\ \n test-49: 10px/1 0px;\ \n test-50: 10px/1 0px;\ \n test-51: 10px/1 0px;\ \n test-52: 10px/1 0px;\ \n test-53: 10px/10 px;\ \n test-54: 10px/10 px;\ \n test-55: 10px/10 px;\ \n test-56: 10px/10 px;\ \n test-57: 10px/10 px;\ \n test-58: 10px/10 px;\ \n test-59: 10px/10 px;\ \n test-60: 10px/10 px;\ \n test-61: 1 0px/1 0px;\ \n test-62: 1 0px/1 0px;\ \n test-63: 1 0px/1 0px;\ \n test-64: 1 0px/1 0px;\ \n test-65: 1 0px/10 px;\ \n test-66: 1 0px/10 px;\ \n test-67: 1 0px/10 px;\ \n test-68: 1 0px/10 px;\ \n test-69: 1 0px/10 px;\ \n test-70: 1 0px/10 px;\ \n test-71: 1 0px/10 px;\ \n test-72: 1 0px/10 px;\ \n test-73: 10 px/10 px;\ \n test-74: 10 px/10 px;\ \n test-75: 10 px/10 px;\ \n test-76: 10 px/10 px;\ \n test-77: 10 px/10 px;\ \n test-78: 10 px/10 px;\ \n test-79: 10 px/10 px;\ \n test-80: 10 px/10 px;\ \n test-81: 10 px/10 px;\ \n test-82: 10 px/10 px;\ \n test-83: 10 px/10 px;\ \n test-84: 10 px/10 px;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/division/mixed/000077500000000000000000000000001474765622100276335ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/division/mixed/mod.rs000066400000000000000000000003101474765622100307520ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/operations/division/mixed" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("mixed") } mod pairs; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/division/mixed/pairs.rs000066400000000000000000000103441474765622100313210ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/operations/division/mixed/pairs.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("pairs") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n test-1: 10/10;\ \n test-2: 10 /10;\ \n test-3: 10/ 10;\ \n test-4: 10 / 10;\ \n test-5: 10/10%;\ \n test-6: 10 /10%;\ \n test-7: 10/ 10%;\ \n test-8: 10 / 10%;\ \n test-9: 10/10px;\ \n test-10: 10 /10px;\ \n test-11: 10/ 10px;\ \n test-12: 10 / 10px;\ \n test-13: 10/#AAA;\ \n test-14: 10 /#AAA;\ \n test-15: 10/ #AAA;\ \n test-16: 10 / #AAA;\ \n test-17: 10/#{itpl};\ \n test-18: 10 /#{itpl};\ \n test-19: 10/ #{itpl};\ \n test-20: 10 / #{itpl};\ \n test-21: 10%/10%;\ \n test-22: 10% /10%;\ \n test-23: 10%/ 10%;\ \n test-24: 10% / 10%;\ \n test-25: 10%/10px;\ \n test-26: 10% /10px;\ \n test-27: 10%/ 10px;\ \n test-28: 10% / 10px;\ \n test-29: 10%/#AAA;\ \n test-30: 10% /#AAA;\ \n test-31: 10%/ #AAA;\ \n test-32: 10% / #AAA;\ \n test-33: 10%/#{itpl};\ \n test-34: 10% /#{itpl};\ \n test-35: 10%/ #{itpl};\ \n test-36: 10% / #{itpl};\ \n test-37: 10px/10px;\ \n test-38: 10px /10px;\ \n test-39: 10px/ 10px;\ \n test-40: 10px / 10px;\ \n test-41: 10px/#AAA;\ \n test-42: 10px /#AAA;\ \n test-43: 10px/ #AAA;\ \n test-44: 10px / #AAA;\ \n test-45: 10px/#{itpl};\ \n test-46: 10px /#{itpl};\ \n test-47: 10px/ #{itpl};\ \n test-48: 10px / #{itpl};\ \n test-49: #AAA/#{itpl};\ \n test-50: #AAA /#{itpl};\ \n test-51: #AAA/ #{itpl};\ \n test-52: #AAA / #{itpl};\ \n test-53: #{itpl}/#{itpl};\ \n test-54: #{itpl} /#{itpl};\ \n test-55: #{itpl}/ #{itpl};\ \n test-56: #{itpl} / #{itpl};\ \n}\n"), "foo {\ \n test-1: 10/10;\ \n test-2: 10/10;\ \n test-3: 10/10;\ \n test-4: 10/10;\ \n test-5: 10/10%;\ \n test-6: 10/10%;\ \n test-7: 10/10%;\ \n test-8: 10/10%;\ \n test-9: 10/10px;\ \n test-10: 10/10px;\ \n test-11: 10/10px;\ \n test-12: 10/10px;\ \n test-13: 10/#AAA;\ \n test-14: 10/#AAA;\ \n test-15: 10/#AAA;\ \n test-16: 10/#AAA;\ \n test-17: 10/itpl;\ \n test-18: 10/itpl;\ \n test-19: 10/itpl;\ \n test-20: 10/itpl;\ \n test-21: 10%/10%;\ \n test-22: 10%/10%;\ \n test-23: 10%/10%;\ \n test-24: 10%/10%;\ \n test-25: 10%/10px;\ \n test-26: 10%/10px;\ \n test-27: 10%/10px;\ \n test-28: 10%/10px;\ \n test-29: 10%/#AAA;\ \n test-30: 10%/#AAA;\ \n test-31: 10%/#AAA;\ \n test-32: 10%/#AAA;\ \n test-33: 10%/itpl;\ \n test-34: 10%/itpl;\ \n test-35: 10%/itpl;\ \n test-36: 10%/itpl;\ \n test-37: 10px/10px;\ \n test-38: 10px/10px;\ \n test-39: 10px/10px;\ \n test-40: 10px/10px;\ \n test-41: 10px/#AAA;\ \n test-42: 10px/#AAA;\ \n test-43: 10px/#AAA;\ \n test-44: 10px/#AAA;\ \n test-45: 10px/itpl;\ \n test-46: 10px/itpl;\ \n test-47: 10px/itpl;\ \n test-48: 10px/itpl;\ \n test-49: #AAA/itpl;\ \n test-50: #AAA/itpl;\ \n test-51: #AAA/itpl;\ \n test-52: #AAA/itpl;\ \n test-53: itpl/itpl;\ \n test-54: itpl/itpl;\ \n test-55: itpl/itpl;\ \n test-56: itpl/itpl;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/division/mod.rs000066400000000000000000000003621474765622100276530ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/operations/division" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("division") } mod dimensions; mod mixed; mod numbers; mod strings; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/division/numbers/000077500000000000000000000000001474765622100302005ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/division/numbers/mod.rs000066400000000000000000000003141474765622100313230ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/operations/division/numbers" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("numbers") } mod pairs; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/division/numbers/pairs.rs000066400000000000000000000060461474765622100316720ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/operations/division/numbers/pairs.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("pairs") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n test-1: 10/10;\ \n test-2: 10 /10;\ \n test-3: 10/ 10;\ \n test-4: 10 / 10;\ \n test-5: 10/#{10};\ \n test-6: 10 /#{10};\ \n test-7: 10/ #{10};\ \n test-8: 10 / #{10};\ \n test-9: 10/1#{0};\ \n test-10: 10 /1#{0};\ \n test-11: 10/ 1#{0};\ \n test-12: 10 / 1#{0};\ \n test-13: 10/#{1}0;\ \n test-14: 10 /#{1}0;\ \n test-15: 10/ #{1}0;\ \n test-16: 10 / #{1}0;\ \n test-17: #{10}/#{10};\ \n test-18: #{10} /#{10};\ \n test-19: #{10}/ #{10};\ \n test-20: #{10} / #{10};\ \n test-21: #{10}/1#{0};\ \n test-22: #{10} /1#{0};\ \n test-23: #{10}/ 1#{0};\ \n test-24: #{10} / 1#{0};\ \n test-25: #{10}/#{1}0;\ \n test-26: #{10} /#{1}0;\ \n test-27: #{10}/ #{1}0;\ \n test-28: #{10} / #{1}0;\ \n test-29: 1#{0}/1#{0};\ \n test-30: 1#{0} /1#{0};\ \n test-31: 1#{0}/ 1#{0};\ \n test-32: 1#{0} / 1#{0};\ \n test-33: 1#{0}/#{1}0;\ \n test-34: 1#{0} /#{1}0;\ \n test-35: 1#{0}/ #{1}0;\ \n test-36: 1#{0} / #{1}0;\ \n test-37: #{1}0/#{1}0;\ \n test-38: #{1}0 /#{1}0;\ \n test-39: #{1}0/ #{1}0;\ \n test-40: #{1}0 / #{1}0;\ \n}\n"), "foo {\ \n test-1: 10/10;\ \n test-2: 10/10;\ \n test-3: 10/10;\ \n test-4: 10/10;\ \n test-5: 10/10;\ \n test-6: 10/10;\ \n test-7: 10/10;\ \n test-8: 10/10;\ \n test-9: 10/1 0;\ \n test-10: 10/1 0;\ \n test-11: 10/1 0;\ \n test-12: 10/1 0;\ \n test-13: 10/10;\ \n test-14: 10/10;\ \n test-15: 10/10;\ \n test-16: 10/10;\ \n test-17: 10/10;\ \n test-18: 10/10;\ \n test-19: 10/10;\ \n test-20: 10/10;\ \n test-21: 10/1 0;\ \n test-22: 10/1 0;\ \n test-23: 10/1 0;\ \n test-24: 10/1 0;\ \n test-25: 10/10;\ \n test-26: 10/10;\ \n test-27: 10/10;\ \n test-28: 10/10;\ \n test-29: 1 0/1 0;\ \n test-30: 1 0/1 0;\ \n test-31: 1 0/1 0;\ \n test-32: 1 0/1 0;\ \n test-33: 1 0/10;\ \n test-34: 1 0/10;\ \n test-35: 1 0/10;\ \n test-36: 1 0/10;\ \n test-37: 10/10;\ \n test-38: 10/10;\ \n test-39: 10/10;\ \n test-40: 10/10;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/division/strings/000077500000000000000000000000001474765622100302165ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/division/strings/mod.rs000066400000000000000000000003141474765622100313410ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/operations/division/strings" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("strings") } mod pairs; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/division/strings/pairs.rs000066400000000000000000000146121474765622100317060ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/operations/division/strings/pairs.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("pairs") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n test-1: literal/literal;\ \n test-2: literal /literal;\ \n test-3: literal/ literal;\ \n test-4: literal / literal;\ \n test-5: literal/\"quoted\";\ \n test-6: literal /\"quoted\";\ \n test-7: literal/ \"quoted\";\ \n test-8: literal / \"quoted\";\ \n test-9: literal/#{interpolant};\ \n test-10: literal /#{interpolant};\ \n test-11: literal/ #{interpolant};\ \n test-12: literal / #{interpolant};\ \n test-13: literal/lschema_#{ritlp};\ \n test-14: literal /lschema_#{ritlp};\ \n test-15: literal/ lschema_#{ritlp};\ \n test-16: literal / lschema_#{ritlp};\ \n test-17: literal/#{litlp}_rschema;\ \n test-18: literal /#{litlp}_rschema;\ \n test-19: literal/ #{litlp}_rschema;\ \n test-20: literal / #{litlp}_rschema;\ \n test-21: \"quoted\"/\"quoted\";\ \n test-22: \"quoted\" /\"quoted\";\ \n test-23: \"quoted\"/ \"quoted\";\ \n test-24: \"quoted\" / \"quoted\";\ \n test-25: \"quoted\"/#{interpolant};\ \n test-26: \"quoted\" /#{interpolant};\ \n test-27: \"quoted\"/ #{interpolant};\ \n test-28: \"quoted\" / #{interpolant};\ \n test-29: \"quoted\"/lschema_#{ritlp};\ \n test-30: \"quoted\" /lschema_#{ritlp};\ \n test-31: \"quoted\"/ lschema_#{ritlp};\ \n test-32: \"quoted\" / lschema_#{ritlp};\ \n test-33: \"quoted\"/#{litlp}_rschema;\ \n test-34: \"quoted\" /#{litlp}_rschema;\ \n test-35: \"quoted\"/ #{litlp}_rschema;\ \n test-36: \"quoted\" / #{litlp}_rschema;\ \n test-37: #{interpolant}/#{interpolant};\ \n test-38: #{interpolant} /#{interpolant};\ \n test-39: #{interpolant}/ #{interpolant};\ \n test-40: #{interpolant} / #{interpolant};\ \n test-41: #{interpolant}/lschema_#{ritlp};\ \n test-42: #{interpolant} /lschema_#{ritlp};\ \n test-43: #{interpolant}/ lschema_#{ritlp};\ \n test-44: #{interpolant} / lschema_#{ritlp};\ \n test-45: #{interpolant}/#{litlp}_rschema;\ \n test-46: #{interpolant} /#{litlp}_rschema;\ \n test-47: #{interpolant}/ #{litlp}_rschema;\ \n test-48: #{interpolant} / #{litlp}_rschema;\ \n test-49: lschema_#{ritlp}/lschema_#{ritlp};\ \n test-50: lschema_#{ritlp} /lschema_#{ritlp};\ \n test-51: lschema_#{ritlp}/ lschema_#{ritlp};\ \n test-52: lschema_#{ritlp} / lschema_#{ritlp};\ \n test-53: lschema_#{ritlp}/#{litlp}_rschema;\ \n test-54: lschema_#{ritlp} /#{litlp}_rschema;\ \n test-55: lschema_#{ritlp}/ #{litlp}_rschema;\ \n test-56: lschema_#{ritlp} / #{litlp}_rschema;\ \n test-57: #{litlp}_rschema/#{litlp}_rschema;\ \n test-58: #{litlp}_rschema /#{litlp}_rschema;\ \n test-59: #{litlp}_rschema/ #{litlp}_rschema;\ \n test-60: #{litlp}_rschema / #{litlp}_rschema;\ \n}\n"), "foo {\ \n test-1: literal/literal;\ \n test-2: literal/literal;\ \n test-3: literal/literal;\ \n test-4: literal/literal;\ \n test-5: literal/\"quoted\";\ \n test-6: literal/\"quoted\";\ \n test-7: literal/\"quoted\";\ \n test-8: literal/\"quoted\";\ \n test-9: literal/interpolant;\ \n test-10: literal/interpolant;\ \n test-11: literal/interpolant;\ \n test-12: literal/interpolant;\ \n test-13: literal/lschema_ritlp;\ \n test-14: literal/lschema_ritlp;\ \n test-15: literal/lschema_ritlp;\ \n test-16: literal/lschema_ritlp;\ \n test-17: literal/litlp_rschema;\ \n test-18: literal/litlp_rschema;\ \n test-19: literal/litlp_rschema;\ \n test-20: literal/litlp_rschema;\ \n test-21: \"quoted\"/\"quoted\";\ \n test-22: \"quoted\"/\"quoted\";\ \n test-23: \"quoted\"/\"quoted\";\ \n test-24: \"quoted\"/\"quoted\";\ \n test-25: \"quoted\"/interpolant;\ \n test-26: \"quoted\"/interpolant;\ \n test-27: \"quoted\"/interpolant;\ \n test-28: \"quoted\"/interpolant;\ \n test-29: \"quoted\"/lschema_ritlp;\ \n test-30: \"quoted\"/lschema_ritlp;\ \n test-31: \"quoted\"/lschema_ritlp;\ \n test-32: \"quoted\"/lschema_ritlp;\ \n test-33: \"quoted\"/litlp_rschema;\ \n test-34: \"quoted\"/litlp_rschema;\ \n test-35: \"quoted\"/litlp_rschema;\ \n test-36: \"quoted\"/litlp_rschema;\ \n test-37: interpolant/interpolant;\ \n test-38: interpolant/interpolant;\ \n test-39: interpolant/interpolant;\ \n test-40: interpolant/interpolant;\ \n test-41: interpolant/lschema_ritlp;\ \n test-42: interpolant/lschema_ritlp;\ \n test-43: interpolant/lschema_ritlp;\ \n test-44: interpolant/lschema_ritlp;\ \n test-45: interpolant/litlp_rschema;\ \n test-46: interpolant/litlp_rschema;\ \n test-47: interpolant/litlp_rschema;\ \n test-48: interpolant/litlp_rschema;\ \n test-49: lschema_ritlp/lschema_ritlp;\ \n test-50: lschema_ritlp/lschema_ritlp;\ \n test-51: lschema_ritlp/lschema_ritlp;\ \n test-52: lschema_ritlp/lschema_ritlp;\ \n test-53: lschema_ritlp/litlp_rschema;\ \n test-54: lschema_ritlp/litlp_rschema;\ \n test-55: lschema_ritlp/litlp_rschema;\ \n test-56: lschema_ritlp/litlp_rschema;\ \n test-57: litlp_rschema/litlp_rschema;\ \n test-58: litlp_rschema/litlp_rschema;\ \n test-59: litlp_rschema/litlp_rschema;\ \n test-60: litlp_rschema/litlp_rschema;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/logic_eq/000077500000000000000000000000001474765622100264635ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/logic_eq/dimensions/000077500000000000000000000000001474765622100306335ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/logic_eq/dimensions/mod.rs000066400000000000000000000003221474765622100317550ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/operations/logic_eq/dimensions" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("dimensions") } mod pairs; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/logic_eq/dimensions/pairs.rs000066400000000000000000000150651474765622100323260ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/operations/logic_eq/dimensions/pairs.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("pairs") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n test-1: 10==10;\ \n test-2: 10 ==10;\ \n test-3: 10== 10;\ \n test-4: 10 == 10;\ \n test-5: 10==10px;\ \n test-6: 10 ==10px;\ \n test-7: 10== 10px;\ \n test-8: 10 == 10px;\ \n test-9: 10==#{10}px;\ \n test-10: 10 ==#{10}px;\ \n test-11: 10== #{10}px;\ \n test-12: 10 == #{10}px;\ \n test-13: 10==1#{0}px;\ \n test-14: 10 ==1#{0}px;\ \n test-15: 10== 1#{0}px;\ \n test-16: 10 == 1#{0}px;\ \n test-17: 10==10#{px};\ \n test-18: 10 ==10#{px};\ \n test-19: 10== 10#{px};\ \n test-20: 10 == 10#{px};\ \n test-21: 10==10#{p}x;\ \n test-22: 10 ==10#{p}x;\ \n test-23: 10== 10#{p}x;\ \n test-24: 10 == 10#{p}x;\ \n test-25: 10px==10px;\ \n test-26: 10px ==10px;\ \n test-27: 10px== 10px;\ \n test-28: 10px == 10px;\ \n test-29: 10px==#{10}px;\ \n test-30: 10px ==#{10}px;\ \n test-31: 10px== #{10}px;\ \n test-32: 10px == #{10}px;\ \n test-33: 10px==1#{0}px;\ \n test-34: 10px ==1#{0}px;\ \n test-35: 10px== 1#{0}px;\ \n test-36: 10px == 1#{0}px;\ \n test-37: 10px==10#{px};\ \n test-38: 10px ==10#{px};\ \n test-39: 10px== 10#{px};\ \n test-40: 10px == 10#{px};\ \n test-41: 10px==10#{p}x;\ \n test-42: 10px ==10#{p}x;\ \n test-43: 10px== 10#{p}x;\ \n test-44: 10px == 10#{p}x;\ \n test-45: #{10}px==#{10}px;\ \n test-46: #{10}px ==#{10}px;\ \n test-47: #{10}px== #{10}px;\ \n test-48: #{10}px == #{10}px;\ \n test-49: #{10}px==1#{0}px;\ \n test-50: #{10}px ==1#{0}px;\ \n test-51: #{10}px== 1#{0}px;\ \n test-52: #{10}px == 1#{0}px;\ \n test-53: #{10}px==10#{px};\ \n test-54: #{10}px ==10#{px};\ \n test-55: #{10}px== 10#{px};\ \n test-56: #{10}px == 10#{px};\ \n test-57: #{10}px==10#{p}x;\ \n test-58: #{10}px ==10#{p}x;\ \n test-59: #{10}px== 10#{p}x;\ \n test-60: #{10}px == 10#{p}x;\ \n test-61: 1#{0}px==1#{0}px;\ \n test-62: 1#{0}px ==1#{0}px;\ \n test-63: 1#{0}px== 1#{0}px;\ \n test-64: 1#{0}px == 1#{0}px;\ \n test-65: 1#{0}px==10#{px};\ \n test-66: 1#{0}px ==10#{px};\ \n test-67: 1#{0}px== 10#{px};\ \n test-68: 1#{0}px == 10#{px};\ \n test-69: 1#{0}px==10#{p}x;\ \n test-70: 1#{0}px ==10#{p}x;\ \n test-71: 1#{0}px== 10#{p}x;\ \n test-72: 1#{0}px == 10#{p}x;\ \n test-73: 10#{px}==10#{px};\ \n test-74: 10#{px} ==10#{px};\ \n test-75: 10#{px}== 10#{px};\ \n test-76: 10#{px} == 10#{px};\ \n test-77: 10#{px}==10#{p}x;\ \n test-78: 10#{px} ==10#{p}x;\ \n test-79: 10#{px}== 10#{p}x;\ \n test-80: 10#{px} == 10#{p}x;\ \n test-81: 10#{p}x==10#{p}x;\ \n test-82: 10#{p}x ==10#{p}x;\ \n test-83: 10#{p}x== 10#{p}x;\ \n test-84: 10#{p}x == 10#{p}x;\ \n}\n"), "foo {\ \n test-1: true;\ \n test-2: true;\ \n test-3: true;\ \n test-4: true;\ \n test-5: false;\ \n test-6: false;\ \n test-7: false;\ \n test-8: false;\ \n test-9: false;\ \n test-10: false;\ \n test-11: false;\ \n test-12: false;\ \n test-13: false 0px;\ \n test-14: false 0px;\ \n test-15: false 0px;\ \n test-16: false 0px;\ \n test-17: true px;\ \n test-18: true px;\ \n test-19: true px;\ \n test-20: true px;\ \n test-21: true px;\ \n test-22: true px;\ \n test-23: true px;\ \n test-24: true px;\ \n test-25: true;\ \n test-26: true;\ \n test-27: true;\ \n test-28: true;\ \n test-29: false;\ \n test-30: false;\ \n test-31: false;\ \n test-32: false;\ \n test-33: false 0px;\ \n test-34: false 0px;\ \n test-35: false 0px;\ \n test-36: false 0px;\ \n test-37: false px;\ \n test-38: false px;\ \n test-39: false px;\ \n test-40: false px;\ \n test-41: false px;\ \n test-42: false px;\ \n test-43: false px;\ \n test-44: false px;\ \n test-45: true;\ \n test-46: true;\ \n test-47: true;\ \n test-48: true;\ \n test-49: false 0px;\ \n test-50: false 0px;\ \n test-51: false 0px;\ \n test-52: false 0px;\ \n test-53: false px;\ \n test-54: false px;\ \n test-55: false px;\ \n test-56: false px;\ \n test-57: false px;\ \n test-58: false px;\ \n test-59: false px;\ \n test-60: false px;\ \n test-61: 1 false 0px;\ \n test-62: 1 false 0px;\ \n test-63: 1 false 0px;\ \n test-64: 1 false 0px;\ \n test-65: 1 false px;\ \n test-66: 1 false px;\ \n test-67: 1 false px;\ \n test-68: 1 false px;\ \n test-69: 1 false px;\ \n test-70: 1 false px;\ \n test-71: 1 false px;\ \n test-72: 1 false px;\ \n test-73: 10 false px;\ \n test-74: 10 false px;\ \n test-75: 10 false px;\ \n test-76: 10 false px;\ \n test-77: 10 false px;\ \n test-78: 10 false px;\ \n test-79: 10 false px;\ \n test-80: 10 false px;\ \n test-81: 10 false px;\ \n test-82: 10 false px;\ \n test-83: 10 false px;\ \n test-84: 10 false px;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/logic_eq/mixed/000077500000000000000000000000001474765622100275715ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/logic_eq/mixed/mod.rs000066400000000000000000000003101474765622100307100ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/operations/logic_eq/mixed" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("mixed") } mod pairs; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/logic_eq/mixed/pairs.rs000066400000000000000000000106101474765622100312530ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/operations/logic_eq/mixed/pairs.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("pairs") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n test-1: 10==10;\ \n test-2: 10 ==10;\ \n test-3: 10== 10;\ \n test-4: 10 == 10;\ \n test-5: 10==10%;\ \n test-6: 10 ==10%;\ \n test-7: 10== 10%;\ \n test-8: 10 == 10%;\ \n test-9: 10==10px;\ \n test-10: 10 ==10px;\ \n test-11: 10== 10px;\ \n test-12: 10 == 10px;\ \n test-13: 10==#AAA;\ \n test-14: 10 ==#AAA;\ \n test-15: 10== #AAA;\ \n test-16: 10 == #AAA;\ \n test-17: 10==#{itpl};\ \n test-18: 10 ==#{itpl};\ \n test-19: 10== #{itpl};\ \n test-20: 10 == #{itpl};\ \n test-21: 10%==10%;\ \n test-22: 10% ==10%;\ \n test-23: 10%== 10%;\ \n test-24: 10% == 10%;\ \n test-25: 10%==10px;\ \n test-26: 10% ==10px;\ \n test-27: 10%== 10px;\ \n test-28: 10% == 10px;\ \n test-29: 10%==#AAA;\ \n test-30: 10% ==#AAA;\ \n test-31: 10%== #AAA;\ \n test-32: 10% == #AAA;\ \n test-33: 10%==#{itpl};\ \n test-34: 10% ==#{itpl};\ \n test-35: 10%== #{itpl};\ \n test-36: 10% == #{itpl};\ \n test-37: 10px==10px;\ \n test-38: 10px ==10px;\ \n test-39: 10px== 10px;\ \n test-40: 10px == 10px;\ \n test-41: 10px==#AAA;\ \n test-42: 10px ==#AAA;\ \n test-43: 10px== #AAA;\ \n test-44: 10px == #AAA;\ \n test-45: 10px==#{itpl};\ \n test-46: 10px ==#{itpl};\ \n test-47: 10px== #{itpl};\ \n test-48: 10px == #{itpl};\ \n test-49: #AAA==#AAA;\ \n test-50: #AAA ==#AAA;\ \n test-51: #AAA== #AAA;\ \n test-52: #AAA == #AAA;\ \n test-53: #AAA==#{itpl};\ \n test-54: #AAA ==#{itpl};\ \n test-55: #AAA== #{itpl};\ \n test-56: #AAA == #{itpl};\ \n test-57: #{itpl}==#{itpl};\ \n test-58: #{itpl} ==#{itpl};\ \n test-59: #{itpl}== #{itpl};\ \n test-60: #{itpl} == #{itpl};\ \n}\n"), "foo {\ \n test-1: true;\ \n test-2: true;\ \n test-3: true;\ \n test-4: true;\ \n test-5: false;\ \n test-6: false;\ \n test-7: false;\ \n test-8: false;\ \n test-9: false;\ \n test-10: false;\ \n test-11: false;\ \n test-12: false;\ \n test-13: false;\ \n test-14: false;\ \n test-15: false;\ \n test-16: false;\ \n test-17: false;\ \n test-18: false;\ \n test-19: false;\ \n test-20: false;\ \n test-21: true;\ \n test-22: true;\ \n test-23: true;\ \n test-24: true;\ \n test-25: false;\ \n test-26: false;\ \n test-27: false;\ \n test-28: false;\ \n test-29: false;\ \n test-30: false;\ \n test-31: false;\ \n test-32: false;\ \n test-33: false;\ \n test-34: false;\ \n test-35: false;\ \n test-36: false;\ \n test-37: true;\ \n test-38: true;\ \n test-39: true;\ \n test-40: true;\ \n test-41: false;\ \n test-42: false;\ \n test-43: false;\ \n test-44: false;\ \n test-45: false;\ \n test-46: false;\ \n test-47: false;\ \n test-48: false;\ \n test-49: true;\ \n test-50: true;\ \n test-51: true;\ \n test-52: true;\ \n test-53: false;\ \n test-54: false;\ \n test-55: false;\ \n test-56: false;\ \n test-57: true;\ \n test-58: true;\ \n test-59: true;\ \n test-60: true;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/logic_eq/mod.rs000066400000000000000000000003621474765622100276110ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/operations/logic_eq" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("logic_eq") } mod dimensions; mod mixed; mod numbers; mod strings; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/logic_eq/numbers/000077500000000000000000000000001474765622100301365ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/logic_eq/numbers/mod.rs000066400000000000000000000003141474765622100312610ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/operations/logic_eq/numbers" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("numbers") } mod pairs; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/logic_eq/numbers/pairs.rs000066400000000000000000000061221474765622100316230ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/operations/logic_eq/numbers/pairs.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("pairs") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n test-1: 10==10;\ \n test-2: 10 ==10;\ \n test-3: 10== 10;\ \n test-4: 10 == 10;\ \n test-5: 10==#{10};\ \n test-6: 10 ==#{10};\ \n test-7: 10== #{10};\ \n test-8: 10 == #{10};\ \n test-9: 10==1#{0};\ \n test-10: 10 ==1#{0};\ \n test-11: 10== 1#{0};\ \n test-12: 10 == 1#{0};\ \n test-13: 10==#{1}0;\ \n test-14: 10 ==#{1}0;\ \n test-15: 10== #{1}0;\ \n test-16: 10 == #{1}0;\ \n test-17: #{10}==#{10};\ \n test-18: #{10} ==#{10};\ \n test-19: #{10}== #{10};\ \n test-20: #{10} == #{10};\ \n test-21: #{10}==1#{0};\ \n test-22: #{10} ==1#{0};\ \n test-23: #{10}== 1#{0};\ \n test-24: #{10} == 1#{0};\ \n test-25: #{10}==#{1}0;\ \n test-26: #{10} ==#{1}0;\ \n test-27: #{10}== #{1}0;\ \n test-28: #{10} == #{1}0;\ \n test-29: 1#{0}==1#{0};\ \n test-30: 1#{0} ==1#{0};\ \n test-31: 1#{0}== 1#{0};\ \n test-32: 1#{0} == 1#{0};\ \n test-33: 1#{0}==#{1}0;\ \n test-34: 1#{0} ==#{1}0;\ \n test-35: 1#{0}== #{1}0;\ \n test-36: 1#{0} == #{1}0;\ \n test-37: #{1}0==#{1}0;\ \n test-38: #{1}0 ==#{1}0;\ \n test-39: #{1}0== #{1}0;\ \n test-40: #{1}0 == #{1}0;\ \n}\n"), "foo {\ \n test-1: true;\ \n test-2: true;\ \n test-3: true;\ \n test-4: true;\ \n test-5: false;\ \n test-6: false;\ \n test-7: false;\ \n test-8: false;\ \n test-9: false 0;\ \n test-10: false 0;\ \n test-11: false 0;\ \n test-12: false 0;\ \n test-13: false;\ \n test-14: false;\ \n test-15: false;\ \n test-16: false;\ \n test-17: true;\ \n test-18: true;\ \n test-19: true;\ \n test-20: true;\ \n test-21: false 0;\ \n test-22: false 0;\ \n test-23: false 0;\ \n test-24: false 0;\ \n test-25: true;\ \n test-26: true;\ \n test-27: true;\ \n test-28: true;\ \n test-29: 1 false 0;\ \n test-30: 1 false 0;\ \n test-31: 1 false 0;\ \n test-32: 1 false 0;\ \n test-33: 1 false;\ \n test-34: 1 false;\ \n test-35: 1 false;\ \n test-36: 1 false;\ \n test-37: true;\ \n test-38: true;\ \n test-39: true;\ \n test-40: true;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/logic_eq/strings/000077500000000000000000000000001474765622100301545ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/logic_eq/strings/mod.rs000066400000000000000000000003141474765622100312770ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/operations/logic_eq/strings" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("strings") } mod pairs; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/logic_eq/strings/pairs.rs000066400000000000000000000126221474765622100316430ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/operations/logic_eq/strings/pairs.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("pairs") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n test-1: literal==literal;\ \n test-2: literal ==literal;\ \n test-3: literal== literal;\ \n test-4: literal == literal;\ \n test-5: literal==\"quoted\";\ \n test-6: literal ==\"quoted\";\ \n test-7: literal== \"quoted\";\ \n test-8: literal == \"quoted\";\ \n test-9: literal==#{interpolant};\ \n test-10: literal ==#{interpolant};\ \n test-11: literal== #{interpolant};\ \n test-12: literal == #{interpolant};\ \n test-13: literal==lschema_#{ritlp};\ \n test-14: literal ==lschema_#{ritlp};\ \n test-15: literal== lschema_#{ritlp};\ \n test-16: literal == lschema_#{ritlp};\ \n test-17: literal==#{litlp}_rschema;\ \n test-18: literal ==#{litlp}_rschema;\ \n test-19: literal== #{litlp}_rschema;\ \n test-20: literal == #{litlp}_rschema;\ \n test-21: \"quoted\"==\"quoted\";\ \n test-22: \"quoted\" ==\"quoted\";\ \n test-23: \"quoted\"== \"quoted\";\ \n test-24: \"quoted\" == \"quoted\";\ \n test-25: \"quoted\"==#{interpolant};\ \n test-26: \"quoted\" ==#{interpolant};\ \n test-27: \"quoted\"== #{interpolant};\ \n test-28: \"quoted\" == #{interpolant};\ \n test-29: \"quoted\"==lschema_#{ritlp};\ \n test-30: \"quoted\" ==lschema_#{ritlp};\ \n test-31: \"quoted\"== lschema_#{ritlp};\ \n test-32: \"quoted\" == lschema_#{ritlp};\ \n test-33: \"quoted\"==#{litlp}_rschema;\ \n test-34: \"quoted\" ==#{litlp}_rschema;\ \n test-35: \"quoted\"== #{litlp}_rschema;\ \n test-36: \"quoted\" == #{litlp}_rschema;\ \n test-37: #{interpolant}==#{interpolant};\ \n test-38: #{interpolant} ==#{interpolant};\ \n test-39: #{interpolant}== #{interpolant};\ \n test-40: #{interpolant} == #{interpolant};\ \n test-41: #{interpolant}==lschema_#{ritlp};\ \n test-42: #{interpolant} ==lschema_#{ritlp};\ \n test-43: #{interpolant}== lschema_#{ritlp};\ \n test-44: #{interpolant} == lschema_#{ritlp};\ \n test-45: #{interpolant}==#{litlp}_rschema;\ \n test-46: #{interpolant} ==#{litlp}_rschema;\ \n test-47: #{interpolant}== #{litlp}_rschema;\ \n test-48: #{interpolant} == #{litlp}_rschema;\ \n test-49: lschema_#{ritlp}==lschema_#{ritlp};\ \n test-50: lschema_#{ritlp} ==lschema_#{ritlp};\ \n test-51: lschema_#{ritlp}== lschema_#{ritlp};\ \n test-52: lschema_#{ritlp} == lschema_#{ritlp};\ \n test-53: lschema_#{ritlp}==#{litlp}_rschema;\ \n test-54: lschema_#{ritlp} ==#{litlp}_rschema;\ \n test-55: lschema_#{ritlp}== #{litlp}_rschema;\ \n test-56: lschema_#{ritlp} == #{litlp}_rschema;\ \n test-57: #{litlp}_rschema==#{litlp}_rschema;\ \n test-58: #{litlp}_rschema ==#{litlp}_rschema;\ \n test-59: #{litlp}_rschema== #{litlp}_rschema;\ \n test-60: #{litlp}_rschema == #{litlp}_rschema;\ \n}\n"), "foo {\ \n test-1: true;\ \n test-2: true;\ \n test-3: true;\ \n test-4: true;\ \n test-5: false;\ \n test-6: false;\ \n test-7: false;\ \n test-8: false;\ \n test-9: false;\ \n test-10: false;\ \n test-11: false;\ \n test-12: false;\ \n test-13: false;\ \n test-14: false;\ \n test-15: false;\ \n test-16: false;\ \n test-17: false;\ \n test-18: false;\ \n test-19: false;\ \n test-20: false;\ \n test-21: true;\ \n test-22: true;\ \n test-23: true;\ \n test-24: true;\ \n test-25: false;\ \n test-26: false;\ \n test-27: false;\ \n test-28: false;\ \n test-29: false;\ \n test-30: false;\ \n test-31: false;\ \n test-32: false;\ \n test-33: false;\ \n test-34: false;\ \n test-35: false;\ \n test-36: false;\ \n test-37: true;\ \n test-38: true;\ \n test-39: true;\ \n test-40: true;\ \n test-41: false;\ \n test-42: false;\ \n test-43: false;\ \n test-44: false;\ \n test-45: false;\ \n test-46: false;\ \n test-47: false;\ \n test-48: false;\ \n test-49: true;\ \n test-50: true;\ \n test-51: true;\ \n test-52: true;\ \n test-53: false;\ \n test-54: false;\ \n test-55: false;\ \n test-56: false;\ \n test-57: true;\ \n test-58: true;\ \n test-59: true;\ \n test-60: true;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/logic_ne/000077500000000000000000000000001474765622100264605ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/logic_ne/dimensions/000077500000000000000000000000001474765622100306305ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/logic_ne/dimensions/mod.rs000066400000000000000000000003221474765622100317520ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/operations/logic_ne/dimensions" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("dimensions") } mod pairs; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/logic_ne/dimensions/pairs.rs000066400000000000000000000150111474765622100323120ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/operations/logic_ne/dimensions/pairs.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("pairs") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n test-1: 10!=10;\ \n test-2: 10 !=10;\ \n test-3: 10!= 10;\ \n test-4: 10 != 10;\ \n test-5: 10!=10px;\ \n test-6: 10 !=10px;\ \n test-7: 10!= 10px;\ \n test-8: 10 != 10px;\ \n test-9: 10!=#{10}px;\ \n test-10: 10 !=#{10}px;\ \n test-11: 10!= #{10}px;\ \n test-12: 10 != #{10}px;\ \n test-13: 10!=1#{0}px;\ \n test-14: 10 !=1#{0}px;\ \n test-15: 10!= 1#{0}px;\ \n test-16: 10 != 1#{0}px;\ \n test-17: 10!=10#{px};\ \n test-18: 10 !=10#{px};\ \n test-19: 10!= 10#{px};\ \n test-20: 10 != 10#{px};\ \n test-21: 10!=10#{p}x;\ \n test-22: 10 !=10#{p}x;\ \n test-23: 10!= 10#{p}x;\ \n test-24: 10 != 10#{p}x;\ \n test-25: 10px!=10px;\ \n test-26: 10px !=10px;\ \n test-27: 10px!= 10px;\ \n test-28: 10px != 10px;\ \n test-29: 10px!=#{10}px;\ \n test-30: 10px !=#{10}px;\ \n test-31: 10px!= #{10}px;\ \n test-32: 10px != #{10}px;\ \n test-33: 10px!=1#{0}px;\ \n test-34: 10px !=1#{0}px;\ \n test-35: 10px!= 1#{0}px;\ \n test-36: 10px != 1#{0}px;\ \n test-37: 10px!=10#{px};\ \n test-38: 10px !=10#{px};\ \n test-39: 10px!= 10#{px};\ \n test-40: 10px != 10#{px};\ \n test-41: 10px!=10#{p}x;\ \n test-42: 10px !=10#{p}x;\ \n test-43: 10px!= 10#{p}x;\ \n test-44: 10px != 10#{p}x;\ \n test-45: #{10}px!=#{10}px;\ \n test-46: #{10}px !=#{10}px;\ \n test-47: #{10}px!= #{10}px;\ \n test-48: #{10}px != #{10}px;\ \n test-49: #{10}px!=1#{0}px;\ \n test-50: #{10}px !=1#{0}px;\ \n test-51: #{10}px!= 1#{0}px;\ \n test-52: #{10}px != 1#{0}px;\ \n test-53: #{10}px!=10#{px};\ \n test-54: #{10}px !=10#{px};\ \n test-55: #{10}px!= 10#{px};\ \n test-56: #{10}px != 10#{px};\ \n test-57: #{10}px!=10#{p}x;\ \n test-58: #{10}px !=10#{p}x;\ \n test-59: #{10}px!= 10#{p}x;\ \n test-60: #{10}px != 10#{p}x;\ \n test-61: 1#{0}px!=1#{0}px;\ \n test-62: 1#{0}px !=1#{0}px;\ \n test-63: 1#{0}px!= 1#{0}px;\ \n test-64: 1#{0}px != 1#{0}px;\ \n test-65: 1#{0}px!=10#{px};\ \n test-66: 1#{0}px !=10#{px};\ \n test-67: 1#{0}px!= 10#{px};\ \n test-68: 1#{0}px != 10#{px};\ \n test-69: 1#{0}px!=10#{p}x;\ \n test-70: 1#{0}px !=10#{p}x;\ \n test-71: 1#{0}px!= 10#{p}x;\ \n test-72: 1#{0}px != 10#{p}x;\ \n test-73: 10#{px}!=10#{px};\ \n test-74: 10#{px} !=10#{px};\ \n test-75: 10#{px}!= 10#{px};\ \n test-76: 10#{px} != 10#{px};\ \n test-77: 10#{px}!=10#{p}x;\ \n test-78: 10#{px} !=10#{p}x;\ \n test-79: 10#{px}!= 10#{p}x;\ \n test-80: 10#{px} != 10#{p}x;\ \n test-81: 10#{p}x!=10#{p}x;\ \n test-82: 10#{p}x !=10#{p}x;\ \n test-83: 10#{p}x!= 10#{p}x;\ \n test-84: 10#{p}x != 10#{p}x;\ \n}\n"), "foo {\ \n test-1: false;\ \n test-2: false;\ \n test-3: false;\ \n test-4: false;\ \n test-5: true;\ \n test-6: true;\ \n test-7: true;\ \n test-8: true;\ \n test-9: true;\ \n test-10: true;\ \n test-11: true;\ \n test-12: true;\ \n test-13: true 0px;\ \n test-14: true 0px;\ \n test-15: true 0px;\ \n test-16: true 0px;\ \n test-17: false px;\ \n test-18: false px;\ \n test-19: false px;\ \n test-20: false px;\ \n test-21: false px;\ \n test-22: false px;\ \n test-23: false px;\ \n test-24: false px;\ \n test-25: false;\ \n test-26: false;\ \n test-27: false;\ \n test-28: false;\ \n test-29: true;\ \n test-30: true;\ \n test-31: true;\ \n test-32: true;\ \n test-33: true 0px;\ \n test-34: true 0px;\ \n test-35: true 0px;\ \n test-36: true 0px;\ \n test-37: true px;\ \n test-38: true px;\ \n test-39: true px;\ \n test-40: true px;\ \n test-41: true px;\ \n test-42: true px;\ \n test-43: true px;\ \n test-44: true px;\ \n test-45: false;\ \n test-46: false;\ \n test-47: false;\ \n test-48: false;\ \n test-49: true 0px;\ \n test-50: true 0px;\ \n test-51: true 0px;\ \n test-52: true 0px;\ \n test-53: true px;\ \n test-54: true px;\ \n test-55: true px;\ \n test-56: true px;\ \n test-57: true px;\ \n test-58: true px;\ \n test-59: true px;\ \n test-60: true px;\ \n test-61: 1 true 0px;\ \n test-62: 1 true 0px;\ \n test-63: 1 true 0px;\ \n test-64: 1 true 0px;\ \n test-65: 1 true px;\ \n test-66: 1 true px;\ \n test-67: 1 true px;\ \n test-68: 1 true px;\ \n test-69: 1 true px;\ \n test-70: 1 true px;\ \n test-71: 1 true px;\ \n test-72: 1 true px;\ \n test-73: 10 true px;\ \n test-74: 10 true px;\ \n test-75: 10 true px;\ \n test-76: 10 true px;\ \n test-77: 10 true px;\ \n test-78: 10 true px;\ \n test-79: 10 true px;\ \n test-80: 10 true px;\ \n test-81: 10 true px;\ \n test-82: 10 true px;\ \n test-83: 10 true px;\ \n test-84: 10 true px;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/logic_ne/mixed/000077500000000000000000000000001474765622100275665ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/logic_ne/mixed/mod.rs000066400000000000000000000003101474765622100307050ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/operations/logic_ne/mixed" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("mixed") } mod pairs; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/logic_ne/mixed/pairs.rs000066400000000000000000000105641474765622100312600ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/operations/logic_ne/mixed/pairs.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("pairs") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n test-1: 10!=10;\ \n test-2: 10 !=10;\ \n test-3: 10!= 10;\ \n test-4: 10 != 10;\ \n test-5: 10!=10%;\ \n test-6: 10 !=10%;\ \n test-7: 10!= 10%;\ \n test-8: 10 != 10%;\ \n test-9: 10!=10px;\ \n test-10: 10 !=10px;\ \n test-11: 10!= 10px;\ \n test-12: 10 != 10px;\ \n test-13: 10!=#AAA;\ \n test-14: 10 !=#AAA;\ \n test-15: 10!= #AAA;\ \n test-16: 10 != #AAA;\ \n test-17: 10!=#{itpl};\ \n test-18: 10 !=#{itpl};\ \n test-19: 10!= #{itpl};\ \n test-20: 10 != #{itpl};\ \n test-21: 10%!=10%;\ \n test-22: 10% !=10%;\ \n test-23: 10%!= 10%;\ \n test-24: 10% != 10%;\ \n test-25: 10%!=10px;\ \n test-26: 10% !=10px;\ \n test-27: 10%!= 10px;\ \n test-28: 10% != 10px;\ \n test-29: 10%!=#AAA;\ \n test-30: 10% !=#AAA;\ \n test-31: 10%!= #AAA;\ \n test-32: 10% != #AAA;\ \n test-33: 10%!=#{itpl};\ \n test-34: 10% !=#{itpl};\ \n test-35: 10%!= #{itpl};\ \n test-36: 10% != #{itpl};\ \n test-37: 10px!=10px;\ \n test-38: 10px !=10px;\ \n test-39: 10px!= 10px;\ \n test-40: 10px != 10px;\ \n test-41: 10px!=#AAA;\ \n test-42: 10px !=#AAA;\ \n test-43: 10px!= #AAA;\ \n test-44: 10px != #AAA;\ \n test-45: 10px!=#{itpl};\ \n test-46: 10px !=#{itpl};\ \n test-47: 10px!= #{itpl};\ \n test-48: 10px != #{itpl};\ \n test-49: #AAA!=#AAA;\ \n test-50: #AAA !=#AAA;\ \n test-51: #AAA!= #AAA;\ \n test-52: #AAA != #AAA;\ \n test-53: #AAA!=#{itpl};\ \n test-54: #AAA !=#{itpl};\ \n test-55: #AAA!= #{itpl};\ \n test-56: #AAA != #{itpl};\ \n test-57: #{itpl}!=#{itpl};\ \n test-58: #{itpl} !=#{itpl};\ \n test-59: #{itpl}!= #{itpl};\ \n test-60: #{itpl} != #{itpl};\ \n}\n"), "foo {\ \n test-1: false;\ \n test-2: false;\ \n test-3: false;\ \n test-4: false;\ \n test-5: true;\ \n test-6: true;\ \n test-7: true;\ \n test-8: true;\ \n test-9: true;\ \n test-10: true;\ \n test-11: true;\ \n test-12: true;\ \n test-13: true;\ \n test-14: true;\ \n test-15: true;\ \n test-16: true;\ \n test-17: true;\ \n test-18: true;\ \n test-19: true;\ \n test-20: true;\ \n test-21: false;\ \n test-22: false;\ \n test-23: false;\ \n test-24: false;\ \n test-25: true;\ \n test-26: true;\ \n test-27: true;\ \n test-28: true;\ \n test-29: true;\ \n test-30: true;\ \n test-31: true;\ \n test-32: true;\ \n test-33: true;\ \n test-34: true;\ \n test-35: true;\ \n test-36: true;\ \n test-37: false;\ \n test-38: false;\ \n test-39: false;\ \n test-40: false;\ \n test-41: true;\ \n test-42: true;\ \n test-43: true;\ \n test-44: true;\ \n test-45: true;\ \n test-46: true;\ \n test-47: true;\ \n test-48: true;\ \n test-49: false;\ \n test-50: false;\ \n test-51: false;\ \n test-52: false;\ \n test-53: true;\ \n test-54: true;\ \n test-55: true;\ \n test-56: true;\ \n test-57: false;\ \n test-58: false;\ \n test-59: false;\ \n test-60: false;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/logic_ne/mod.rs000066400000000000000000000003621474765622100276060ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/operations/logic_ne" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("logic_ne") } mod dimensions; mod mixed; mod numbers; mod strings; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/logic_ne/numbers/000077500000000000000000000000001474765622100301335ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/logic_ne/numbers/mod.rs000066400000000000000000000003141474765622100312560ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/operations/logic_ne/numbers" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("numbers") } mod pairs; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/logic_ne/numbers/pairs.rs000066400000000000000000000061121474765622100316170ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/operations/logic_ne/numbers/pairs.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("pairs") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n test-1: 10!=10;\ \n test-2: 10 !=10;\ \n test-3: 10!= 10;\ \n test-4: 10 != 10;\ \n test-5: 10!=#{10};\ \n test-6: 10 !=#{10};\ \n test-7: 10!= #{10};\ \n test-8: 10 != #{10};\ \n test-9: 10!=1#{0};\ \n test-10: 10 !=1#{0};\ \n test-11: 10!= 1#{0};\ \n test-12: 10 != 1#{0};\ \n test-13: 10!=#{1}0;\ \n test-14: 10 !=#{1}0;\ \n test-15: 10!= #{1}0;\ \n test-16: 10 != #{1}0;\ \n test-17: #{10}!=#{10};\ \n test-18: #{10} !=#{10};\ \n test-19: #{10}!= #{10};\ \n test-20: #{10} != #{10};\ \n test-21: #{10}!=1#{0};\ \n test-22: #{10} !=1#{0};\ \n test-23: #{10}!= 1#{0};\ \n test-24: #{10} != 1#{0};\ \n test-25: #{10}!=#{1}0;\ \n test-26: #{10} !=#{1}0;\ \n test-27: #{10}!= #{1}0;\ \n test-28: #{10} != #{1}0;\ \n test-29: 1#{0}!=1#{0};\ \n test-30: 1#{0} !=1#{0};\ \n test-31: 1#{0}!= 1#{0};\ \n test-32: 1#{0} != 1#{0};\ \n test-33: 1#{0}!=#{1}0;\ \n test-34: 1#{0} !=#{1}0;\ \n test-35: 1#{0}!= #{1}0;\ \n test-36: 1#{0} != #{1}0;\ \n test-37: #{1}0!=#{1}0;\ \n test-38: #{1}0 !=#{1}0;\ \n test-39: #{1}0!= #{1}0;\ \n test-40: #{1}0 != #{1}0;\ \n}\n"), "foo {\ \n test-1: false;\ \n test-2: false;\ \n test-3: false;\ \n test-4: false;\ \n test-5: true;\ \n test-6: true;\ \n test-7: true;\ \n test-8: true;\ \n test-9: true 0;\ \n test-10: true 0;\ \n test-11: true 0;\ \n test-12: true 0;\ \n test-13: true;\ \n test-14: true;\ \n test-15: true;\ \n test-16: true;\ \n test-17: false;\ \n test-18: false;\ \n test-19: false;\ \n test-20: false;\ \n test-21: true 0;\ \n test-22: true 0;\ \n test-23: true 0;\ \n test-24: true 0;\ \n test-25: false;\ \n test-26: false;\ \n test-27: false;\ \n test-28: false;\ \n test-29: 1 true 0;\ \n test-30: 1 true 0;\ \n test-31: 1 true 0;\ \n test-32: 1 true 0;\ \n test-33: 1 true;\ \n test-34: 1 true;\ \n test-35: 1 true;\ \n test-36: 1 true;\ \n test-37: false;\ \n test-38: false;\ \n test-39: false;\ \n test-40: false;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/logic_ne/strings/000077500000000000000000000000001474765622100301515ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/logic_ne/strings/mod.rs000066400000000000000000000003141474765622100312740ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/operations/logic_ne/strings" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("strings") } mod pairs; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/logic_ne/strings/pairs.rs000066400000000000000000000125761474765622100316500ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/operations/logic_ne/strings/pairs.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("pairs") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n test-1: literal!=literal;\ \n test-2: literal !=literal;\ \n test-3: literal!= literal;\ \n test-4: literal != literal;\ \n test-5: literal!=\"quoted\";\ \n test-6: literal !=\"quoted\";\ \n test-7: literal!= \"quoted\";\ \n test-8: literal != \"quoted\";\ \n test-9: literal!=#{interpolant};\ \n test-10: literal !=#{interpolant};\ \n test-11: literal!= #{interpolant};\ \n test-12: literal != #{interpolant};\ \n test-13: literal!=lschema_#{ritlp};\ \n test-14: literal !=lschema_#{ritlp};\ \n test-15: literal!= lschema_#{ritlp};\ \n test-16: literal != lschema_#{ritlp};\ \n test-17: literal!=#{litlp}_rschema;\ \n test-18: literal !=#{litlp}_rschema;\ \n test-19: literal!= #{litlp}_rschema;\ \n test-20: literal != #{litlp}_rschema;\ \n test-21: \"quoted\"!=\"quoted\";\ \n test-22: \"quoted\" !=\"quoted\";\ \n test-23: \"quoted\"!= \"quoted\";\ \n test-24: \"quoted\" != \"quoted\";\ \n test-25: \"quoted\"!=#{interpolant};\ \n test-26: \"quoted\" !=#{interpolant};\ \n test-27: \"quoted\"!= #{interpolant};\ \n test-28: \"quoted\" != #{interpolant};\ \n test-29: \"quoted\"!=lschema_#{ritlp};\ \n test-30: \"quoted\" !=lschema_#{ritlp};\ \n test-31: \"quoted\"!= lschema_#{ritlp};\ \n test-32: \"quoted\" != lschema_#{ritlp};\ \n test-33: \"quoted\"!=#{litlp}_rschema;\ \n test-34: \"quoted\" !=#{litlp}_rschema;\ \n test-35: \"quoted\"!= #{litlp}_rschema;\ \n test-36: \"quoted\" != #{litlp}_rschema;\ \n test-37: #{interpolant}!=#{interpolant};\ \n test-38: #{interpolant} !=#{interpolant};\ \n test-39: #{interpolant}!= #{interpolant};\ \n test-40: #{interpolant} != #{interpolant};\ \n test-41: #{interpolant}!=lschema_#{ritlp};\ \n test-42: #{interpolant} !=lschema_#{ritlp};\ \n test-43: #{interpolant}!= lschema_#{ritlp};\ \n test-44: #{interpolant} != lschema_#{ritlp};\ \n test-45: #{interpolant}!=#{litlp}_rschema;\ \n test-46: #{interpolant} !=#{litlp}_rschema;\ \n test-47: #{interpolant}!= #{litlp}_rschema;\ \n test-48: #{interpolant} != #{litlp}_rschema;\ \n test-49: lschema_#{ritlp}!=lschema_#{ritlp};\ \n test-50: lschema_#{ritlp} !=lschema_#{ritlp};\ \n test-51: lschema_#{ritlp}!= lschema_#{ritlp};\ \n test-52: lschema_#{ritlp} != lschema_#{ritlp};\ \n test-53: lschema_#{ritlp}!=#{litlp}_rschema;\ \n test-54: lschema_#{ritlp} !=#{litlp}_rschema;\ \n test-55: lschema_#{ritlp}!= #{litlp}_rschema;\ \n test-56: lschema_#{ritlp} != #{litlp}_rschema;\ \n test-57: #{litlp}_rschema!=#{litlp}_rschema;\ \n test-58: #{litlp}_rschema !=#{litlp}_rschema;\ \n test-59: #{litlp}_rschema!= #{litlp}_rschema;\ \n test-60: #{litlp}_rschema != #{litlp}_rschema;\ \n}\n"), "foo {\ \n test-1: false;\ \n test-2: false;\ \n test-3: false;\ \n test-4: false;\ \n test-5: true;\ \n test-6: true;\ \n test-7: true;\ \n test-8: true;\ \n test-9: true;\ \n test-10: true;\ \n test-11: true;\ \n test-12: true;\ \n test-13: true;\ \n test-14: true;\ \n test-15: true;\ \n test-16: true;\ \n test-17: true;\ \n test-18: true;\ \n test-19: true;\ \n test-20: true;\ \n test-21: false;\ \n test-22: false;\ \n test-23: false;\ \n test-24: false;\ \n test-25: true;\ \n test-26: true;\ \n test-27: true;\ \n test-28: true;\ \n test-29: true;\ \n test-30: true;\ \n test-31: true;\ \n test-32: true;\ \n test-33: true;\ \n test-34: true;\ \n test-35: true;\ \n test-36: true;\ \n test-37: false;\ \n test-38: false;\ \n test-39: false;\ \n test-40: false;\ \n test-41: true;\ \n test-42: true;\ \n test-43: true;\ \n test-44: true;\ \n test-45: true;\ \n test-46: true;\ \n test-47: true;\ \n test-48: true;\ \n test-49: false;\ \n test-50: false;\ \n test-51: false;\ \n test-52: false;\ \n test-53: true;\ \n test-54: true;\ \n test-55: true;\ \n test-56: true;\ \n test-57: false;\ \n test-58: false;\ \n test-59: false;\ \n test-60: false;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/mod.rs000066400000000000000000000004241474765622100260260ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/operations" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("operations") } mod addition; mod binary_and_unary; mod division; mod logic_eq; mod logic_ne; mod subtract; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/subtract/000077500000000000000000000000001474765622100265305ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/subtract/dimensions/000077500000000000000000000000001474765622100307005ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/subtract/dimensions/mod.rs000066400000000000000000000003221474765622100320220ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/operations/subtract/dimensions" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("dimensions") } mod pairs; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/subtract/dimensions/pairs.rs000066400000000000000000000150751474765622100323740ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/operations/subtract/dimensions/pairs.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("pairs") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok("foo {\ \n test-1: 10-10;\ \n test-2: 10 -10;\ \n test-3: 10- 10;\ \n test-4: 10 - 10;\ \n test-5: 10-10px;\ \n test-6: 10 -10px;\ \n test-7: 10- 10px;\ \n test-8: 10 - 10px;\ \n test-9: 10-#{10}px;\ \n test-10: 10 -#{10}px;\ \n test-11: 10- #{10}px;\ \n test-12: 10 - #{10}px;\ \n test-13: 10-1#{0}px;\ \n test-14: 10 -1#{0}px;\ \n test-15: 10- 1#{0}px;\ \n test-16: 10 - 1#{0}px;\ \n test-17: 10-10#{px};\ \n test-18: 10 -10#{px};\ \n test-19: 10- 10#{px};\ \n test-20: 10 - 10#{px};\ \n test-21: 10-10#{p}x;\ \n test-22: 10 -10#{p}x;\ \n test-23: 10- 10#{p}x;\ \n test-24: 10 - 10#{p}x;\ \n test-25: 10px-10px;\ \n test-26: 10px -10px;\ \n test-27: 10px- 10px;\ \n test-28: 10px - 10px;\ \n test-29: 10px-#{10}px;\ \n test-30: 10px -#{10}px;\ \n test-31: 10px- #{10}px;\ \n test-32: 10px - #{10}px;\ \n test-33: 10px-1#{0}px;\ \n test-34: 10px -1#{0}px;\ \n test-35: 10px- 1#{0}px;\ \n test-36: 10px - 1#{0}px;\ \n test-37: 10px-10#{px};\ \n test-38: 10px -10#{px};\ \n test-39: 10px- 10#{px};\ \n test-40: 10px - 10#{px};\ \n test-41: 10px-10#{p}x;\ \n test-42: 10px -10#{p}x;\ \n test-43: 10px- 10#{p}x;\ \n test-44: 10px - 10#{p}x;\ \n test-45: #{10}px-#{10}px;\ \n test-46: #{10}px -#{10}px;\ \n test-47: #{10}px- #{10}px;\ \n test-48: #{10}px - #{10}px;\ \n test-49: #{10}px-1#{0}px;\ \n test-50: #{10}px -1#{0}px;\ \n test-51: #{10}px- 1#{0}px;\ \n test-52: #{10}px - 1#{0}px;\ \n test-53: #{10}px-10#{px};\ \n test-54: #{10}px -10#{px};\ \n test-55: #{10}px- 10#{px};\ \n test-56: #{10}px - 10#{px};\ \n test-57: #{10}px-10#{p}x;\ \n test-58: #{10}px -10#{p}x;\ \n test-59: #{10}px- 10#{p}x;\ \n test-60: #{10}px - 10#{p}x;\ \n test-61: 1#{0}px-1#{0}px;\ \n test-62: 1#{0}px -1#{0}px;\ \n test-63: 1#{0}px- 1#{0}px;\ \n test-64: 1#{0}px - 1#{0}px;\ \n test-65: 1#{0}px-10#{px};\ \n test-66: 1#{0}px -10#{px};\ \n test-67: 1#{0}px- 10#{px};\ \n test-68: 1#{0}px - 10#{px};\ \n test-69: 1#{0}px-10#{p}x;\ \n test-70: 1#{0}px -10#{p}x;\ \n test-71: 1#{0}px- 10#{p}x;\ \n test-72: 1#{0}px - 10#{p}x;\ \n test-73: 10#{px}-10#{px};\ \n test-74: 10#{px} -10#{px};\ \n test-75: 10#{px}- 10#{px};\ \n test-76: 10#{px} - 10#{px};\ \n test-77: 10#{px}-10#{p}x;\ \n test-78: 10#{px} -10#{p}x;\ \n test-79: 10#{px}- 10#{p}x;\ \n test-80: 10#{px} - 10#{p}x;\ \n test-81: 10#{p}x-10#{p}x;\ \n test-82: 10#{p}x -10#{p}x;\ \n test-83: 10#{p}x- 10#{p}x;\ \n test-84: 10#{p}x - 10#{p}x;\ \n}\n"), "foo {\ \n test-1: 0;\ \n test-2: 10 -10;\ \n test-3: 0;\ \n test-4: 0;\ \n test-5: 0px;\ \n test-6: 10 -10px;\ \n test-7: 0px;\ \n test-8: 0px;\ \n test-9: 10 -10px;\ \n test-10: 10 -10px;\ \n test-11: 10-10px;\ \n test-12: 10-10px;\ \n test-13: 9 0px;\ \n test-14: 10 -1 0px;\ \n test-15: 9 0px;\ \n test-16: 9 0px;\ \n test-17: 0 px;\ \n test-18: 10 -10 px;\ \n test-19: 0 px;\ \n test-20: 0 px;\ \n test-21: 0 px;\ \n test-22: 10 -10 px;\ \n test-23: 0 px;\ \n test-24: 0 px;\ \n test-25: 0px;\ \n test-26: 10px -10px;\ \n test-27: 10px- 10px;\ \n test-28: 0px;\ \n test-29: 10px- 10px;\ \n test-30: 10px -10px;\ \n test-31: 10px- 10px;\ \n test-32: 10px-10px;\ \n test-33: 9px 0px;\ \n test-34: 10px -1 0px;\ \n test-35: 10px- 1 0px;\ \n test-36: 9px 0px;\ \n test-37: 0px px;\ \n test-38: 10px -10 px;\ \n test-39: 10px- 10 px;\ \n test-40: 0px px;\ \n test-41: 0px px;\ \n test-42: 10px -10 px;\ \n test-43: 10px- 10 px;\ \n test-44: 0px px;\ \n test-45: 10px-10px;\ \n test-46: 10px -10px;\ \n test-47: 10px- 10px;\ \n test-48: 10px-10px;\ \n test-49: 10px-10px;\ \n test-50: 10px -1 0px;\ \n test-51: 10px- 1 0px;\ \n test-52: 10px-1 0px;\ \n test-53: 10px-10px;\ \n test-54: 10px -10 px;\ \n test-55: 10px- 10 px;\ \n test-56: 10px-10 px;\ \n test-57: 10px-10px;\ \n test-58: 10px -10 px;\ \n test-59: 10px- 10 px;\ \n test-60: 10px-10 px;\ \n test-61: 1 0px-10px;\ \n test-62: 1 0px -1 0px;\ \n test-63: 1 0px- 1 0px;\ \n test-64: 1 0px-1 0px;\ \n test-65: 1 0px-10px;\ \n test-66: 1 0px -10 px;\ \n test-67: 1 0px- 10 px;\ \n test-68: 1 0px-10 px;\ \n test-69: 1 0px-10px;\ \n test-70: 1 0px -10 px;\ \n test-71: 1 0px- 10 px;\ \n test-72: 1 0px-10 px;\ \n test-73: 10 px-10px;\ \n test-74: 10 px -10 px;\ \n test-75: 10 px- 10 px;\ \n test-76: 10 px-10 px;\ \n test-77: 10 px-10px;\ \n test-78: 10 px -10 px;\ \n test-79: 10 px- 10 px;\ \n test-80: 10 px-10 px;\ \n test-81: 10 px-10px;\ \n test-82: 10 px -10 px;\ \n test-83: 10 px- 10 px;\ \n test-84: 10 px-10 px;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/subtract/mod.rs000066400000000000000000000003461474765622100276600ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/operations/subtract" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("subtract") } mod dimensions; mod numbers; mod strings; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/subtract/numbers/000077500000000000000000000000001474765622100302035ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/subtract/numbers/mod.rs000066400000000000000000000003141474765622100313260ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/operations/subtract/numbers" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("numbers") } mod pairs; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/subtract/numbers/pairs.rs000066400000000000000000000060731474765622100316750ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/operations/subtract/numbers/pairs.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("pairs") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok("foo {\ \n test-1: 10-10;\ \n test-2: 10 -10;\ \n test-3: 10- 10;\ \n test-4: 10 - 10;\ \n test-5: 10-#{10};\ \n test-6: 10 -#{10};\ \n test-7: 10- #{10};\ \n test-8: 10 - #{10};\ \n test-9: 10-1#{0};\ \n test-10: 10 -1#{0};\ \n test-11: 10- 1#{0};\ \n test-12: 10 - 1#{0};\ \n test-13: 10-#{1}0;\ \n test-14: 10 -#{1}0;\ \n test-15: 10- #{1}0;\ \n test-16: 10 - #{1}0;\ \n test-17: #{10}-#{10};\ \n test-18: #{10} -#{10};\ \n test-19: #{10}- #{10};\ \n test-20: #{10} - #{10};\ \n test-21: #{10}-1#{0};\ \n test-22: #{10} -1#{0};\ \n test-23: #{10}- 1#{0};\ \n test-24: #{10} - 1#{0};\ \n test-25: #{10}-#{1}0;\ \n test-26: #{10} -#{1}0;\ \n test-27: #{10}- #{1}0;\ \n test-28: #{10} - #{1}0;\ \n test-29: 1#{0}-1#{0};\ \n test-30: 1#{0} -1#{0};\ \n test-31: 1#{0}- 1#{0};\ \n test-32: 1#{0} - 1#{0};\ \n test-33: 1#{0}-#{1}0;\ \n test-34: 1#{0} -#{1}0;\ \n test-35: 1#{0}- #{1}0;\ \n test-36: 1#{0} - #{1}0;\ \n test-37: #{1}0-#{1}0;\ \n test-38: #{1}0 -#{1}0;\ \n test-39: #{1}0- #{1}0;\ \n test-40: #{1}0 - #{1}0;\ \n}\n"), "foo {\ \n test-1: 0;\ \n test-2: 10 -10;\ \n test-3: 0;\ \n test-4: 0;\ \n test-5: 10 -10;\ \n test-6: 10 -10;\ \n test-7: 10-10;\ \n test-8: 10-10;\ \n test-9: 9 0;\ \n test-10: 10 -1 0;\ \n test-11: 9 0;\ \n test-12: 9 0;\ \n test-13: 10 -10;\ \n test-14: 10 -10;\ \n test-15: 10-10;\ \n test-16: 10-10;\ \n test-17: 10-10;\ \n test-18: 10 -10;\ \n test-19: 10- 10;\ \n test-20: 10-10;\ \n test-21: 10-10;\ \n test-22: 10 -1 0;\ \n test-23: 10- 1 0;\ \n test-24: 10-1 0;\ \n test-25: 10-10;\ \n test-26: 10 -10;\ \n test-27: 10- 10;\ \n test-28: 10-10;\ \n test-29: 1 0-10;\ \n test-30: 1 0 -1 0;\ \n test-31: 1 0- 1 0;\ \n test-32: 1 0-1 0;\ \n test-33: 1 0-10;\ \n test-34: 1 0 -10;\ \n test-35: 1 0- 10;\ \n test-36: 1 0-10;\ \n test-37: 10-10;\ \n test-38: 10 -10;\ \n test-39: 10- 10;\ \n test-40: 10-10;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/subtract/strings/000077500000000000000000000000001474765622100302215ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/subtract/strings/mod.rs000066400000000000000000000003141474765622100313440ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/operations/subtract/strings" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("strings") } mod pairs; rsass-0.29.0/rsass/tests/spec/non_conformant/parser/operations/subtract/strings/pairs.rs000066400000000000000000000147001474765622100317070ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/parser/operations/subtract/strings/pairs.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("pairs") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok("foo {\ \n test-1: literal-literal;\ \n test-2: literal -literal;\ \n test-3: literal- literal;\ \n test-4: literal - literal;\ \n test-5: literal-\"quoted\";\ \n test-6: literal -\"quoted\";\ \n test-7: literal- \"quoted\";\ \n test-8: literal - \"quoted\";\ \n test-9: literal-#{interpolant};\ \n test-10: literal -#{interpolant};\ \n test-11: literal- #{interpolant};\ \n test-12: literal - #{interpolant};\ \n test-13: literal-lschema_#{ritlp};\ \n test-14: literal -lschema_#{ritlp};\ \n test-15: literal- lschema_#{ritlp};\ \n test-16: literal - lschema_#{ritlp};\ \n test-17: literal-#{litlp}_rschema;\ \n test-18: literal -#{litlp}_rschema;\ \n test-19: literal- #{litlp}_rschema;\ \n test-20: literal - #{litlp}_rschema;\ \n test-21: \"quoted\"-\"quoted\";\ \n test-22: \"quoted\" -\"quoted\";\ \n test-23: \"quoted\"- \"quoted\";\ \n test-24: \"quoted\" - \"quoted\";\ \n test-25: \"quoted\"-#{interpolant};\ \n test-26: \"quoted\" -#{interpolant};\ \n test-27: \"quoted\"- #{interpolant};\ \n test-28: \"quoted\" - #{interpolant};\ \n test-29: \"quoted\"-lschema_#{ritlp};\ \n test-30: \"quoted\" -lschema_#{ritlp};\ \n test-31: \"quoted\"- lschema_#{ritlp};\ \n test-32: \"quoted\" - lschema_#{ritlp};\ \n test-33: \"quoted\"-#{litlp}_rschema;\ \n test-34: \"quoted\" -#{litlp}_rschema;\ \n test-35: \"quoted\"- #{litlp}_rschema;\ \n test-36: \"quoted\" - #{litlp}_rschema;\ \n test-37: #{interpolant}-#{interpolant};\ \n test-38: #{interpolant} -#{interpolant};\ \n test-39: #{interpolant}- #{interpolant};\ \n test-40: #{interpolant} - #{interpolant};\ \n test-41: #{interpolant}-lschema_#{ritlp};\ \n test-42: #{interpolant} -lschema_#{ritlp};\ \n test-43: #{interpolant}- lschema_#{ritlp};\ \n test-44: #{interpolant} - lschema_#{ritlp};\ \n test-45: #{interpolant}-#{litlp}_rschema;\ \n test-46: #{interpolant} -#{litlp}_rschema;\ \n test-47: #{interpolant}- #{litlp}_rschema;\ \n test-48: #{interpolant} - #{litlp}_rschema;\ \n test-49: lschema_#{ritlp}-lschema_#{ritlp};\ \n test-50: lschema_#{ritlp} -lschema_#{ritlp};\ \n test-51: lschema_#{ritlp}- lschema_#{ritlp};\ \n test-52: lschema_#{ritlp} - lschema_#{ritlp};\ \n test-53: lschema_#{ritlp}-#{litlp}_rschema;\ \n test-54: lschema_#{ritlp} -#{litlp}_rschema;\ \n test-55: lschema_#{ritlp}- #{litlp}_rschema;\ \n test-56: lschema_#{ritlp} - #{litlp}_rschema;\ \n test-57: #{litlp}_rschema-#{litlp}_rschema;\ \n test-58: #{litlp}_rschema -#{litlp}_rschema;\ \n test-59: #{litlp}_rschema- #{litlp}_rschema;\ \n test-60: #{litlp}_rschema - #{litlp}_rschema;\ \n}\n"), "foo {\ \n test-1: literal-literal;\ \n test-2: literal -literal;\ \n test-3: literal- literal;\ \n test-4: literal-literal;\ \n test-5: literal- \"quoted\";\ \n test-6: literal-\"quoted\";\ \n test-7: literal- \"quoted\";\ \n test-8: literal-\"quoted\";\ \n test-9: literal-interpolant;\ \n test-10: literal -interpolant;\ \n test-11: literal- interpolant;\ \n test-12: literal-interpolant;\ \n test-13: literal-lschema_ritlp;\ \n test-14: literal -lschema_ritlp;\ \n test-15: literal- lschema_ritlp;\ \n test-16: literal-lschema_ritlp;\ \n test-17: literal-litlp_rschema;\ \n test-18: literal -litlp_rschema;\ \n test-19: literal- litlp_rschema;\ \n test-20: literal-litlp_rschema;\ \n test-21: \"quoted\"-\"quoted\";\ \n test-22: \"quoted\"-\"quoted\";\ \n test-23: \"quoted\"-\"quoted\";\ \n test-24: \"quoted\"-\"quoted\";\ \n test-25: \"quoted\" -interpolant;\ \n test-26: \"quoted\" -interpolant;\ \n test-27: \"quoted\"-interpolant;\ \n test-28: \"quoted\"-interpolant;\ \n test-29: \"quoted\" -lschema_ritlp;\ \n test-30: \"quoted\" -lschema_ritlp;\ \n test-31: \"quoted\"-lschema_ritlp;\ \n test-32: \"quoted\"-lschema_ritlp;\ \n test-33: \"quoted\" -litlp_rschema;\ \n test-34: \"quoted\" -litlp_rschema;\ \n test-35: \"quoted\"-litlp_rschema;\ \n test-36: \"quoted\"-litlp_rschema;\ \n test-37: interpolant-interpolant;\ \n test-38: interpolant -interpolant;\ \n test-39: interpolant- interpolant;\ \n test-40: interpolant-interpolant;\ \n test-41: interpolant-lschema_ritlp;\ \n test-42: interpolant -lschema_ritlp;\ \n test-43: interpolant- lschema_ritlp;\ \n test-44: interpolant-lschema_ritlp;\ \n test-45: interpolant-litlp_rschema;\ \n test-46: interpolant -litlp_rschema;\ \n test-47: interpolant- litlp_rschema;\ \n test-48: interpolant-litlp_rschema;\ \n test-49: lschema_ritlp-lschema_ritlp;\ \n test-50: lschema_ritlp -lschema_ritlp;\ \n test-51: lschema_ritlp- lschema_ritlp;\ \n test-52: lschema_ritlp-lschema_ritlp;\ \n test-53: lschema_ritlp-litlp_rschema;\ \n test-54: lschema_ritlp -litlp_rschema;\ \n test-55: lschema_ritlp- litlp_rschema;\ \n test-56: lschema_ritlp-litlp_rschema;\ \n test-57: litlp_rschema-litlp_rschema;\ \n test-58: litlp_rschema -litlp_rschema;\ \n test-59: litlp_rschema- litlp_rschema;\ \n test-60: litlp_rschema-litlp_rschema;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/sass/000077500000000000000000000000001474765622100221735ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/sass/basic.rs000066400000000000000000000002521474765622100236210ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass/basic.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("basic") } rsass-0.29.0/rsass/tests/spec/non_conformant/sass/comment/000077500000000000000000000000001474765622100236355ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/sass/comment/loud.rs000066400000000000000000000002601474765622100251440ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass/comment/loud.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("loud") } rsass-0.29.0/rsass/tests/spec/non_conformant/sass/comment/mod.rs000066400000000000000000000002651474765622100247650ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass/comment" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("comment") } mod loud; rsass-0.29.0/rsass/tests/spec/non_conformant/sass/extend.rs000066400000000000000000000002541474765622100240310ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass/extend.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("extend") } rsass-0.29.0/rsass/tests/spec/non_conformant/sass/functions.rs000066400000000000000000000002621474765622100245510ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass/functions.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("functions") } rsass-0.29.0/rsass/tests/spec/non_conformant/sass/import/000077500000000000000000000000001474765622100235055ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/sass/import/mod.rs000066400000000000000000000002671474765622100246370ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass/import" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("import") } mod unquoted; rsass-0.29.0/rsass/tests/spec/non_conformant/sass/import/unquoted.rs000066400000000000000000000004501474765622100257160ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass/import/unquoted.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("unquoted") .mock_file("sub/unquoted.scss", "d {e: f}\n") .mock_file("unquoted.scss", "a {b: c}\n") } rsass-0.29.0/rsass/tests/spec/non_conformant/sass/imported.rs000066400000000000000000000010231474765622100243600ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass/imported.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("imported").mock_file( "imported.sass", "div\n\ta\n\t\tcolor: red\n\tli\n\t\tcolor: green", ) } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("@import \"imported.sass\";\n"), "div a {\ \n color: red;\ \n}\ \ndiv li {\ \n color: green;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/sass/indentation.rs000066400000000000000000000005641474765622100250620ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass/indentation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("indentation") } mod different { #[allow(unused)] use super::runner; } mod error { #[allow(unused)] use super::runner; } mod unusual_newlines { #[allow(unused)] use super::runner; } rsass-0.29.0/rsass/tests/spec/non_conformant/sass/mixins.rs000066400000000000000000000002541474765622100240510ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass/mixins.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("mixins") } rsass-0.29.0/rsass/tests/spec/non_conformant/sass/mod.rs000066400000000000000000000005151474765622100233210ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("sass") } mod basic; mod comment; mod extend; mod functions; mod import; mod imported; mod indentation; mod mixins; mod pseudo; mod selectors; mod semicolon; mod var_args; rsass-0.29.0/rsass/tests/spec/non_conformant/sass/pseudo.rs000066400000000000000000000002541474765622100240410ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass/pseudo.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("pseudo") } rsass-0.29.0/rsass/tests/spec/non_conformant/sass/selectors.rs000066400000000000000000000002621474765622100245440ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass/selectors.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("selectors") } rsass-0.29.0/rsass/tests/spec/non_conformant/sass/semicolon/000077500000000000000000000000001474765622100241635ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/sass/semicolon/at_rule.rs000066400000000000000000000002701474765622100261630ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass/semicolon/at_rule.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("at_rule") } rsass-0.29.0/rsass/tests/spec/non_conformant/sass/semicolon/content.rs000066400000000000000000000002701474765622100262020ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass/semicolon/content.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("content") } rsass-0.29.0/rsass/tests/spec/non_conformant/sass/semicolon/debug.rs000066400000000000000000000002641474765622100256210ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass/semicolon/debug.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("debug") } rsass-0.29.0/rsass/tests/spec/non_conformant/sass/semicolon/declaration.rs000066400000000000000000000003001474765622100270070ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass/semicolon/declaration.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("declaration") } rsass-0.29.0/rsass/tests/spec/non_conformant/sass/semicolon/error.rs000066400000000000000000000002641474765622100256640ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass/semicolon/error.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("error") } rsass-0.29.0/rsass/tests/spec/non_conformant/sass/semicolon/import.rs000066400000000000000000000002661474765622100260470ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass/semicolon/import.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("import") } rsass-0.29.0/rsass/tests/spec/non_conformant/sass/semicolon/include.rs000066400000000000000000000002701474765622100261530ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass/semicolon/include.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("include") } rsass-0.29.0/rsass/tests/spec/non_conformant/sass/semicolon/mod.rs000066400000000000000000000004731474765622100253140ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass/semicolon" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("semicolon") } mod at_rule; mod content; mod debug; mod declaration; mod error; mod import; mod include; mod test_return; mod variable; mod warn; rsass-0.29.0/rsass/tests/spec/non_conformant/sass/semicolon/test_return.rs000066400000000000000000000002661474765622100271130ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass/semicolon/return.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("return") } rsass-0.29.0/rsass/tests/spec/non_conformant/sass/semicolon/variable.rs000066400000000000000000000002721474765622100263170ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass/semicolon/variable.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("variable") } rsass-0.29.0/rsass/tests/spec/non_conformant/sass/semicolon/warn.rs000066400000000000000000000002621474765622100255000ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass/semicolon/warn.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("warn") } rsass-0.29.0/rsass/tests/spec/non_conformant/sass/var_args/000077500000000000000000000000001474765622100237775ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/sass/var_args/error.rs000066400000000000000000000016101474765622100254740ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass/var-args/error.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("error") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "@mixin bar($x, $y, $z) {\ \n x: $x;\ \n y: $y;\ \n z: $z;\ \n}\n\ \ndiv {\ \n @include bar(a, c d e...);\ \n}\n" ), "Error: Only 3 arguments allowed, but 4 were passed.\ \n ,\ \n1 | @mixin bar($x, $y, $z) {\ \n | =============== declaration\ \n... |\ \n8 | @include bar(a, c d e...);\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^ invocation\ \n \'\ \n input.scss 8:3 bar()\ \n input.scss 8:3 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/sass/var_args/mod.rs000066400000000000000000000003061474765622100251230ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass/var-args" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("var-args") } mod error; mod success; rsass-0.29.0/rsass/tests/spec/non_conformant/sass/var_args/success.rs000066400000000000000000000070521474765622100260210ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass/var-args/success.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("success") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok("@use \"sass:list\";\ \n@use \"sass:meta\";\ \n@mixin foo($x, $y, $zs...) {\ \n grarh: meta.type-of(false);\ \n f: $zs;\ \n fa: $x, $y, $zs;\ \n fv: $zs;\ \n ft: meta.type-of($zs);\ \n fj: list.join(1 2 3, $zs);\ \n fjt: meta.type-of(list.join(1 2 3, $zs));\ \n fkt: meta.type-of(list.join($zs, 1 2 3));\ \n hoopla: list.length(a b c d e);\ \n boopla: meta.type-of(123+234);\ \n koopla: meta.type-of(list.length(a b c d));\ \n}\n\ \n@mixin bar($x, $y, $z) {\ \n ba: $x, $y, $z;\ \n bv: $z;\ \n bt: meta.type-of($z);\ \n bj: list.join(1 2 3, $z);\ \n bjt: meta.type-of(list.join(1 2 3, $z));\ \n}\n\ \n$stuff: hey hoo ha;\n\ \n@mixin mudge($x, $y, $zs...) {\ \n x: $x;\ \n y: $y;\ \n z: $zs;\ \n}\n\ \ndiv {\ \n @include foo(a, b, c d e f);\ \n @include bar(a, b, c d e f);\ \n @include foo(a, b, c d e...);\ \n @include foo(a, c d e...);\ \n @include foo(a, $stuff...);\ \n new: meta.type-of(\"hello\");\ \n}\n\ \n@mixin bad($x, $y, $z) {\ \n first: $x;\ \n second: $y;\ \n rest: $z;\ \n}\n\ \n@mixin foo($x, $y, $z) {\ \n a: meta.type-of(list.join($x, $y));\ \n b: meta.type-of($z);\ \n c: meta.type-of(list.length($x));\ \n}\n\ \ndiv {\ \n @include foo(a b c, d e, false);\ \n}\n"), "div {\ \n grarh: bool;\ \n f: c d e f;\ \n fa: a, b, c d e f;\ \n fv: c d e f;\ \n ft: arglist;\ \n fj: 1 2 3 c d e f;\ \n fjt: list;\ \n fkt: list;\ \n hoopla: 5;\ \n boopla: number;\ \n koopla: number;\ \n ba: a, b, c d e f;\ \n bv: c d e f;\ \n bt: list;\ \n bj: 1 2 3 c d e f;\ \n bjt: list;\ \n grarh: bool;\ \n f: c d e;\ \n fa: a, b, c d e;\ \n fv: c d e;\ \n ft: arglist;\ \n fj: 1 2 3 c d e;\ \n fjt: list;\ \n fkt: list;\ \n hoopla: 5;\ \n boopla: number;\ \n koopla: number;\ \n grarh: bool;\ \n f: d e;\ \n fa: a, c, d e;\ \n fv: d e;\ \n ft: arglist;\ \n fj: 1 2 3 d e;\ \n fjt: list;\ \n fkt: list;\ \n hoopla: 5;\ \n boopla: number;\ \n koopla: number;\ \n grarh: bool;\ \n f: hoo ha;\ \n fa: a, hey, hoo ha;\ \n fv: hoo ha;\ \n ft: arglist;\ \n fj: 1 2 3 hoo ha;\ \n fjt: list;\ \n fkt: list;\ \n hoopla: 5;\ \n boopla: number;\ \n koopla: number;\ \n new: string;\ \n}\ \ndiv {\ \n a: list;\ \n b: bool;\ \n c: number;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/sass_4_0/000077500000000000000000000000001474765622100226355ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/sass_4_0/color_arithmetic/000077500000000000000000000000001474765622100261645ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/sass_4_0/color_arithmetic/addition/000077500000000000000000000000001474765622100277575ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/sass_4_0/color_arithmetic/addition/color_color.rs000066400000000000000000000007651474765622100326510ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass_4_0/color_arithmetic/addition/color_color.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("color_color") } #[test] fn test() { assert_eq!( runner().err("$v: #abc + #123;\n"), "Error: Undefined operation \"#abc + #123\".\ \n ,\ \n1 | $v: #abc + #123;\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:5 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/sass_4_0/color_arithmetic/addition/color_number.rs000066400000000000000000000007531474765622100330200ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass_4_0/color_arithmetic/addition/color_number.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("color_number") } #[test] fn test() { assert_eq!( runner().err("$v: #abc + 1;\n"), "Error: Undefined operation \"#abc + 1\".\ \n ,\ \n1 | $v: #abc + 1;\ \n | ^^^^^^^^\ \n \'\ \n input.scss 1:5 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/sass_4_0/color_arithmetic/addition/mod.rs000066400000000000000000000003711474765622100311050ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass_4_0/color_arithmetic/addition" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("addition") } mod color_color; mod color_number; mod number_color; rsass-0.29.0/rsass/tests/spec/non_conformant/sass_4_0/color_arithmetic/addition/number_color.rs000066400000000000000000000007531474765622100330200ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass_4_0/color_arithmetic/addition/number_color.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("number_color") } #[test] fn test() { assert_eq!( runner().err("$v: 1 + #123;\n"), "Error: Undefined operation \"1 + #123\".\ \n ,\ \n1 | $v: 1 + #123;\ \n | ^^^^^^^^\ \n \'\ \n input.scss 1:5 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/sass_4_0/color_arithmetic/division/000077500000000000000000000000001474765622100300105ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/sass_4_0/color_arithmetic/division/color_color.rs000066400000000000000000000007651474765622100327020ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass_4_0/color_arithmetic/division/color_color.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("color_color") } #[test] fn test() { assert_eq!( runner().err("$v: #abc / #123;\n"), "Error: Undefined operation \"#abc / #123\".\ \n ,\ \n1 | $v: #abc / #123;\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:5 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/sass_4_0/color_arithmetic/division/color_number.rs000066400000000000000000000007531474765622100330510ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass_4_0/color_arithmetic/division/color_number.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("color_number") } #[test] fn test() { assert_eq!( runner().err("$v: #abc / 1;\n"), "Error: Undefined operation \"#abc / 1\".\ \n ,\ \n1 | $v: #abc / 1;\ \n | ^^^^^^^^\ \n \'\ \n input.scss 1:5 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/sass_4_0/color_arithmetic/division/mod.rs000066400000000000000000000003461474765622100311400ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass_4_0/color_arithmetic/division" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("division") } mod color_color; mod color_number; rsass-0.29.0/rsass/tests/spec/non_conformant/sass_4_0/color_arithmetic/mod.rs000066400000000000000000000004221474765622100273070ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass_4_0/color_arithmetic" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("color_arithmetic") } mod addition; mod division; mod modulo; mod multiplication; mod subtraction; rsass-0.29.0/rsass/tests/spec/non_conformant/sass_4_0/color_arithmetic/modulo/000077500000000000000000000000001474765622100274635ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/sass_4_0/color_arithmetic/modulo/color_color.rs000066400000000000000000000007631474765622100323530ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass_4_0/color_arithmetic/modulo/color_color.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("color_color") } #[test] fn test() { assert_eq!( runner().err("$v: #abc % #123;\n"), "Error: Undefined operation \"#abc % #123\".\ \n ,\ \n1 | $v: #abc % #123;\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:5 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/sass_4_0/color_arithmetic/modulo/color_number.rs000066400000000000000000000007511474765622100325220ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass_4_0/color_arithmetic/modulo/color_number.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("color_number") } #[test] fn test() { assert_eq!( runner().err("$v: #abc % 1;\n"), "Error: Undefined operation \"#abc % 1\".\ \n ,\ \n1 | $v: #abc % 1;\ \n | ^^^^^^^^\ \n \'\ \n input.scss 1:5 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/sass_4_0/color_arithmetic/modulo/mod.rs000066400000000000000000000003421474765622100306070ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass_4_0/color_arithmetic/modulo" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("modulo") } mod color_color; mod color_number; rsass-0.29.0/rsass/tests/spec/non_conformant/sass_4_0/color_arithmetic/multiplication/000077500000000000000000000000001474765622100312215ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/sass_4_0/color_arithmetic/multiplication/color_color.rs000066400000000000000000000007731474765622100341120ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass_4_0/color_arithmetic/multiplication/color_color.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("color_color") } #[test] fn test() { assert_eq!( runner().err("$v: #abc * #123;\n"), "Error: Undefined operation \"#abc * #123\".\ \n ,\ \n1 | $v: #abc * #123;\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:5 root stylesheet", ); } color_number.rs000066400000000000000000000007611474765622100342020ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/sass_4_0/color_arithmetic/multiplication//! Tests auto-converted from "sass-spec/spec/non_conformant/sass_4_0/color_arithmetic/multiplication/color_number.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("color_number") } #[test] fn test() { assert_eq!( runner().err("$v: #abc * 1;\n"), "Error: Undefined operation \"#abc * 1\".\ \n ,\ \n1 | $v: #abc * 1;\ \n | ^^^^^^^^\ \n \'\ \n input.scss 1:5 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/sass_4_0/color_arithmetic/multiplication/mod.rs000066400000000000000000000004051474765622100323450ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass_4_0/color_arithmetic/multiplication" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("multiplication") } mod color_color; mod color_number; mod number_color; number_color.rs000066400000000000000000000007611474765622100342020ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/sass_4_0/color_arithmetic/multiplication//! Tests auto-converted from "sass-spec/spec/non_conformant/sass_4_0/color_arithmetic/multiplication/number_color.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("number_color") } #[test] fn test() { assert_eq!( runner().err("$v: 1 * #123;\n"), "Error: Undefined operation \"1 * #123\".\ \n ,\ \n1 | $v: 1 * #123;\ \n | ^^^^^^^^\ \n \'\ \n input.scss 1:5 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/sass_4_0/color_arithmetic/subtraction/000077500000000000000000000000001474765622100305215ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/sass_4_0/color_arithmetic/subtraction/color_color.rs000066400000000000000000000007701474765622100334070ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass_4_0/color_arithmetic/subtraction/color_color.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("color_color") } #[test] fn test() { assert_eq!( runner().err("$v: #abc - #123;\n"), "Error: Undefined operation \"#abc - #123\".\ \n ,\ \n1 | $v: #abc - #123;\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:5 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/sass_4_0/color_arithmetic/subtraction/color_number.rs000066400000000000000000000007561474765622100335650ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass_4_0/color_arithmetic/subtraction/color_number.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("color_number") } #[test] fn test() { assert_eq!( runner().err("$v: #abc - 1;\n"), "Error: Undefined operation \"#abc - 1\".\ \n ,\ \n1 | $v: #abc - 1;\ \n | ^^^^^^^^\ \n \'\ \n input.scss 1:5 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/sass_4_0/color_arithmetic/subtraction/mod.rs000066400000000000000000000003541474765622100316500ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass_4_0/color_arithmetic/subtraction" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("subtraction") } mod color_color; mod color_number; rsass-0.29.0/rsass/tests/spec/non_conformant/sass_4_0/interpolation/000077500000000000000000000000001474765622100255245ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/sass_4_0/interpolation/after_hyphen.rs000066400000000000000000000021631474765622100305500ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass_4_0/interpolation/after_hyphen.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("after_hyphen") } #[test] fn test() { assert_eq!( runner().ok( ".after-hyphen {\ \n // We want to treat interpolation as though it\'s a valid identifier character,\ \n // which means that if it comes after a hyphen or double-hyphen it should be\ \n // treated as part of an interpolated identifier that includes that hyphen.\ \n standalone-single: -#{foo};\ \n standalone-double: --#{foo};\n\ \n // It also means that we shouldn\'t treat the hyphen as a subtraction\ \n // operation.\ \n adjacent-single: #{foo} -#{bar};\ \n adjacent-double: #{foo} --#{bar};\ \n}\n" ), ".after-hyphen {\ \n standalone-single: -foo;\ \n standalone-double: --foo;\ \n adjacent-single: foo -bar;\ \n adjacent-double: foo --bar;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/sass_4_0/interpolation/function_name.rs000066400000000000000000000025631474765622100307250ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass_4_0/interpolation/function_name.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("function_name") } #[test] fn test() { assert_eq!( runner().ok( "@function identity($arg) {@return $arg}\n\ \n.function-name {\ \n start: #{1 + 1}foo(arg);\ \n mid: foo#{1 + 1}bar(arg);\ \n end: foo#{1 + 1}(arg);\ \n full: #{foo}(arg);\n\ \n evaluates-args: foo#{1 + 1}bar(2 + 2);\ \n $list: 1, 2, 3, 4, 5;\ \n supports-splats: foo#{1 + 1}bar($list...);\n\ \n not-built-in-function: qu#{o}te(arg);\ \n not-user-defined-function: id#{enti}ty(arg);\n\ \n // In 3.5, this would interpret \"red()\" as a live function call.\ \n followed-by-function: b#{o}red(arg);\ \n}" ), ".function-name {\ \n start: 2foo(arg);\ \n mid: foo2bar(arg);\ \n end: foo2(arg);\ \n full: foo(arg);\ \n evaluates-args: foo2bar(4);\ \n supports-splats: foo2bar(1, 2, 3, 4, 5);\ \n not-built-in-function: quote(arg);\ \n not-user-defined-function: identity(arg);\ \n followed-by-function: bored(arg);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/sass_4_0/interpolation/mod.rs000066400000000000000000000003771474765622100266600ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass_4_0/interpolation" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("interpolation") } mod after_hyphen; mod function_name; mod trailing_non_name_start; rsass-0.29.0/rsass/tests/spec/non_conformant/sass_4_0/interpolation/trailing_non_name_start.rs000066400000000000000000000022351474765622100327740ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass_4_0/interpolation/trailing_non_name_start.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("trailing_non_name_start") } #[test] fn test() { assert_eq!( runner().ok( ".trailing-non-name-start {\ \n // We want to treat interpolation as though it\'s a valid identifier character,\ \n // which means that if it\'s followed by a [name character][] that\'s not a\ \n // [name start character][] it should still treat that as part of the\ \n // identifier.\ \n //\ \n // [name character]: https://drafts.csswg.org/css-syntax-3/#name-code-point\ \n // [name start character]: https://drafts.csswg.org/css-syntax-3/#name-start-code-point\ \n digit: foo#{bar}12;\ \n hyphen: foo#{bar}-12;\ \n double-hyphen: foo#{bar}--12;\ \n}\n" ), ".trailing-non-name-start {\ \n digit: foobar12;\ \n hyphen: foobar-12;\ \n double-hyphen: foobar--12;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/sass_4_0/mod.rs000066400000000000000000000003221474765622100237570ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/sass_4_0" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("sass_4_0") } mod color_arithmetic; mod interpolation; rsass-0.29.0/rsass/tests/spec/non_conformant/scope/000077500000000000000000000000001474765622100223335ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/scope/clash.rs000066400000000000000000000021601474765622100237720ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scope/clash.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("clash") } #[test] fn test() { assert_eq!( runner().ok("$foo: 42;\ \n$bar: 43;\ \n$baz: 45;\n\ \nfoo {\ \n foo: $foo;\ \n bar: $bar;\ \n baz: $baz;\n\ \n $bar: 4; // this is a different $bar than `$bar !global`\n\ \n foo: $foo;\ \n bar: $bar;\ \n baz: $baz;\n\ \n @if true {\ \n $foo: 3; // this is a different $foo than `$foo !global`\ \n $bar: 5; // this is a different $bar than `$bar !global`\n\ \n foo: $foo;\ \n bar: $bar;\ \n baz: $baz;\ \n }\ \n}\n"), "foo {\ \n foo: 42;\ \n bar: 43;\ \n baz: 45;\ \n foo: 42;\ \n bar: 4;\ \n baz: 45;\ \n foo: 3;\ \n bar: 5;\ \n baz: 45;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scope/each.rs000066400000000000000000000011561474765622100236040ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scope/each.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("each") } #[test] fn test() { assert_eq!( runner().ok("$foo: 42;\n\ \n.foo {\ \n content: $foo;\ \n}\n\ \n@each $item in 1337 {\ \n $foo: $item !global;\ \n}\n\ \n.bar {\ \n content: $foo;\ \n}\n"), ".foo {\ \n content: 42;\ \n}\ \n.bar {\ \n content: 1337;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scope/function.rs000066400000000000000000000012601474765622100245250ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scope/function.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("function") } #[test] fn test() { assert_eq!( runner().ok("$foo: 42;\n\ \n.foo {\ \n content: $foo;\ \n}\n\ \n@function foo() {\ \n $foo: 1337 !global;\ \n @return $foo;\ \n}\n\ \n@if foo() {}\n\ \n.bar {\ \n content: $foo;\ \n}\n"), ".foo {\ \n content: 42;\ \n}\ \n.bar {\ \n content: 1337;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scope/mixin.rs000066400000000000000000000012061474765622100240240ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scope/mixin.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("mixin") } #[test] fn test() { assert_eq!( runner().ok("$foo: 42;\n\ \n@mixin foo {\ \n $foo: 1337 !global;\ \n}\n\ \n.foo {\ \n content: $foo;\ \n}\n\ \n@include foo;\n\ \n.bar {\ \n content: $foo;\ \n}\n"), ".foo {\ \n content: 42;\ \n}\ \n.bar {\ \n content: 1337;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scope/mod.rs000066400000000000000000000004471474765622100234650ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scope" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("scope") } mod clash; mod each; mod test_for; mod function; mod test_if; mod mixin; mod nested; mod root; mod ruleset; mod test_while; rsass-0.29.0/rsass/tests/spec/non_conformant/scope/nested.rs000066400000000000000000000011521474765622100241620ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scope/nested.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("nested") } #[test] fn test() { assert_eq!( runner().ok("$foo: 42;\n\ \n.foo {\ \n content: $foo;\n\ \n > .bar {\ \n $foo: 1337 !global;\ \n }\ \n}\n\ \n.bar {\ \n content: $foo;\ \n}\n"), ".foo {\ \n content: 42;\ \n}\ \n.bar {\ \n content: 1337;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scope/root.rs000066400000000000000000000010631474765622100236640ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scope/root.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("root") } #[test] fn test() { assert_eq!( runner().ok("$foo: 42;\n\ \n.foo {\ \n content: $foo;\ \n}\n\ \n$foo: 1337 !global;\n\ \n.bar {\ \n content: $foo;\ \n}\n"), ".foo {\ \n content: 42;\ \n}\ \n.bar {\ \n content: 1337;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scope/ruleset.rs000066400000000000000000000011671474765622100243710ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scope/ruleset.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("ruleset") } #[test] fn test() { assert_eq!( runner().ok("$foo: 42;\n\ \n.foo {\ \n content: $foo;\ \n $foo: 1337 !global;\ \n content: $foo;\ \n}\n\ \n.bar {\ \n content: $foo;\ \n}\n"), ".foo {\ \n content: 42;\ \n content: 1337;\ \n}\ \n.bar {\ \n content: 1337;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scope/test_for.rs000066400000000000000000000011571474765622100245320ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scope/for.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("for") } #[test] fn test() { assert_eq!( runner().ok("$foo: 42;\n\ \n.foo {\ \n content: $foo;\ \n}\n\ \n@for $i from 1337 to 1338 {\ \n $foo: $i !global;\ \n}\n\ \n.bar {\ \n content: $foo;\ \n}\n"), ".foo {\ \n content: 42;\ \n}\ \n.bar {\ \n content: 1337;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scope/test_if.rs000066400000000000000000000011361474765622100243370ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scope/if.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("if") } #[test] fn test() { assert_eq!( runner().ok("$foo: 42;\n\ \n.foo {\ \n content: $foo;\ \n}\n\ \n@if true {\ \n $foo: 1337 !global;\ \n}\n\ \n.bar {\ \n content: $foo;\ \n}\n"), ".foo {\ \n content: 42;\ \n}\ \n.bar {\ \n content: 1337;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scope/test_while.rs000066400000000000000000000012721474765622100250520ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scope/while.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("while") } #[test] fn test() { assert_eq!( runner().ok("$foo: 42;\n\ \n.foo {\ \n content: $foo;\ \n}\n\ \n$condition: 1337;\ \n@while $condition > 0 {\ \n $foo: $condition !global;\ \n $condition: 0;\ \n}\n\ \n.bar {\ \n content: $foo;\ \n}\n"), ".foo {\ \n content: 42;\ \n}\ \n.bar {\ \n content: 1337;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/000077500000000000000000000000001474765622100221755ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/scss/almost_ambiguous_nested_rules_and_declarations.rs000066400000000000000000000016111474765622100342420ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/almost_ambiguous_nested_rules_and_declarations.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("almost_ambiguous_nested_rules_and_declarations") } #[test] fn test() { assert_eq!( runner().ok( "foo {\ \n bar:baz:bang:bop:biddle:woo:look:at:all:these:pseudoclasses {a: b};\ \n bar:baz bang bop biddle woo look at all these elems {a: b};\ \n bar:baz bang bop biddle woo look at all these elems; }\n" ), "foo {\ \n bar: baz bang bop biddle woo look at all these elems;\ \n}\ \nfoo bar:baz:bang:bop:biddle:woo:look:at:all:these:pseudoclasses {\ \n a: b;\ \n}\ \nfoo bar:baz bang bop biddle woo look at all these elems {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/alpha.rs000066400000000000000000000025341474765622100236340ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/alpha.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("alpha") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:color\";\ \n$x: rgb(0, 255, 255);\n\ \ndiv {\ \n color: rgb(255, $blue: 0, $green: 255);\ \n background: rgb(123, 45, 6);\ \n// flah: rgba(0, 0, 0, 1) + #111;\ \n grah: rgba(#f0e, $alpha: .5);\ \n// blah: rgba(1,2,3,.6);\ \n \ \n floo: $x;\ \n// bloo: rgba($x, 0.7);\ \n groo: $x;\ \n \ \n $x: rgb(123, 45, 6);\ \n \ \n hoo: color.red($x);\ \n moo: color.green($x);\ \n poo: color.blue($x);\ \n \ \n// goo: mix(rgba(255, 0, 0, 0.5), #00f);\ \n \ \n boo: color.invert(#123456);\ \n}\n"), "div {\ \n color: rgb(255, 255, 0);\ \n background: rgb(123, 45, 6);\ \n grah: rgba(255, 0, 238, 0.5);\ \n floo: rgb(0, 255, 255);\ \n groo: rgb(0, 255, 255);\ \n hoo: 123;\ \n moo: 45;\ \n poo: 6;\ \n boo: #edcba9;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/arglist.rs000066400000000000000000000011041474765622100242040ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/arglist.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("arglist") } #[test] fn test() { assert_eq!( runner().ok("@mixin foo($x, $y, $zs...) {\ \n foo-x: $x;\ \n foo-y: $y;\ \n foo-zs: $zs;\ \n}\n\ \ndiv {\ \n @include foo(a, b, c, d, e);\ \n}"), "div {\ \n foo-x: a;\ \n foo-y: b;\ \n foo-zs: c, d, e;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/backrefs_in_selector_groups.rs000066400000000000000000000011661474765622100303140ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/backrefs-in-selector-groups.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("backrefs-in-selector-groups") } #[test] fn test() { assert_eq!( runner().ok("a {\ \n &:c, & d {\ \n hey: ho;\ \n }\ \n}\n\ \na b {\ \n &:c, & d {\ \n hey: ho;\ \n }\ \n}\n"), "a:c, a d {\ \n hey: ho;\ \n}\ \na b:c, a b d {\ \n hey: ho;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/backslash.rs000066400000000000000000000010231474765622100244720ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/backslash.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("backslash") } #[test] fn test() { assert_eq!( runner().ok("div, span {\ \n\tcolor: red;\ \n\t\\ foo {\ \n\t\tcolor: blue;\ \n\t}\ \n}"), "div, span {\ \n color: red;\ \n}\ \ndiv \\ foo, span \\ foo {\ \n color: blue;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/basic_function.rs000066400000000000000000000007031474765622100255310ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/basic_function.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("basic_function") } #[test] fn test() { assert_eq!( runner().ok("@function foo() {\ \n @return 1 + 2;\ \n}\n\ \nbar {\ \n a: foo();\ \n}\n"), "bar {\ \n a: 3;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/basic_mixins.rs000066400000000000000000000006541474765622100252200ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/basic_mixins.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("basic_mixins") } #[test] fn test() { assert_eq!( runner().ok("@mixin foo {a: b}\n\ \nbar {\ \n @include foo;\ \n c: d; }\n"), "bar {\ \n a: b;\ \n c: d;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/basic_prop_name_interpolation.rs000066400000000000000000000005641474765622100306400ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/basic_prop_name_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("basic_prop_name_interpolation") } #[test] fn test() { assert_eq!( runner().ok("foo {bar#{1 + 2}: blip}\n"), "foo {\ \n bar3: blip;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/basic_selector_interpolation.rs000066400000000000000000000005661474765622100305020ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/basic_selector_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("basic_selector_interpolation") } #[test] fn test() { assert_eq!( runner().ok("#{\"foo\"}.bar baz {a: b}\n"), "foo.bar baz {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/blimp.rs000066400000000000000000000005071474765622100236500ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/blimp.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("blimp") } #[test] fn test() { assert_eq!( runner().ok("blimp { color: green }\n"), "blimp {\ \n color: green;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/block_comment_in_script.rs000066400000000000000000000005521474765622100274330ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/block_comment_in_script.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("block_comment_in_script") } #[test] fn test() { assert_eq!( runner().ok("foo {a: 1 + /* flang */ bar}\n"), "foo {\ \n a: 1bar;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/cfunc.rs000066400000000000000000000005661474765622100236500ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/cfunc.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("cfunc") } #[test] fn test() { assert_eq!( runner().ok("div {\ \n blah: say-something();\ \n}"), "div {\ \n blah: say-something();\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/classes_and_ids.rs000066400000000000000000000012721474765622100256630ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/classes-and-ids.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("classes-and-ids") } #[test] fn test() { assert_eq!( runner().ok("div.foo {\ \n color: red;\ \n #hux buz {\ \n width: auto;\ \n }\ \n > .mux {\ \n text-align: center;\ \n }\ \n}"), "div.foo {\ \n color: red;\ \n}\ \ndiv.foo #hux buz {\ \n width: auto;\ \n}\ \ndiv.foo > .mux {\ \n text-align: center;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/color_output.rs000066400000000000000000000064501474765622100253060ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/color_output.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("color_output") } #[test] fn test() { assert_eq!( runner().ok("$green: green;\ \n$green-hex: #00FF00;\ \n$green-hex-min: #0f0;\ \n$green-rgb: rgb(0, 255, 0);\ \n$green-rgba-t: rgba(0, 255, 0, 0.5);\ \n$green-rgba-s: rgba(0, 255, 0, 1);\ \n$offgreen: #00ff01;\ \n$silver: silver;\ \n$silver-hex: #ddd;\n\ \na {\ \n\tq: silver;\ \n\tr: #ddd;\ \n\ts: green;\ \n\tt: #00FF00;\ \n\tv: #0f0;\ \n\tw: rgb(0, 255, 0);\ \n\tx: rgba(0, 255, 0, 0.5);\ \n\ty: rgba(0, 255, 0, 1);\ \n\tz: #00ff01; }\n\ \nb {\ \n\tq: 1px solid silver;\ \n\tr: 1px solid #ddd;\ \n\ts: 1px solid green;\ \n\tt: 1px solid #00FF00;\ \n\tv: 1px solid #0f0;\ \n\tw: 1px solid rgb(0, 255, 0);\ \n\tx: 1px solid rgba(0, 255, 0, 0.5);\ \n\ty: 1px solid rgba(0, 255, 0, 1);\ \n\tz: 1px solid #00ff01; }\n\ \nc {\ \n\tq: $silver;\ \n\tr: $silver-hex;\ \n\ts: $green;\ \n\tt: $green-hex;\ \n\tv: $green-hex-min;\ \n\tw: $green-rgb;\ \n\tx: $green-rgba-t;\ \n\ty: $green-rgba-s;\ \n\tz: $offgreen; }\n\ \nd {\ \n\tq: 1px solid $silver;\ \n\tr: 1px solid $silver-hex;\ \n\ts: 1px solid $green;\ \n\tt: 1px solid $green-hex;\ \n\tv: 1px solid $green-hex-min;\ \n\tw: 1px solid $green-rgb;\ \n\tx: 1px solid $green-rgba-t;\ \n\ty: 1px solid $green-rgba-s;\ \n\tz: 1px solid $offgreen; }\n\n"), "a {\ \n q: silver;\ \n r: #ddd;\ \n s: green;\ \n t: #00FF00;\ \n v: #0f0;\ \n w: rgb(0, 255, 0);\ \n x: rgba(0, 255, 0, 0.5);\ \n y: rgb(0, 255, 0);\ \n z: #00ff01;\ \n}\ \nb {\ \n q: 1px solid silver;\ \n r: 1px solid #ddd;\ \n s: 1px solid green;\ \n t: 1px solid #00FF00;\ \n v: 1px solid #0f0;\ \n w: 1px solid rgb(0, 255, 0);\ \n x: 1px solid rgba(0, 255, 0, 0.5);\ \n y: 1px solid rgb(0, 255, 0);\ \n z: 1px solid #00ff01;\ \n}\ \nc {\ \n q: silver;\ \n r: #ddd;\ \n s: green;\ \n t: #00FF00;\ \n v: #0f0;\ \n w: rgb(0, 255, 0);\ \n x: rgba(0, 255, 0, 0.5);\ \n y: rgb(0, 255, 0);\ \n z: #00ff01;\ \n}\ \nd {\ \n q: 1px solid silver;\ \n r: 1px solid #ddd;\ \n s: 1px solid green;\ \n t: 1px solid #00FF00;\ \n v: 1px solid #0f0;\ \n w: 1px solid rgb(0, 255, 0);\ \n x: 1px solid rgba(0, 255, 0, 0.5);\ \n y: 1px solid rgb(0, 255, 0);\ \n z: 1px solid #00ff01;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/comment_after_if_directive.rs000066400000000000000000000010241474765622100300770ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/comment_after_if_directive.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("comment_after_if_directive") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n @if true {a: b}\ \n @else {x: y}\ \n /* This is a comment */\ \n c: d }\n"), "foo {\ \n a: b;\ \n /* This is a comment */\ \n c: d;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/composed_args.rs000066400000000000000000000056661474765622100254050ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/composed-args.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("composed-args") } #[test] fn test() { assert_eq!( runner().ok("@mixin A($width: 0, $height: 0, $opacity: 0) {\ \n width: $width;\ \n height: $height;\ \n opacity: $opacity;\ \n}\n\ \n@mixin B($args...) {\ \n @include A($args...);\ \n}\n\ \n@mixin C($args...) {\ \n @include B($args...);\ \n}\n\ \n.testOneLevelPassthrough {\ \n @include B(1px, 2px, 0.3);\ \n}\n\ \n.testOneLevelNoArgs {\ \n @include B();\ \n}\n\ \n.testOneLevelSingleArg {\ \n @include B(1px);\ \n}\n\ \n.testOneLevelNamedSingleArg {\ \n @include B($opacity: 0.1);\ \n}\n\ \n.testOneLevelNamedArgs {\ \n @include B($opacity: 0.3, $width: 1px, $height: 2px);\ \n}\n\ \n.testTwoLevelPassthrough {\ \n @include C(1px, 2px, 0.3);\ \n}\n\ \n.testTwoLevelNoArgs {\ \n @include C();\ \n}\n\ \n.testTwoLevelSingleArg {\ \n @include C(1px);\ \n}\n\ \n.testTwoLevelNamedSingleArg {\ \n @include C($opacity: 0.1);\ \n}\n\ \n.testTwoLevelNamedArgs {\ \n @include C($opacity: 0.3, $width: 1px, $height: 2px);\ \n}\n"), ".testOneLevelPassthrough {\ \n width: 1px;\ \n height: 2px;\ \n opacity: 0.3;\ \n}\ \n.testOneLevelNoArgs {\ \n width: 0;\ \n height: 0;\ \n opacity: 0;\ \n}\ \n.testOneLevelSingleArg {\ \n width: 1px;\ \n height: 0;\ \n opacity: 0;\ \n}\ \n.testOneLevelNamedSingleArg {\ \n width: 0;\ \n height: 0;\ \n opacity: 0.1;\ \n}\ \n.testOneLevelNamedArgs {\ \n width: 1px;\ \n height: 2px;\ \n opacity: 0.3;\ \n}\ \n.testTwoLevelPassthrough {\ \n width: 1px;\ \n height: 2px;\ \n opacity: 0.3;\ \n}\ \n.testTwoLevelNoArgs {\ \n width: 0;\ \n height: 0;\ \n opacity: 0;\ \n}\ \n.testTwoLevelSingleArg {\ \n width: 1px;\ \n height: 0;\ \n opacity: 0;\ \n}\ \n.testTwoLevelNamedSingleArg {\ \n width: 0;\ \n height: 0;\ \n opacity: 0.1;\ \n}\ \n.testTwoLevelNamedArgs {\ \n width: 1px;\ \n height: 2px;\ \n opacity: 0.3;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/concat.rs000066400000000000000000000011021474765622100240040ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/concat.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("concat") } #[test] fn test() { assert_eq!( runner().ok("div {\ \n a: hello + \"goodbye\";\ \n b: \"hello\" + goodbye;\ \n c: 3 + \"hello\";\ \n d: \"hello\" + 3;\ \n}"), "div {\ \n a: hellogoodbye;\ \n b: \"hellogoodbye\";\ \n c: \"3hello\";\ \n d: \"hello3\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/cons_up.rs000066400000000000000000000040501474765622100242100ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/cons-up.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("cons-up") } #[test] fn test() { assert_eq!( runner().ok( "@use \"sass:string\";\ \n@use \"sass:list\";\n\ \n$inputs-list: \'input[type=\"email\"]\',\ \n \'input[type=\"number\"]\',\ \n \'input[type=\"password\"]\',\ \n \'input[type=\"search\"]\',\ \n \'input[type=\"tel\"]\',\ \n \'input[type=\"text\"]\',\ \n \'input[type=\"url\"]\',\n\ \n // Webkit & Gecko may change the display of these in the future\ \n \'input[type=\"color\"]\',\ \n \'input[type=\"date\"]\',\ \n \'input[type=\"datetime\"]\',\ \n \'input[type=\"datetime-local\"]\',\ \n \'input[type=\"month\"]\',\ \n \'input[type=\"time\"]\',\ \n \'input[type=\"week\"]\';\n\ \n$unquoted-inputs-list: ();\n\ \n@each $input-type in $inputs-list {\ \n $unquoted-inputs-list: list.append($unquoted-inputs-list, string.unquote($input-type), comma);\ \n}\n\ \ndiv {\ \n content: $unquoted-inputs-list;\ \n content: list.append((), hello);\ \n content: list.length(());\ \n}" ), "div {\ \n content: input[type=\"email\"], input[type=\"number\"], input[type=\"password\"], input[type=\"search\"], input[type=\"tel\"], input[type=\"text\"], input[type=\"url\"], input[type=\"color\"], input[type=\"date\"], input[type=\"datetime\"], input[type=\"datetime-local\"], input[type=\"month\"], input[type=\"time\"], input[type=\"week\"];\ \n content: hello;\ \n content: 0;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/css_basic_scss.rs000066400000000000000000000005301474765622100255250ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/css_basic_scss.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("css_basic_scss") } #[test] fn test() { assert_eq!( runner().ok("sel {\ \n p: v; }\n"), "sel {\ \n p: v;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/css_block_directive_with_semicolon.rs000066400000000000000000000007521474765622100316520ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/css_block_directive_with_semicolon.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("css_block_directive_with_semicolon") } #[test] fn test() { assert_eq!( runner().ok("@foo {\ \n a: b; }\n\ \n@bar {\ \n a: b; }\n"), "@foo {\ \n a: b;\ \n}\ \n@bar {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/css_cdo_and_cdc_ignored_at_toplevel.rs000066400000000000000000000011461474765622100317220ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/css_cdo_and_cdc_ignored_at_toplevel.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("css_cdo_and_cdc_ignored_at_toplevel") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n bar: baz; }\n\ \nbar {\ \n bar: baz; }\n\ \nbaz {\ \n bar: baz; }\n"), "foo {\ \n bar: baz;\ \n}\ \nbar {\ \n bar: baz;\ \n}\ \nbaz {\ \n bar: baz;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/css_crazy_comments.rs000066400000000000000000000031561474765622100264550ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/css_crazy_comments.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("css_crazy_comments") } #[test] fn test() { assert_eq!( runner().ok("/* This is a CSS comment. */\ \n.one {\ \n color: green; }\n\ \n/* Another comment */\ \n/* The following should not be used:\ \n.two {color: red;} */\ \n.three {\ \n color: green;\ \n /* color: red; */ }\n\ \n/**\ \n.four {color: red;} */\ \n.five {\ \n color: green; }\n\ \n/**/\ \n.six {\ \n color: green; }\n\ \n/*********/\ \n.seven {\ \n color: green; }\n\ \n/* a comment **/\ \n.eight {\ \n color: green; }\n"), "/* This is a CSS comment. */\ \n.one {\ \n color: green;\ \n}\ \n/* Another comment */\ \n/* The following should not be used:\ \n.two {color: red;} */\ \n.three {\ \n color: green;\ \n /* color: red; */\ \n}\ \n/**\ \n.four {color: red;} */\ \n.five {\ \n color: green;\ \n}\ \n/**/\ \n.six {\ \n color: green;\ \n}\ \n/*********/\ \n.seven {\ \n color: green;\ \n}\ \n/* a comment **/\ \n.eight {\ \n color: green;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/css_empty_declarations.rs000066400000000000000000000005601474765622100273020ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/css_empty_declarations.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("css_empty_declarations") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n bar: baz; }\n"), "foo {\ \n bar: baz;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/css_empty_rule.rs000066400000000000000000000003701474765622100256000ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/css_empty_rule.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("css_empty_rule") } #[test] fn test() { assert_eq!(runner().ok(""), ""); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/css_import_directive.rs000066400000000000000000000005061474765622100267640ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/css_import_directive.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("css_import_directive") } #[test] fn test() { assert_eq!( runner().ok("@import url(foo.css);"), "@import url(foo.css);\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/css_invisible_comments.rs000066400000000000000000000005501474765622100273040ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/css_invisible_comments.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("css_invisible_comments") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n a: d; }\n"), "foo {\ \n a: d;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/css_property_comments.rs000066400000000000000000000007121474765622100272040ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/css_property_comments.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("css_property_comments") } #[test] fn test() { assert_eq!( runner().ok(".foo {\ \n /* Foo\ \n * Bar */\ \n a: b; }\n"), ".foo {\ \n /* Foo\ \n * Bar */\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/css_rule_comments.rs000066400000000000000000000006721474765622100262740ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/css_rule_comments.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("css_rule_comments") } #[test] fn test() { assert_eq!( runner().ok("/* Foo\ \n * Bar */\ \n.foo {\ \n a: b; }\n"), "/* Foo\ \n * Bar */\ \n.foo {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/css_selector_comments.rs000066400000000000000000000006041474765622100271400ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/css_selector_comments.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("css_selector_comments") } #[test] fn test() { assert_eq!( runner().ok(".foo #bar:baz(bip) {\ \n a: b; }\n"), ".foo #bar:baz(bip) {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/css_selector_hacks.rs000066400000000000000000000004711474765622100264060ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/css_selector_hacks.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("css_selector_hacks") } #[test] fn test() { assert_eq!( runner().ok("> > E {\ \n a: b; }\n"), "" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/css_spaceless_combo_selectors.rs000066400000000000000000000005721474765622100306430ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/css_spaceless_combo_selectors.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("css_spaceless_combo_selectors") } #[test] fn test() { assert_eq!( runner().ok("E + F {\ \n a: b; }\n"), "E + F {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/css_unary_ops.rs000066400000000000000000000010201474765622100254230ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/css_unary_ops.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("css_unary_ops") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n a: -0.5em;\ \n b: 0.5em;\ \n c: -foo(12px);\ \n d: +foo(12px); }\n"), "foo {\ \n a: -0.5em;\ \n b: 0.5em;\ \n c: -foo(12px);\ \n d: +foo(12px);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/default_args.rs000066400000000000000000000015621474765622100252070ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/default-args.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("default-args") } #[test] fn test() { assert_eq!( runner().ok("@mixin foo($x: 1, $y: $x + 1) {\ \n value: $x, $y;\ \n}\n\ \ndiv {\ \n @include foo();\ \n @include foo(2);\ \n @include foo($y: 3);\ \n}\n\ \n$v: hey;\n\ \n@mixin bar($x: $v) {\ \n value: $x;\ \n}\n\ \ndiv {\ \n $v: ho !global;\ \n @include bar();\ \n}\n"), "div {\ \n value: 1, 2;\ \n value: 2, 3;\ \n value: 1, 3;\ \n}\ \ndiv {\ \n value: ho;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/default_parameters.rs000066400000000000000000000011561474765622100264150ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/default-parameters.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("default-parameters") } #[test] fn test() { assert_eq!( runner().ok("$a: red;\n\ \n@mixin f($a: $a) {\ \n color: $a;\ \n}\n\ \nh1 {\ \n @include f;\ \n}\n\ \nh2 {\ \n @include f(blue);\ \n}"), "h1 {\ \n color: red;\ \n}\ \nh2 {\ \n color: blue;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/default_vars_in_default_params.rs000066400000000000000000000011121474765622100307520ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/default-vars-in-default-params.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("default-vars-in-default-params") } #[test] fn test() { assert_eq!( runner().ok("$y: why;\n\ \n@mixin foo($x, $y: $y) {\ \n stuff: $x $y;\ \n}\n\ \ndiv {\ \n why: $y;\ \n @include foo(ecks);\ \n}"), "div {\ \n why: why;\ \n stuff: ecks why;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/directives_in_propsets.rs000066400000000000000000000023631474765622100273350ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/directives-in-propsets.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("directives-in-propsets") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:meta\";\ \n$color: red;\ \n$position: 50%;\ \n$x: 0;\n\ \n@mixin foo() {\ \n image: url(foo.png);\ \n}\n\ \ndiv {\ \n background: {\ \n something: {\ \n color: green;\ \n }\ \n @if (meta.type-of($color) == \"color\") {\ \n color: $color;\ \n }\ \n @if (meta.type-of($position) == \"number\") {\ \n position: $position;\ \n @include foo();\ \n }\ \n groo: foo;\ \n }\ \n width: $x;\ \n}"), "div {\ \n background-something-color: green;\ \n background-color: red;\ \n background-position: 50%;\ \n background-image: url(foo.png);\ \n background-groo: foo;\ \n width: 0;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/each.rs000066400000000000000000000014761474765622100234530ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/each.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("each") } #[test] fn test() { assert_eq!( runner().ok("div {\ \n $x: 3;\ \n @each $x in singleton {\ \n color: $x;\ \n }\ \n divider: $x;\ \n @each $x in foo, bar, hux {\ \n span {\ \n msg: $x;\ \n }\ \n }\ \n}"), "div {\ \n color: singleton;\ \n divider: 3;\ \n}\ \ndiv span {\ \n msg: foo;\ \n}\ \ndiv span {\ \n msg: bar;\ \n}\ \ndiv span {\ \n msg: hux;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/each_directive.rs000066400000000000000000000013751474765622100255070ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/each_directive.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("each_directive") } #[test] fn test() { assert_eq!( runner().ok("a {\ \n @each $number in 1px 2px 3px 4px {\ \n b: $number;\ \n }\ \n}\ \nc {\ \n @each $str in foo, bar, baz, bang {\ \n d: $str;\ \n }\ \n}\n"), "a {\ \n b: 1px;\ \n b: 2px;\ \n b: 3px;\ \n b: 4px;\ \n}\ \nc {\ \n d: foo;\ \n d: bar;\ \n d: baz;\ \n d: bang;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/each_in_functions.rs000066400000000000000000000025721474765622100262270ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/each_in_functions.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("each_in_functions") } #[test] fn test() { assert_eq!( runner().ok( "@use \"sass:list\";\ \n@use \"sass:meta\";\ \n$GLOBAL: global;\n\ \n@function foo($g1, $g2, $g3) {\ \n @each $value in $g1, $g2, $g3 {\ \n $GLOBAL: $GLOBAL each $value !global;\ \n $GLOBAL: $GLOBAL type1 meta.type-of(list.nth($value, 1)) !global;\ \n $GLOBAL: $GLOBAL type2 meta.type-of(list.nth($value, 2)) !global;\ \n }\ \n @each $value in (foo: foo, bar: bar) {\ \n $GLOBAL: $GLOBAL map $value !global;\ \n }\ \n @return 0;\ \n}\n\ \ndiv {\ \n a: foo(50% 50%, cover circle, red blue);\ \n b: $GLOBAL;\ \n $colors: red green blue;\ \n c: a, b, meta.type-of(list.nth($colors, 2)), d;\ \n}\n" ), "div {\ \n a: 0;\ \n b: global each 50% 50% type1 number type2 number each cover circle type1 string type2 string each red blue type1 color type2 color map foo foo map bar bar;\ \n c: a, b, color, d;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/for_in_functions.rs000066400000000000000000000012101474765622100261010ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/for_in_functions.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("for_in_functions") } #[test] fn test() { assert_eq!( runner().ok("@function foo() {\ \n\t$limit: 10;\ \n\t$y: 0;\ \n\t@for $x from 1 through $limit {\ \n\t $limit: 4;\ \n\t $y: $y + $x;\ \n\t}\ \n\t@return $y;\ \n}\n\ \ndiv {\ \n\twidth: foo();\ \n}"), "div {\ \n width: 55;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/function_args.rs000066400000000000000000000007331474765622100254070ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/function_args.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("function_args") } #[test] fn test() { assert_eq!( runner().ok("@function plus($var1, $var2) {\ \n @return $var1 + $var2;\ \n}\n\ \nbar {\ \n a: plus(1, 2);\ \n}\n"), "bar {\ \n a: 3;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/function_names.rs000066400000000000000000000010661474765622100255560ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/function-names.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("function-names") } #[test] fn test() { assert_eq!( runner().ok("div {\ \n color: unquote(\"hello\");\ \n color: un#{quo}te(\"hello\");\ \n color: (\"hello\")un#{quo}te;\ \n}\n"), "div {\ \n color: hello;\ \n color: unquote(\"hello\");\ \n color: \"hello\" unquote;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/functions.rs000066400000000000000000000014421474765622100245540ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/functions.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("functions") } #[test] fn test() { assert_eq!( runner().ok("@function foo($x, $y, $z) {\ \n @while $x < $y {\ \n $z: transform($z);\ \n @return $z;\ \n }\ \n}\n\ \n@function bar($x) {\ \n @if $x {\ \n @return YES;\ \n }\ \n}\n\ \ndiv {\ \n answer: bar(true);\ \n flanswer: fudge(mux+flux) + mudge(a/b);\ \n}"), "div {\ \n answer: YES;\ \n flanswer: fudge(muxflux)mudge(a/b);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/functions_and_mixins.rs000066400000000000000000000020401474765622100267600ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/functions-and-mixins.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("functions-and-mixins") } #[test] fn test() { assert_eq!( runner().ok("@function foo() {\ \n @return \"hello\";\ \n}\n\ \n@mixin foo() {\ \n content: \"hello\";\ \n}\n\ \ndiv {\ \n span {\ \n @function length($a, $b, $c, $d) {\ \n @return $a + $b + $c + $d;\ \n }\n\ \n div {\ \n content: foo();\ \n @include foo();\ \n width: length(1,2,2,3);\ \n }\ \n }\n\ \n height: length(a b c d e);\n\ \n}"), "div {\ \n height: 5;\ \n}\ \ndiv span div {\ \n content: \"hello\";\ \n content: \"hello\";\ \n width: 8;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/guard_assign.rs000066400000000000000000000005461474765622100252160ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/guard_assign.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("guard_assign") } #[test] fn test() { assert_eq!( runner().ok("$var: 2 !default;\n\ \nfoo {a: $var}\n"), "foo {\ \n a: 2;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/hey1.rs000066400000000000000000000004761474765622100234200ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/hey1.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("hey1") } #[test] fn test() { assert_eq!( runner().ok("div { width: 1px; }\n"), "div {\ \n width: 1px;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/hey2.rs000066400000000000000000000004761474765622100234210ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/hey2.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("hey2") } #[test] fn test() { assert_eq!( runner().ok("div { color: red; }\n"), "div {\ \n color: red;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/hyphen_interpolated.rs000066400000000000000000000007001474765622100266050ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/hyphen-interpolated.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("hyphen-interpolated") } #[test] fn test() { assert_eq!( runner().ok("div {\ \n foo: -hux-#{2+3};\ \n bar: hux-#{2+3};\ \n}"), "div {\ \n foo: -hux-5;\ \n bar: hux-5;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/ie_backslash.rs000066400000000000000000000007261474765622100251600ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/ie-backslash.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("ie-backslash") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:color\";\ \ndiv {\ \n background-color: color.adjust(red, $lightness: -10%) \\9;\ \n}"), "div {\ \n background-color: #cc0000 \\9 ;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/ie_functions.rs000066400000000000000000000120641474765622100252330ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/ie-functions.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("ie-functions") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok( "@use \"sass:color\";\ \n@use \"sass:math\";\ \n@use \"sass:meta\";\n\ \n@mixin ie-opacity($opacity) {\ \n opacity: math.div($opacity, 100);\ \n filter: alpha(opacity=$opacity);\ \n bilter: alpha(opacity=$opacity);\ \n kilter: meta.type-of(opacity=$opacity);\ \n left: expression(document.body.clientWidth/2-oDiv.offsetWidth/2);\ \n flop: expression(document.body.clientHeight/2-oDiv.offsetHeight/2);\ \n}\n\ \n$startColor: red;\ \n$endColor: green;\n\ \nfoo {\ \n filter: progid:Microsoft.foo.bar.Baz(flip=#{foo + bar}, bang=#00ff00cc);\ \n something: blah(hux = mumble);\ \n blah: progid:something.something(flip=foobar, bang=#abc);\ \n blah: progid:bar.hux();\ \n blah: meta.type-of(hux = mumble);\ \n @include ie-opacity(.5);\ \n left: expression(document.body.clientWidth/4);\ \n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#{color.ie-hex-str($startColor)}\', endColorstr=\'#{color.ie-hex-str($endColor)}\', GradientType=1);\ \n}\n\ \n.parser {\ \n filter: progid:DXImageTransform.Microsoft.Alpha(opacity=20);\ \n filter: progid:DXImageTransform.Microsoft.MotionBlur(strength=50)\ \n progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);\ \n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#550000FF, endColorstr=#55FFFF00);\ \n filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)\ \n progid:DXImageTransform.Microsoft.Alpha(opacity=50)\ \n progid:DXImageTransform.Microsoft.Blur(strength=10);\ \n filter: progid:DXImageTransform.Microsoft.Wave(strength=100)\ \n progid:DXImageTransform.Microsoft.CheckerBoard(duration=4);\ \n filter: progid:DXImageTransform.Microsoft.Wave(strength=100)\ \n progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)\ \n progid:DXImageTransform.Microsoft.Iris(irisstyle=\'STAR\', duration=4);\ \n filter: progid:DXImageTransform.Microsoft.MotionBlur(strength=13, direction=310)\ \n progid:DXImageTransform.Microsoft.Blur(pixelradius=2)\ \n progid:DXImageTransform.Microsoft.Wheel(duration=3);\ \n filter: progid:DXImageTransform.Microsoft.gradient(enabled=\'false\',\ \n startColorstr=#550000FF, endColorstr=#55FFFF00);\ \n}\n" ), "foo {\ \n filter: progid:Microsoft.foo.bar.Baz(flip=foobar, bang=#00ff00cc);\ \n something: blah(hux=mumble);\ \n blah: progid:something.something(flip=foobar, bang=#abc);\ \n blah: progid:bar.hux();\ \n blah: string;\ \n opacity: 0.005;\ \n filter: alpha(opacity=0.5);\ \n bilter: alpha(opacity=0.5);\ \n kilter: string;\ \n left: expression(document.body.clientWidth/2-oDiv.offsetWidth/2);\ \n flop: expression(document.body.clientHeight/2-oDiv.offsetHeight/2);\ \n left: expression(document.body.clientWidth/4);\ \n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=\"#FFFF0000\", endColorstr=\"#FF008000\", GradientType=1);\ \n}\ \n.parser {\ \n filter: progid:DXImageTransform.Microsoft.Alpha(opacity=20);\ \n filter: progid:DXImageTransform.Microsoft.MotionBlur(strength=50) progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);\ \n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#550000FF, endColorstr=#55FFFF00);\ \n filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1) progid:DXImageTransform.Microsoft.Alpha(opacity=50) progid:DXImageTransform.Microsoft.Blur(strength=10);\ \n filter: progid:DXImageTransform.Microsoft.Wave(strength=100) progid:DXImageTransform.Microsoft.CheckerBoard(duration=4);\ \n filter: progid:DXImageTransform.Microsoft.Wave(strength=100) progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1) progid:DXImageTransform.Microsoft.Iris(irisstyle=\"STAR\", duration=4);\ \n filter: progid:DXImageTransform.Microsoft.MotionBlur(strength=13, direction=310) progid:DXImageTransform.Microsoft.Blur(pixelradius=2) progid:DXImageTransform.Microsoft.Wheel(duration=3);\ \n filter: progid:DXImageTransform.Microsoft.gradient(enabled=\"false\", startColorstr=#550000FF, endColorstr=#55FFFF00);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/if_directive.rs000066400000000000000000000005731474765622100252040ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/if_directive.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("if_directive") } #[test] fn test() { assert_eq!( runner().ok("@if \"foo\" != \"foo\" {foo {a: b}}\ \n@else {bar {a: b}}\n"), "bar {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/if_in_mixin.rs000066400000000000000000000016361474765622100250410ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/if-in-mixin.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("if-in-mixin") } #[test] fn test() { assert_eq!( runner().ok("$x: true;\n\ \n@mixin foobar() {\ \n @if $x {\ \n $x: false !global;\ \n content: foo;\ \n }\ \n @else {\ \n $x: true !global;\ \n content: bar;\ \n }\ \n}\n\ \ndiv {\ \n @include foobar();\ \n @include foobar();\ \n @include foobar();\ \n $x: true !global;\ \n @include foobar();\ \n}\n"), "div {\ \n content: foo;\ \n content: bar;\ \n content: foo;\ \n content: foo;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/if_in_propset.rs000066400000000000000000000011541474765622100254040ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/if-in-propset.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("if-in-propset") } #[test] fn test() { assert_eq!( runner().ok("div {\ \n prop: {\ \n a: \"hello\";\ \n b: \"goodbye\";\ \n @if true {\ \n c: \"badbye\";\ \n }\ \n }\ \n}"), "div {\ \n prop-a: \"hello\";\ \n prop-b: \"goodbye\";\ \n prop-c: \"badbye\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/imp.rs000066400000000000000000000004741474765622100233350ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/imp.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("imp") } #[test] fn test() { assert_eq!( runner().ok("div { color: red; }\n"), "div {\ \n color: red;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/important.rs000066400000000000000000000007161474765622100245640ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/important.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("important") } #[test] fn test() { assert_eq!( runner().ok("div {\ \n color: red ! important;\ \n width: 5px ! important;\ \n}"), "div {\ \n color: red !important;\ \n width: 5px !important;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/important_in_arglist.rs000066400000000000000000000012021474765622100267660ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/important-in-arglist.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("important-in-arglist") } #[test] fn test() { assert_eq!( runner().ok("@mixin foo($x) {\ \n style: $x;\ \n}\n\ \ndiv {\ \n @include foo(0px 0px 0px 0px #ef8086 inset !important);\ \n fludge: foo bar ! important hux;\ \n}"), "div {\ \n style: 0px 0px 0px 0px #ef8086 inset !important;\ \n fludge: foo bar !important hux;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/interpolated_selectors.rs000066400000000000000000000006231474765622100273210ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/interpolated-selectors.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("interpolated-selectors") } #[test] fn test() { assert_eq!( runner().ok("foo#{bar} hux {\ \n color: red;\ \n}"), "foobar hux {\ \n color: red;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/interpolated_strings.rs000066400000000000000000000012361474765622100270100ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/interpolated-strings.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("interpolated-strings") } #[test] fn test() { assert_eq!( runner().ok("$x: ecks;\ \n$y: why;\n\ \ndiv {\ \n blah: \"hey #{$x} ho\";\ \n blee: hey#{$y}ho;\ \n bluh: \"foo #{$x}\";\ \n bleg: foo#{\"hey\"}bar;\ \n}"), "div {\ \n blah: \"hey ecks ho\";\ \n blee: heywhyho;\ \n bluh: \"foo ecks\";\ \n bleg: fooheybar;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/interpolation.rs000066400000000000000000000006341474765622100254350ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("interpolation") } #[test] fn test() { assert_eq!( runner().ok("$bar : \"#foo\";\n\n\n\ \nul li#{$bar} a span.label { foo: bar; }\n"), "ul li#foo a span.label {\ \n foo: bar;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/interpolation_operators_precedence.rs000066400000000000000000000216261474765622100317140ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/interpolation-operators-precedence.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("interpolation-operators-precedence") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( ".test {\ \n a01: (#{a}+5.0% + 2);\ \n a02: (#{a}+ 5.0% + 2);\ \n a03: (#{a} +5.0% + 2);\ \n a04: (#{a} + 5.0% + 2);\ \n b01: (5 + 2.0%+#{a});\ \n b02: (5 + 2.0%+ #{a});\ \n b03: (5 + 2.0% +#{a});\ \n b04: (5 + 2.0% + #{a});\ \n c01: (#{a} +5.0% + 2);\ \n c02: (#{a} -5.0% + 2);\ \n c03: (#{a} /5.0% + 2);\ \n c04: (#{a} *5.0% + 2);\ \n c05: (#{a} +5.0% - 2);\ \n c06: (#{a} -5.0% - 2);\ \n c07: (#{a} /5.0% - 2);\ \n c08: (#{a} *5.0% - 2);\ \n c09: (#{a} +5.0% / 2);\ \n c10: (#{a} -5.0% / 2);\ \n c11: (#{a} /5.0% / 2);\ \n c12: (#{a} *5.0% / 2);\ \n c13: (#{a} +5.0% * 2);\ \n c14: (#{a} -5.0% * 2);\ \n c15: (#{a} /5.0% * 2);\ \n c16: (#{a} *5.0% * 2);\ \n d01: (5 + 2.0% +#{a});\ \n d02: (5 + 2.0% -#{a});\ \n d03: (5 + 2.0% /#{a});\ \n d04: (5 + 2.0% *#{a});\ \n d05: (5 - 2.0% +#{a});\ \n d06: (5 - 2.0% -#{a});\ \n d07: (5 - 2.0% /#{a});\ \n d08: (5 - 2.0% *#{a});\ \n d09: (5% / 2.0 +#{a});\ \n d10: (5% / 2.0 -#{a});\ \n d11: (5% / 2.0 /#{a});\ \n d12: (5% / 2.0 *#{a});\ \n d13: (5 * 2.0% +#{a});\ \n d14: (5 * 2.0% -#{a});\ \n d15: (5 * 2.0% /#{a});\ \n d16: (5 * 2.0% *#{a});\ \n e01: (#{a} ==5.0% == 2);\ \n e02: (#{a} >5.0% > 2);\ \n e03: (#{a} <5.0% < 2);\ \n e04: (#{a} >=5.0% >= 2);\ \n e05: (#{a} <=5.0% <= 2);\ \n e06: (#{a} !=5.0% != 2);\ \n}\n" ), "DEPRECATION WARNING [strict-unary]: This operation is parsed as:\n\ \n #{a} + 5%\n\ \nbut you may have intended it to mean:\n\ \n #{a} (+5%)\n\ \nAdd a space after + to clarify that it\'s meant to be a binary operation, or wrap\ \nit in parentheses to make it a unary operation. This will be an error in future\ \nversions of Sass.\n\ \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\n\ \n ,\ \n4 | a03: (#{a} +5.0% + 2);\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 4:9 root stylesheet\n\ \nDEPRECATION WARNING [strict-unary]: This operation is parsed as:\n\ \n 5 + 2% + #{a}\n\ \nbut you may have intended it to mean:\n\ \n 5 + 2% (+#{a})\n\ \nAdd a space after + to clarify that it\'s meant to be a binary operation, or wrap\ \nit in parentheses to make it a unary operation. This will be an error in future\ \nversions of Sass.\n\ \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\n\ \n ,\ \n8 | b03: (5 + 2.0% +#{a});\ \n | ^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 8:9 root stylesheet\n\ \nDEPRECATION WARNING [strict-unary]: This operation is parsed as:\n\ \n #{a} + 5%\n\ \nbut you may have intended it to mean:\n\ \n #{a} (+5%)\n\ \nAdd a space after + to clarify that it\'s meant to be a binary operation, or wrap\ \nit in parentheses to make it a unary operation. This will be an error in future\ \nversions of Sass.\n\ \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\n\ \n ,\ \n10 | c01: (#{a} +5.0% + 2);\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 10:9 root stylesheet\n\ \nDEPRECATION WARNING [strict-unary]: This operation is parsed as:\n\ \n #{a} + 5%\n\ \nbut you may have intended it to mean:\n\ \n #{a} (+5%)\n\ \nAdd a space after + to clarify that it\'s meant to be a binary operation, or wrap\ \nit in parentheses to make it a unary operation. This will be an error in future\ \nversions of Sass.\n\ \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\n\ \n ,\ \n14 | c05: (#{a} +5.0% - 2);\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 14:9 root stylesheet\n\ \nDEPRECATION WARNING [strict-unary]: This operation is parsed as:\n\ \n #{a} + 5% / 2\n\ \nbut you may have intended it to mean:\n\ \n #{a} (+5% / 2)\n\ \nAdd a space after + to clarify that it\'s meant to be a binary operation, or wrap\ \nit in parentheses to make it a unary operation. This will be an error in future\ \nversions of Sass.\n\ \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\n\ \n ,\ \n18 | c09: (#{a} +5.0% / 2);\ \n | ^^^^^^^^^^^^^^\ \n \'\ \n input.scss 18:9 root stylesheet\n\ \nDEPRECATION WARNING [strict-unary]: This operation is parsed as:\n\ \n #{a} + 5% * 2\n\ \nbut you may have intended it to mean:\n\ \n #{a} (+5% * 2)\n\ \nAdd a space after + to clarify that it\'s meant to be a binary operation, or wrap\ \nit in parentheses to make it a unary operation. This will be an error in future\ \nversions of Sass.\n\ \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\n\ \n ,\ \n22 | c13: (#{a} +5.0% * 2);\ \n | ^^^^^^^^^^^^^^\ \n \'\ \n input.scss 22:9 root stylesheet\n\ \nDEPRECATION WARNING [strict-unary]: This operation is parsed as:\n\ \n 5 + 2% + #{a}\n\ \nbut you may have intended it to mean:\n\ \n 5 + 2% (+#{a})\n\ \nAdd a space after + to clarify that it\'s meant to be a binary operation, or wrap\ \nit in parentheses to make it a unary operation. This will be an error in future\ \nversions of Sass.\n\ \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\n\ \n ,\ \n26 | d01: (5 + 2.0% +#{a});\ \n | ^^^^^^^^^^^^^^\ \n \'\ \n input.scss 26:9 root stylesheet\n\ \nDEPRECATION WARNING [strict-unary]: This operation is parsed as:\n\ \n 5 - 2% + #{a}\n\ \nbut you may have intended it to mean:\n\ \n 5 - 2% (+#{a})\n\ \nAdd a space after + to clarify that it\'s meant to be a binary operation, or wrap\ \nit in parentheses to make it a unary operation. This will be an error in future\ \nversions of Sass.\n\ \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\n\ \n ,\ \n30 | d05: (5 - 2.0% +#{a});\ \n | ^^^^^^^^^^^^^^\ \n \'\ \n input.scss 30:9 root stylesheet\n\ \nDEPRECATION WARNING [strict-unary]: This operation is parsed as:\n\ \n 5% / 2 + #{a}\n\ \nbut you may have intended it to mean:\n\ \n 5% / 2 (+#{a})\n\ \nAdd a space after + to clarify that it\'s meant to be a binary operation, or wrap\ \nit in parentheses to make it a unary operation. This will be an error in future\ \nversions of Sass.\n\ \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\n\ \n ,\ \n34 | d09: (5% / 2.0 +#{a});\ \n | ^^^^^^^^^^^^^^\ \n \'\ \n input.scss 34:9 root stylesheet\n\ \nDEPRECATION WARNING [strict-unary]: This operation is parsed as:\n\ \n 5 * 2% + #{a}\n\ \nbut you may have intended it to mean:\n\ \n 5 * 2% (+#{a})\n\ \nAdd a space after + to clarify that it\'s meant to be a binary operation, or wrap\ \nit in parentheses to make it a unary operation. This will be an error in future\ \nversions of Sass.\n\ \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\n\ \n ,\ \n38 | d13: (5 * 2.0% +#{a});\ \n | ^^^^^^^^^^^^^^\ \n \'\ \n input.scss 38:9 root stylesheet\n\ \nError: Undefined operation \"a * 5%\".\ \n ,\ \n13 | c04: (#{a} *5.0% + 2);\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 13:9 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/interpolation_with_bracket_on_next_line.rs000066400000000000000000000006401474765622100327210ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/interpolation_with_bracket_on_next_line.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("interpolation_with_bracket_on_next_line") } #[test] fn test() { assert_eq!( runner().ok("a.#{\"foo\"} b\ \n{color: red}\n"), "a.foo b {\ \n color: red;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/keyword_args_in_functions.rs000066400000000000000000000006361474765622100300260ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/keyword_args_in_functions.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("keyword_args_in_functions") } #[test] fn test() { assert_eq!( runner().ok(".keyed { color: rgba($color: #a7c, $alpha: 0.4) }\n"), ".keyed {\ \n color: rgba(170, 119, 204, 0.4);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/lang.rs000066400000000000000000000067551474765622100235010ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/lang.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("lang") } #[test] fn test() { assert_eq!( runner().ok( "h1:lang(as),h1:lang(bn),h1:lang(gu),h1:lang(hi),h1:lang(kn),h1:lang(ml),h1:lang(mr),h1:lang(or),h1:lang(pa),h1:lang(sa),h1:lang(ta),h1:lang(te) {\ \n line-height:1.5em !important\ \n}\ \nh2:lang(as),h3:lang(as),h4:lang(as),h5:lang(as),h6:lang(as),h2:lang(bn),h3:lang(bn),h4:lang(bn),h5:lang(bn),h6:lang(bn),h2:lang(gu),h3:lang(gu),h4:lang(gu),h5:lang(gu),h6:lang(gu),h2:lang(hi),h3:lang(hi),h4:lang(hi),h5:lang(hi),h6:lang(hi),h2:lang(kn),h3:lang(kn),h4:lang(kn),h5:lang(kn),h6:lang(kn),h2:lang(ml),h3:lang(ml),h4:lang(ml),h5:lang(ml),h6:lang(ml),h2:lang(mr),h3:lang(mr),h4:lang(mr),h5:lang(mr),h6:lang(mr),h2:lang(or),h3:lang(or),h4:lang(or),h5:lang(or),h6:lang(or),h2:lang(pa),h3:lang(pa),h4:lang(pa),h5:lang(pa),h6:lang(pa),h2:lang(sa),h3:lang(sa),h4:lang(sa),h5:lang(sa),h6:lang(sa),h2:lang(ta),h3:lang(ta),h4:lang(ta),h5:lang(ta),h6:lang(ta),h2:lang(te),h3:lang(te),h4:lang(te),h5:lang(te),h6:lang(te)\ \n{\ \n line-height:1.2em\ \n}\ \nol:lang(bcc) li,ol:lang(bqi) li,ol:lang(fa) li,ol:lang(glk) li,ol:lang(kk-arab) li,ol:lang(mzn) li {\ \n list-style-type:-moz-persian;list-style-type:persian\ \n}\ \nol:lang(ckb) li {\ \n list-style-type:-moz-arabic-indic;list-style-type:arabic-indic\ \n}\ \nol:lang(as) li,ol:lang(bn) li{\ \n list-style-type:-moz-bengali;list-style-type:bengali\ \n}\ \nol:lang(or) li {\ \n list-style-type:-moz-oriya;list-style-type:oriya\ \n}" ), "h1:lang(as), h1:lang(bn), h1:lang(gu), h1:lang(hi), h1:lang(kn), h1:lang(ml), h1:lang(mr), h1:lang(or), h1:lang(pa), h1:lang(sa), h1:lang(ta), h1:lang(te) {\ \n line-height: 1.5em !important;\ \n}\ \nh2:lang(as), h3:lang(as), h4:lang(as), h5:lang(as), h6:lang(as), h2:lang(bn), h3:lang(bn), h4:lang(bn), h5:lang(bn), h6:lang(bn), h2:lang(gu), h3:lang(gu), h4:lang(gu), h5:lang(gu), h6:lang(gu), h2:lang(hi), h3:lang(hi), h4:lang(hi), h5:lang(hi), h6:lang(hi), h2:lang(kn), h3:lang(kn), h4:lang(kn), h5:lang(kn), h6:lang(kn), h2:lang(ml), h3:lang(ml), h4:lang(ml), h5:lang(ml), h6:lang(ml), h2:lang(mr), h3:lang(mr), h4:lang(mr), h5:lang(mr), h6:lang(mr), h2:lang(or), h3:lang(or), h4:lang(or), h5:lang(or), h6:lang(or), h2:lang(pa), h3:lang(pa), h4:lang(pa), h5:lang(pa), h6:lang(pa), h2:lang(sa), h3:lang(sa), h4:lang(sa), h5:lang(sa), h6:lang(sa), h2:lang(ta), h3:lang(ta), h4:lang(ta), h5:lang(ta), h6:lang(ta), h2:lang(te), h3:lang(te), h4:lang(te), h5:lang(te), h6:lang(te) {\ \n line-height: 1.2em;\ \n}\ \nol:lang(bcc) li, ol:lang(bqi) li, ol:lang(fa) li, ol:lang(glk) li, ol:lang(kk-arab) li, ol:lang(mzn) li {\ \n list-style-type: -moz-persian;\ \n list-style-type: persian;\ \n}\ \nol:lang(ckb) li {\ \n list-style-type: -moz-arabic-indic;\ \n list-style-type: arabic-indic;\ \n}\ \nol:lang(as) li, ol:lang(bn) li {\ \n list-style-type: -moz-bengali;\ \n list-style-type: bengali;\ \n}\ \nol:lang(or) li {\ \n list-style-type: -moz-oriya;\ \n list-style-type: oriya;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/line_comment_in_script.rs000066400000000000000000000005761474765622100272760ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/line_comment_in_script.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("line_comment_in_script") } #[test] fn test() { assert_eq!( runner().ok("foo {a: 1 + // flang }\ \n blang }\n"), "foo {\ \n a: 1blang;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/long_selector.rs000066400000000000000000000056361474765622100254140ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/long-selector.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("long-selector") } #[test] fn test() { assert_eq!( runner().ok( "html, body, div, span, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, ab, br, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, su, b, sup, var, b, u, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, tab, le, caption, tbody, tfoot, thead, tr, th, td {\ \n border: 0;\ \n font-size: 100%;\ \n font: inherit;\ \n margin: 0;\ \n padding: 0;\ \n vertical-align: baseline;\ \n hey, ho, hoo {\ \n blah: bloo;\ \n blee: bleh;\ \n }\ \n}\n" ), "html, body, div, span, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, ab, br, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, su, b, sup, var, b, u, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, tab, le, caption, tbody, tfoot, thead, tr, th, td {\ \n border: 0;\ \n font-size: 100%;\ \n font: inherit;\ \n margin: 0;\ \n padding: 0;\ \n vertical-align: baseline;\ \n}\ \nhtml hey, html ho, html hoo, body hey, body ho, body hoo, div hey, div ho, div hoo, span hey, span ho, span hoo, iframe hey, iframe ho, iframe hoo, h1 hey, h1 ho, h1 hoo, h2 hey, h2 ho, h2 hoo, h3 hey, h3 ho, h3 hoo, h4 hey, h4 ho, h4 hoo, h5 hey, h5 ho, h5 hoo, h6 hey, h6 ho, h6 hoo, p hey, p ho, p hoo, blockquote hey, blockquote ho, blockquote hoo, pre hey, pre ho, pre hoo, a hey, a ho, a hoo, ab hey, ab ho, ab hoo, br hey, br ho, br hoo, address hey, address ho, address hoo, cite hey, cite ho, cite hoo, code hey, code ho, code hoo, del hey, del ho, del hoo, dfn hey, dfn ho, dfn hoo, em hey, em ho, em hoo, img hey, img ho, img hoo, ins hey, ins ho, ins hoo, kbd hey, kbd ho, kbd hoo, q hey, q ho, q hoo, samp hey, samp ho, samp hoo, small hey, small ho, small hoo, strong hey, strong ho, strong hoo, su hey, su ho, su hoo, b hey, b ho, b hoo, sup hey, sup ho, sup hoo, var hey, var ho, var hoo, b hey, b ho, b hoo, u hey, u ho, u hoo, i hey, i ho, i hoo, dl hey, dl ho, dl hoo, dt hey, dt ho, dt hoo, dd hey, dd ho, dd hoo, ol hey, ol ho, ol hoo, ul hey, ul ho, ul hoo, li hey, li ho, li hoo, fieldset hey, fieldset ho, fieldset hoo, form hey, form ho, form hoo, label hey, label ho, label hoo, legend hey, legend ho, legend hoo, tab hey, tab ho, tab hoo, le hey, le ho, le hoo, caption hey, caption ho, caption hoo, tbody hey, tbody ho, tbody hoo, tfoot hey, tfoot ho, tfoot hoo, thead hey, thead ho, thead hoo, tr hey, tr ho, tr hoo, th hey, th ho, th hoo, td hey, td ho, td hoo {\ \n blah: bloo;\ \n blee: bleh;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/media/000077500000000000000000000000001474765622100232545ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/scss/media/interpolated.rs000066400000000000000000000022751474765622100263220ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/media/interpolated.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("interpolated") } #[test] fn test() { assert_eq!( runner().ok( "// You can interpolate into a media type.\ \n@media bar#{12} {x {y: z}}\n\ \n// Media queries should be reparsed after interpolation is resolved.\ \n@media #{\"only screen\"} and\ \n #{\"(min-width: 700px)\"} and\ \n #{\"(max-width: \"+\"1920px)\"} {\ \n x {y: z}\ \n}\n\ \n// Queries don\'t have to fully parse before interpolation is resolved.\ \n@media scr#{\"een, pri\"}nt a#{\"nd (max-width: 300px)\"} {x {y: z}}\n\n\n\n" ), "@media bar12 {\ \n x {\ \n y: z;\ \n }\ \n}\ \n@media only screen and (min-width: 700px) and (max-width: 1920px) {\ \n x {\ \n y: z;\ \n }\ \n}\ \n@media screen, print and (max-width: 300px) {\ \n x {\ \n y: z;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/media/mod.rs000066400000000000000000000003351474765622100244020ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/media" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("media") } mod interpolated; mod nesting; mod script_features; rsass-0.29.0/rsass/tests/spec/non_conformant/scss/media/nesting/000077500000000000000000000000001474765622100247235ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/scss/media/nesting/merged.rs000066400000000000000000000162641474765622100265450ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/media/nesting/merged.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("merged") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok( "// Media queries can be nested within one another. The intersection of the two\ \n// queries will be generated.\ \n@media screen {\ \n a {b: c}\ \n @media (color) {x {y: z}}\n\ \n // The \"all and\" prefix shouldn\'t change the semantics.\ \n @media all and (color) {x {y: z}}\ \n}\n\ \n// Features always go to the end of a query, even if they\'re at an outer nesting\ \n// level.\ \n@media (color) {\ \n a {b: c}\ \n @media screen {x {y: z}}\ \n}\ \n@media all and (color) {\ \n a {b: c}\ \n @media screen {x {y: z}}\ \n}\n\ \n// Different features can be intersected.\ \n@media (max-width: 300px) {\ \n a {b: c}\ \n @media (min-width: 200px) {x {y: z}}\ \n @media all and (min-width: 200px) {q {r: s}}\ \n}\ \n@media all and (max-width: 300px) {\ \n a {b: c}\ \n @media (min-width: 200px) {x {y: z}}\ \n @media all and (min-width: 200px) {q {r: s}}\ \n}\n\ \n// Unlike `not`, the `only` keyword is preserved through intersection.\ \n@media only screen {\ \n a {b: c}\ \n @media (color) {x {y: z}}\ \n @media all and (color) {q {r: s}}\ \n}\n\ \n// The intersection of `not screen` and `print` is just `print`.\ \n@media not screen {\ \n a {b: c}\ \n @media print {x {y: z}}\ \n}\ \n@media print {\ \n a {b: c}\ \n @media not screen {x {y: z}}\ \n}\n\ \n// The intersection of `not screen` with `not screen and (color)` is the\ \n// narrower `not screen and (color)`.\ \n@media not screen {\ \n a {b: c}\ \n @media not screen and (color) {x {y: z}}\ \n}\ \n@media not screen and (color) {\ \n a {b: c}\ \n @media not screen {x {y: z}}\ \n}\n\ \n// The same is true if `print` has additional features.\ \n@media not screen {\ \n a {b: c}\ \n @media print and (color) {x {y: z}}\ \n}\ \n@media print and (color) {\ \n a {b: c}\ \n @media not screen {x {y: z}}\ \n}\n\ \n// It\'s also true if `screen` has additional features.\ \n@media not screen and (color) {\ \n a {b: c}\ \n @media print {x {y: z}}\ \n}\ \n@media print {\ \n a {b: c}\ \n @media not screen and (color) {x {y: z}}\ \n}\n\ \n// If a rule has multiple queries and they\'re all mergeable, merge them all as a\ \n// cross-product.\ \n@media screen, print {\ \n a {b: c}\ \n @media (color), (grid) {\ \n x {y: z};\ \n }\ \n}\n" ), "@media screen {\ \n a {\ \n b: c;\ \n }\ \n}\ \n@media screen and (color) {\ \n x {\ \n y: z;\ \n }\ \n}\ \n@media screen and (color) {\ \n x {\ \n y: z;\ \n }\ \n}\ \n@media (color) {\ \n a {\ \n b: c;\ \n }\ \n}\ \n@media screen and (color) {\ \n x {\ \n y: z;\ \n }\ \n}\ \n@media all and (color) {\ \n a {\ \n b: c;\ \n }\ \n}\ \n@media screen and (color) {\ \n x {\ \n y: z;\ \n }\ \n}\ \n@media (max-width: 300px) {\ \n a {\ \n b: c;\ \n }\ \n}\ \n@media (max-width: 300px) and (min-width: 200px) {\ \n x {\ \n y: z;\ \n }\ \n}\ \n@media (max-width: 300px) and (min-width: 200px) {\ \n q {\ \n r: s;\ \n }\ \n}\ \n@media all and (max-width: 300px) {\ \n a {\ \n b: c;\ \n }\ \n}\ \n@media (max-width: 300px) and (min-width: 200px) {\ \n x {\ \n y: z;\ \n }\ \n}\ \n@media all and (max-width: 300px) and (min-width: 200px) {\ \n q {\ \n r: s;\ \n }\ \n}\ \n@media only screen {\ \n a {\ \n b: c;\ \n }\ \n}\ \n@media only screen and (color) {\ \n x {\ \n y: z;\ \n }\ \n}\ \n@media only screen and (color) {\ \n q {\ \n r: s;\ \n }\ \n}\ \n@media not screen {\ \n a {\ \n b: c;\ \n }\ \n}\ \n@media print {\ \n x {\ \n y: z;\ \n }\ \n}\ \n@media print {\ \n a {\ \n b: c;\ \n }\ \n}\ \n@media print {\ \n x {\ \n y: z;\ \n }\ \n}\ \n@media not screen {\ \n a {\ \n b: c;\ \n }\ \n}\ \n@media not screen and (color) {\ \n x {\ \n y: z;\ \n }\ \n}\ \n@media not screen and (color) {\ \n a {\ \n b: c;\ \n }\ \n}\ \n@media not screen and (color) {\ \n x {\ \n y: z;\ \n }\ \n}\ \n@media not screen {\ \n a {\ \n b: c;\ \n }\ \n}\ \n@media print and (color) {\ \n x {\ \n y: z;\ \n }\ \n}\ \n@media print and (color) {\ \n a {\ \n b: c;\ \n }\ \n}\ \n@media print and (color) {\ \n x {\ \n y: z;\ \n }\ \n}\ \n@media not screen and (color) {\ \n a {\ \n b: c;\ \n }\ \n}\ \n@media print {\ \n x {\ \n y: z;\ \n }\ \n}\ \n@media print {\ \n a {\ \n b: c;\ \n }\ \n}\ \n@media print {\ \n x {\ \n y: z;\ \n }\ \n}\ \n@media screen, print {\ \n a {\ \n b: c;\ \n }\ \n}\ \n@media screen and (color), screen and (grid), print and (color), print and (grid) {\ \n x {\ \n y: z;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/media/nesting/merged_and_retained.rs000066400000000000000000000022051474765622100312300ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/media/nesting/merged_and_retained.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("merged_and_retained") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok("@media (retained: before) {\ \n a {b: c}\ \n @media (a: b) {\ \n x {y: z}\ \n }\ \n}\n\ \n// Regression test for sass/dart-sass#453\ \n@media (retained: after) {\ \n @media (a: b) {\ \n x {y: z}\ \n }\ \n a {b: c}\ \n}\n"), "@media (retained: before) {\ \n a {\ \n b: c;\ \n }\ \n}\ \n@media (retained: before) and (a: b) {\ \n x {\ \n y: z;\ \n }\ \n}\ \n@media (retained: after) and (a: b) {\ \n x {\ \n y: z;\ \n }\ \n}\ \n@media (retained: after) {\ \n a {\ \n b: c;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/media/nesting/mod.rs000066400000000000000000000003641474765622100260530ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/media/nesting" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("nesting") } mod merged; mod merged_and_retained; mod removed; mod retained; rsass-0.29.0/rsass/tests/spec/non_conformant/scss/media/nesting/removed.rs000066400000000000000000000066741474765622100267470ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/media/nesting/removed.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("removed") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok( "// The intersection of two different media types is empty, so they\'re eliminated.\ \n@media screen {\ \n a {b: c}\ \n @media print {x {y: z}}\ \n}\n\ \n// The intersection of `not screen` and `screen` is empty.\ \n@media not screen {\ \n a {b: c}\ \n @media screen {x {y: z}}\ \n}\ \n@media screen {\ \n a {b: c}\ \n @media not screen {x {y: z}}\ \n}\n\ \n// That\'s true even if `screen` has features.\ \n@media screen and (color) {\ \n a {b: c}\ \n @media not screen {x {y: z}}\ \n}\ \n@media not screen {\ \n a {b: c}\ \n @media screen and (color) {x {y: z}}\ \n}\n\ \n// In fact, the intersection of `not X` and `X` is empty for all `X`.\ \n@media not screen and (color) {\ \n a {b: c}\ \n @media screen and (color) {x {y: z}}\ \n}\ \n@media screen and (color) {\ \n a {b: c}\ \n @media not screen and (color) {x {y: z}}\ \n}\n\ \n// This intersection is empty even though the queries aren\'t identical, because\ \n// `not screen` matches a superset of the contexts `screen and (color)` matches.\ \n@media screen and (color) {\ \n a {b: c}\ \n @media not screen {x {y: z}}\ \n}\ \n@media not screen {\ \n a {b: c}\ \n @media screen and (color) {x {y: z}}\ \n}\n\ \n// If a rule has multiple queries and some have empty intersections, remove them\ \n// and merge the rest.\ \n@media screen, print {\ \n a {b: c}\ \n @media speech, (grid) {\ \n x {y: z};\ \n }\ \n}\n" ), "@media screen {\ \n a {\ \n b: c;\ \n }\ \n}\ \n@media not screen {\ \n a {\ \n b: c;\ \n }\ \n}\ \n@media screen {\ \n a {\ \n b: c;\ \n }\ \n}\ \n@media screen and (color) {\ \n a {\ \n b: c;\ \n }\ \n}\ \n@media not screen {\ \n a {\ \n b: c;\ \n }\ \n}\ \n@media not screen and (color) {\ \n a {\ \n b: c;\ \n }\ \n}\ \n@media screen and (color) {\ \n a {\ \n b: c;\ \n }\ \n}\ \n@media screen and (color) {\ \n a {\ \n b: c;\ \n }\ \n}\ \n@media not screen {\ \n a {\ \n b: c;\ \n }\ \n}\ \n@media screen, print {\ \n a {\ \n b: c;\ \n }\ \n}\ \n@media screen and (grid), print and (grid) {\ \n x {\ \n y: z;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/media/nesting/retained.rs000066400000000000000000000145061474765622100270720ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/media/nesting/retained.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("retained") } #[test] fn test() { assert_eq!( runner().ok( "// There\'s no way to generate the intersection of these queries. We could write\ \n// `not screen and (color)`, but that actually means \"neither `screen` nor\ \n// `(color)`\" rather than \"not `screen` but yes `(color)`. However, because they\ \n// do *have* a meaningful intersection, we output them nested for browsers that\ \n// support nesting natively.\ \n//\ \n// The latest spec allows us to generate `not screen and not (color)` here,\ \n// which would work, but no browsers support it yet.\ \n@media not screen {\ \n a {b: c}\ \n @media (color) {x {y: z}}\n\ \n // The \"all and\" prefix shouldn\'t change the semantics.\ \n @media all and (color) {q {r: s}}\ \n}\ \n@media (color) {\ \n a {b: c}\ \n @media not screen {x {y: z}}\ \n}\ \n@media all and (color) {\ \n a {b: c}\ \n @media not screen {x {y: z}}\ \n}\n\ \n// The unification of these would be `screen and not (color)`, which isn\'t yet\ \n// supported.\ \n@media screen {\ \n a {b: c}\ \n @media not all and (color) {x {y: z}}\ \n}\ \n@media not all and (color) {\ \n a {b: c}\ \n @media screen {x {y: z}}\ \n}\n\ \n// `not screen and (color)` means `not (screen and (color))`, so it could still\ \n// overlap with just `screen` in the case of a screen media without color.\ \n@media not screen and (color) {\ \n a {b: c}\ \n @media screen {x {y: z}}\ \n}\ \n@media screen {\ \n a {b: c}\ \n @media not screen and (color) {x {y: z}}\ \n}\n\ \n// `not screen and (color)` and `screen and (grid)` are both true for screen\ \n// user agents with a grid output device and no color support.\ \n@media not screen and (color) {\ \n a {b: c}\ \n @media screen and (grid) {x {y: z}}\ \n}\ \n@media screen and (grid) {\ \n a {b: c}\ \n @media not screen and (color) {x {y: z}}\ \n}\n\ \n// `not screen` and `not print` allows any media type other than those.\ \n@media not screen {\ \n a {b: c}\ \n @media not print {x {y: z}}\ \n}\n\ \n// `not screen and (color)` and `not screen and (grid)` allows screen media, but\ \n// only if it has *neither* color nor grid support.\ \n@media not screen and (color) {\ \n a {b: c}\ \n @media not screen and (grid) {x {y: z}}\ \n}\n\ \n// If a rule has multiple queries and any of them can\'t be merged, none of them\ \n// should be. This avoids duplicating the output and ensures that all code is\ \n// evaluated in a unique media query context in case we ever provide access to\ \n// that.\ \n@media screen, not screen {\ \n a {b: c}\ \n @media (color) {x {y: z}}\ \n}\n" ), "@media not screen {\ \n a {\ \n b: c;\ \n }\ \n @media (color) {\ \n x {\ \n y: z;\ \n }\ \n }\ \n @media all and (color) {\ \n q {\ \n r: s;\ \n }\ \n }\ \n}\ \n@media (color) {\ \n a {\ \n b: c;\ \n }\ \n @media not screen {\ \n x {\ \n y: z;\ \n }\ \n }\ \n}\ \n@media all and (color) {\ \n a {\ \n b: c;\ \n }\ \n @media not screen {\ \n x {\ \n y: z;\ \n }\ \n }\ \n}\ \n@media screen {\ \n a {\ \n b: c;\ \n }\ \n @media not all and (color) {\ \n x {\ \n y: z;\ \n }\ \n }\ \n}\ \n@media not all and (color) {\ \n a {\ \n b: c;\ \n }\ \n @media screen {\ \n x {\ \n y: z;\ \n }\ \n }\ \n}\ \n@media not screen and (color) {\ \n a {\ \n b: c;\ \n }\ \n @media screen {\ \n x {\ \n y: z;\ \n }\ \n }\ \n}\ \n@media screen {\ \n a {\ \n b: c;\ \n }\ \n @media not screen and (color) {\ \n x {\ \n y: z;\ \n }\ \n }\ \n}\ \n@media not screen and (color) {\ \n a {\ \n b: c;\ \n }\ \n @media screen and (grid) {\ \n x {\ \n y: z;\ \n }\ \n }\ \n}\ \n@media screen and (grid) {\ \n a {\ \n b: c;\ \n }\ \n @media not screen and (color) {\ \n x {\ \n y: z;\ \n }\ \n }\ \n}\ \n@media not screen {\ \n a {\ \n b: c;\ \n }\ \n @media not print {\ \n x {\ \n y: z;\ \n }\ \n }\ \n}\ \n@media not screen and (color) {\ \n a {\ \n b: c;\ \n }\ \n @media not screen and (grid) {\ \n x {\ \n y: z;\ \n }\ \n }\ \n}\ \n@media screen, not screen {\ \n a {\ \n b: c;\ \n }\ \n @media (color) {\ \n x {\ \n y: z;\ \n }\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/media/script_features.rs000066400000000000000000000017741474765622100270350ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/media/script_features.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("script_features") } #[test] fn test() { assert_eq!( runner().ok( "@use \"sass:list\";\ \n$foo: 3;\ \n$bar: 4;\ \n// Media features are special-cased to allow raw script without interpolation.\ \n@media only screen and (max-width: $foo) and (min-width: $bar) {x {y: z}}\n\ \n// Not just variables, but full script\ \n$vals: 1 2 3;\ \n@media screen and (max-width: 1 + 2) and (min-width: 5 + 6 + list.nth($vals, 2)) {x {y: z}}\n\n" ), "@media only screen and (max-width: 3) and (min-width: 4) {\ \n x {\ \n y: z;\ \n }\ \n}\ \n@media screen and (max-width: 3) and (min-width: 13) {\ \n x {\ \n y: z;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/mixin_content.rs000066400000000000000000000063501474765622100254250ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/mixin-content.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("mixin-content") } #[test] fn test() { assert_eq!( runner().ok("@mixin foo() {\ \n name: foo;\ \n @content;\ \n @include bar() {\ \n stuff: content for bar;\ \n @content;\ \n }\ \n}\n\ \n@mixin bar() {\ \n name: bar;\ \n @content;\ \n}\n\ \ndiv {\ \n /* with a content block */\ \n @include foo() {\ \n stuff: content for foo;\ \n }\ \n /* without */\ \n @include foo();\ \n}\n\ \n@mixin foo() {\ \n $size: 80%;\ \n div {\ \n color: red;\ \n @content;\ \n background: blue;\ \n width: $size;\ \n @include bar() {\ \n color: orange;\ \n @content;\ \n }\ \n }\ \n}\n\ \n@mixin bar() {\ \n form {\ \n @content;\ \n }\ \n}\n\ \nspan {\ \n $size: 1.2em;\ \n color: green;\ \n @include foo() {\ \n @media fudge {\ \n p {\ \n font-weight: bold;\ \n font-size: $size;\ \n a {\ \n text-decoration: underline;\ \n }\ \n }\ \n }\ \n }\ \n}\n\ \n@mixin apply-to-ie6-only {\ \n * html {\ \n @content;\ \n }\ \n}\ \n@include apply-to-ie6-only {\ \n #logo {\ \n background-image: url(/logo.gif);\ \n }\ \n}\n"), "div {\ \n /* with a content block */\ \n name: foo;\ \n stuff: content for foo;\ \n name: bar;\ \n stuff: content for bar;\ \n stuff: content for foo;\ \n /* without */\ \n name: foo;\ \n name: bar;\ \n stuff: content for bar;\ \n}\ \nspan {\ \n color: green;\ \n}\ \nspan div {\ \n color: red;\ \n background: blue;\ \n width: 80%;\ \n}\ \n@media fudge {\ \n span div p {\ \n font-weight: bold;\ \n font-size: 1.2em;\ \n }\ \n span div p a {\ \n text-decoration: underline;\ \n }\ \n}\ \nspan div form {\ \n color: orange;\ \n}\ \n@media fudge {\ \n span div form p {\ \n font-weight: bold;\ \n font-size: 1.2em;\ \n }\ \n span div form p a {\ \n text-decoration: underline;\ \n }\ \n}\ \n* html #logo {\ \n background-image: url(/logo.gif);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/mixin_content_selectors.rs000066400000000000000000000014711474765622100275070ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/mixin-content-selectors.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("mixin-content-selectors") } #[test] fn test() { assert_eq!( runner().ok("@mixin foo($x: 1) {\ \n foo-sel {\ \n @content;\ \n }\ \n}\n\ \ndiv {\ \n $x: hey;\ \n @include foo() {\ \n bar {\ \n color: red;\ \n hux {\ \n msg: $x;\ \n }\ \n }\ \n }\ \n}"), "div foo-sel bar {\ \n color: red;\ \n}\ \ndiv foo-sel bar hux {\ \n msg: hey;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/mixin_content_with_no_block.rs000066400000000000000000000012001474765622100303130ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/mixin-content-with-no-block.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("mixin-content-with-no-block") } #[test] fn test() { assert_eq!( runner().ok("@mixin foo {\ \n .foo {\ \n color: red;\ \n @content;\ \n }\ \n}\n\ \ndiv.a {\ \n @include foo() {\ \n hey: now;\ \n }\ \n}"), "div.a .foo {\ \n color: red;\ \n hey: now;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/mixin_with_keyword_args.rs000066400000000000000000000012741474765622100275060ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/mixin_with_keyword_args.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("mixin_with_keyword_args") } #[test] fn test() { assert_eq!( runner().ok( "@mixin a-mixin($required, $arg1: default-val1, $arg2: default-val2) {\ \n required: $required;\ \n arg1: $arg1;\ \n arg2: $arg2;\ \n}\ \n.mixed { @include a-mixin(foo, $arg2: non-default-val2); }\n" ), ".mixed {\ \n required: foo;\ \n arg1: default-val1;\ \n arg2: non-default-val2;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/mixins_with_args.rs000066400000000000000000000007201474765622100261200ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/mixins_with_args.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("mixins_with_args") } #[test] fn test() { assert_eq!( runner().ok("@mixin foo($a, $b) {\ \n a: $a;\ \n b: $b; }\n\ \n.foo {@include foo(bar, 12px)}\n"), ".foo {\ \n a: bar;\ \n b: 12px;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/mixins_with_empty_args.rs000066400000000000000000000006041474765622100273370ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/mixins_with_empty_args.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("mixins_with_empty_args") } #[test] fn test() { assert_eq!( runner().ok("@mixin foo {a: b}\n\ \n.foo {@include foo();}\n"), ".foo {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/mod.rs000066400000000000000000000064101474765622100233230ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("scss") } mod almost_ambiguous_nested_rules_and_declarations; mod alpha; mod arglist; mod backrefs_in_selector_groups; mod backslash; mod basic_function; mod basic_mixins; mod basic_prop_name_interpolation; mod basic_selector_interpolation; mod blimp; mod block_comment_in_script; mod cfunc; mod classes_and_ids; mod color_output; mod comment_after_if_directive; mod composed_args; mod concat; mod cons_up; mod css_basic_scss; mod css_block_directive_with_semicolon; mod css_cdo_and_cdc_ignored_at_toplevel; mod css_crazy_comments; mod css_empty_declarations; mod css_empty_rule; mod css_import_directive; mod css_invisible_comments; mod css_property_comments; mod css_rule_comments; mod css_selector_comments; mod css_selector_hacks; mod css_spaceless_combo_selectors; mod css_unary_ops; mod default_args; mod default_parameters; mod default_vars_in_default_params; mod directives_in_propsets; mod each; mod each_directive; mod each_in_functions; mod for_in_functions; mod function_names; mod function_args; mod functions_and_mixins; mod functions; mod guard_assign; mod hey1; mod hey2; // Ignoring "huge.hrx", not expected to work yet. mod hyphen_interpolated; mod ie_backslash; mod ie_functions; mod if_in_mixin; mod if_in_propset; mod test_if; mod if_directive; mod imp; mod important_in_arglist; mod important; mod interpolated_selectors; mod interpolated_strings; mod interpolation_operators_precedence; mod interpolation; mod interpolation_with_bracket_on_next_line; mod keyword_args_in_functions; mod lang; mod line_comment_in_script; mod long_selector; mod media; mod mixin_content_selectors; mod mixin_content_with_no_block; mod mixin_content; mod mixin_with_keyword_args; mod mixins_with_args; mod mixins_with_empty_args; // Ignoring "multiline-var.hrx", not expected to work yet. mod multiline_var; mod multiple_operators; mod namespace_properties; mod namespace_properties_with_value; mod negation; mod nested_extend; mod nested_namespace_properties; mod nested_rules; mod nested_rules_with_declarations; mod nested_rules_with_fancy_selectors; mod no_namespace_properties_without_space; mod null; mod numbers; mod one_line_comments; mod parent_selectors; mod passing_all_as_keyword_args_in_opposite_order; mod passing_required_args_as_a_keyword_arg; mod percentages; mod placeholder_with_media; mod placeholder; mod precision; mod prop_name_interpolation_after_hyphen; mod prop_name_only_interpolation; mod property_interpolation_at_dashes; mod quotes_in_interpolated_strings; mod retina_image; mod sass_script; mod selector_interpolation_at_attr_beginning; mod selector_interpolation_at_class_begininng; mod selector_interpolation_at_id_begininng; mod selector_interpolation_at_pseudo_begininng; mod selector_interpolation_in_pseudoclass; mod several_namespace_properties; mod simple_inheritance; mod simple_lists; mod star_plus_and_parent; mod strings; mod url_import; mod variables; mod vars; mod weird_selectors; mod weird_added_space; mod test_while; mod while_directive; mod while_in_functions; mod while_without_condition; mod zero_compression; rsass-0.29.0/rsass/tests/spec/non_conformant/scss/multiline_var.rs000066400000000000000000000011471474765622100254200ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/multiline_var.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("multiline_var") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n $var1: 1 +\ \n 2;\ \n $var2: true and\ \n false;\ \n $var3: a b\ \n c;\ \n a: $var1;\ \n b: $var2;\ \n c: $var3; }\n"), "foo {\ \n a: 3;\ \n b: false;\ \n c: a b c;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/multiple_operators.rs000066400000000000000000000007701474765622100265000ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/multiple-operators.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("multiple-operators") } #[test] fn test() { assert_eq!( runner().ok("$x: 2;\ \n$y: 1;\n\ \n@function getResult() { @return true; }\n\ \n.test {\ \n a: $x > $y == getResult();\ \n}\n"), ".test {\ \n a: true;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/namespace_properties.rs000066400000000000000000000007741474765622100267630ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/namespace_properties.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("namespace_properties") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n bar: baz;\ \n bang: {\ \n bip: 1px;\ \n bop: bar;}}\n"), "foo {\ \n bar: baz;\ \n bang-bip: 1px;\ \n bang-bop: bar;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/namespace_properties_with_value.rs000066400000000000000000000007721474765622100312100ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/namespace_properties_with_value.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("namespace_properties_with_value") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n bar: baz {\ \n bip: bop;\ \n bing: bop; }}\n"), "foo {\ \n bar: baz;\ \n bar-bip: bop;\ \n bar-bing: bop;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/negation.rs000066400000000000000000000011451474765622100243500ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/negation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("negation") } #[test] fn test() { assert_eq!( runner().ok(".asdf {\ \n $bwidth: 52px;\ \n left: -$bwidth/3;\ \n right: (1/3);\ \n center: (10000/3);\ \n blah: (20/8);\ \n}"), ".asdf {\ \n left: -17.3333333333px;\ \n right: 0.3333333333;\ \n center: 3333.3333333333;\ \n blah: 2.5;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/nested_extend.rs000066400000000000000000000024341474765622100253770ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/nested-extend.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("nested-extend") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".sprites-nav {\ \n color: red;\ \n}\n\ \n.sprites-nav_up {\ \n color: green;\ \n}\n\ \n.mw_nav_button {\ \n float: right;\ \n width: 30px;\ \n height: 30px;\ \n margin: 10px 10px 10px 0;\ \n overflow: hidden;\ \n &[data-ur-state=\"disabled\"] {\ \n @extend .sprites-nav;\ \n }\ \n &[data-ur-state=\"enabled\"] {\ \n @extend .sprites-nav_up;\ \n }\ \n}\n"), ".sprites-nav, .mw_nav_button[data-ur-state=disabled] {\ \n color: red;\ \n}\ \n.sprites-nav_up, .mw_nav_button[data-ur-state=enabled] {\ \n color: green;\ \n}\ \n.mw_nav_button {\ \n float: right;\ \n width: 30px;\ \n height: 30px;\ \n margin: 10px 10px 10px 0;\ \n overflow: hidden;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/nested_namespace_properties.rs000066400000000000000000000011211474765622100303100ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/nested_namespace_properties.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("nested_namespace_properties") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n bar: baz;\ \n bang: {\ \n bip: 1px;\ \n bop: bar;\ \n blat:{baf:bort}}}\n"), "foo {\ \n bar: baz;\ \n bang-bip: 1px;\ \n bang-bop: bar;\ \n bang-blat-baf: bort;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/nested_rules.rs000066400000000000000000000007071474765622100252430ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/nested_rules.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("nested_rules") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n bar {baz {a: b}}\ \n bang {bip {a: b}}}\n"), "foo bar baz {\ \n a: b;\ \n}\ \nfoo bang bip {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/nested_rules_with_declarations.rs000066400000000000000000000016441474765622100310270ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/nested_rules_with_declarations.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("nested_rules_with_declarations") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n ump: nump;\ \n grump: clump;\ \n bar {\ \n blat: bang;\ \n habit: rabbit;\ \n baz {a: b}\ \n bip {c: d}}\ \n bibble {\ \n bap {e: f}}}\n"), "foo {\ \n ump: nump;\ \n grump: clump;\ \n}\ \nfoo bar {\ \n blat: bang;\ \n habit: rabbit;\ \n}\ \nfoo bar baz {\ \n a: b;\ \n}\ \nfoo bar bip {\ \n c: d;\ \n}\ \nfoo bibble bap {\ \n e: f;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/nested_rules_with_fancy_selectors.rs000066400000000000000000000010761474765622100315410ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/nested_rules_with_fancy_selectors.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("nested_rules_with_fancy_selectors") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n .bar {a: b}\ \n :baz {c: d}\ \n bang:bop {e: f}}\n"), "foo .bar {\ \n a: b;\ \n}\ \nfoo :baz {\ \n c: d;\ \n}\ \nfoo bang:bop {\ \n e: f;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/no_namespace_properties_without_space.rs000066400000000000000000000006641474765622100324130ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/no_namespace_properties_without_space.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("no_namespace_properties_without_space") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n bar:baz {\ \n bip: bop }}\n"), "foo bar:baz {\ \n bip: bop;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/null.rs000066400000000000000000000026311474765622100235170ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/null.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("null") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:list\";\ \n@use \"sass:meta\";\ \n$x: 2;\n\ \ndiv {\ \n $x: null;\ \n a: list.length(null null null);\ \n b: #{null};\ \n d: meta.type-of($x);\ \n e: null == null;\ \n f: -null;\ \n g: -fudge;\ \n h: (null null null);\ \n i: froo(null, 4);\ \n j: (null), (null), 3, 4;\ \n k: list.length(((null), (null), 3, 4));\n\ \n a2: list.length($x $x $x);\ \n b2: #{$x};\ \n e2: $x == null;\ \n f2: -$x;\ \n h2: ($x $x $x);\ \n i2: froo($x, 4);\ \n j2: ($x), ($x), 3, 4;\ \n k2: list.length((($x), ($x), 3, 4));\ \n}"), "div {\ \n a: 3;\ \n d: null;\ \n e: true;\ \n f: -null;\ \n g: -fudge;\ \n i: froo(, 4);\ \n j: 3, 4;\ \n k: 4;\ \n a2: 3;\ \n e2: true;\ \n f2: -;\ \n i2: froo(, 4);\ \n j2: 3, 4;\ \n k2: 4;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/numbers.rs000066400000000000000000000010161474765622100242140ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/numbers.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("numbers") } #[test] fn test() { assert_eq!( runner().ok("div {\ \n width: 10px;\ \n height: 20%;\ \n blah: 12;\ \n color: #abc;\ \n}"), "div {\ \n width: 10px;\ \n height: 20%;\ \n blah: 12;\ \n color: #abc;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/one_line_comments.rs000066400000000000000000000006361474765622100262450ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/one_line_comments.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("one_line_comments") } #[test] fn test() { assert_eq!( runner().ok(".foo bar[val=\"//\"] {\ \n baz: bang; //}\ \n}\n"), ".foo bar[val=\"//\"] {\ \n baz: bang;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/parent_selectors.rs000066400000000000000000000007111474765622100261160ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/parent_selectors.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("parent_selectors") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n &:hover {a: b}\ \n bar &.baz {c: d}}\n"), "foo:hover {\ \n a: b;\ \n}\ \nbar foo.baz {\ \n c: d;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/passing_all_as_keyword_args_in_opposite_order.rs000066400000000000000000000014001474765622100341000ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/passing_all_as_keyword_args_in_opposite_order.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("passing_all_as_keyword_args_in_opposite_order") } #[test] fn test() { assert_eq!( runner().ok( "@mixin a-mixin($required, $arg1: default-val1, $arg2: default-val2) {\ \n required: $required;\ \n arg1: $arg1;\ \n arg2: $arg2; }\ \n.mixed { @include a-mixin($arg2: non-default-val2, $arg1: non-default-val1, $required: foo); }\n" ), ".mixed {\ \n required: foo;\ \n arg1: non-default-val1;\ \n arg2: non-default-val2;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/passing_required_args_as_a_keyword_arg.rs000066400000000000000000000012701474765622100325030ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/passing_required_args_as_a_keyword_arg.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("passing_required_args_as_a_keyword_arg") } #[test] fn test() { assert_eq!( runner().ok( "@mixin a-mixin($required, $arg1: default-val1, $arg2: default-val2) {\ \n required: $required;\ \n arg1: $arg1;\ \n arg2: $arg2; }\ \n.mixed { @include a-mixin($required: foo); }\n" ), ".mixed {\ \n required: foo;\ \n arg1: default-val1;\ \n arg2: default-val2;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/percentages.rs000066400000000000000000000016751474765622100250540ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/percentages.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("percentages") } #[test] fn test() { assert_eq!( runner().ok("div {\ \n width: 10% + 20%;\ \n height: 10% - 20%;\ \n width: 10% + 10;\ \n width: 10 + 10%;\ \n height: 10% - 10;\ \n height: 10 - 10%;\ \n blah: (20% / 4%);\ \n flah: 12 * 75%;\ \n grah: 75% * 12;\ \n // hwah: (24 / 8%);\ \n nyah: (35% / 7);\ \n}"), "div {\ \n width: 30%;\ \n height: -10%;\ \n width: 20%;\ \n width: 20%;\ \n height: 0%;\ \n height: 0%;\ \n blah: 5;\ \n flah: 900%;\ \n grah: 900%;\ \n nyah: 5%;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/placeholder.rs000066400000000000000000000013251474765622100250260ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/placeholder.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("placeholder") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%x {\ \n color: red;\ \n}\n\ \nfoo {\ \n width: 10px;\ \n @extend %x;\ \n}\n\ \nhux {\ \n height: 12px;\ \n @extend %x;\ \n}"), "hux, foo {\ \n color: red;\ \n}\ \nfoo {\ \n width: 10px;\ \n}\ \nhux {\ \n height: 12px;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/placeholder_with_media.rs000066400000000000000000000012061474765622100272160ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/placeholder-with-media.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("placeholder-with-media") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok("%a {\ \n @media only screen and (max-width: 100px) {\ \n color: red;\ \n }\ \n}\n\ \nb {\ \n @extend %a;\ \n}\n"), "@media only screen and (max-width: 100px) {\ \n b {\ \n color: red;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/precision.rs000066400000000000000000000011621474765622100245360ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/precision.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("precision") } #[test] fn test() { assert_eq!( runner().ok("div {\ \n a: (20/3);\ \n b: (5/2);\ \n c: (9/3);\ \n d: (20/-3);\ \n e: (-5/2);\ \n f: -(9/3);\ \n}"), "div {\ \n a: 6.6666666667;\ \n b: 2.5;\ \n c: 3;\ \n d: -6.6666666667;\ \n e: -2.5;\ \n f: -3;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/prop_name_interpolation_after_hyphen.rs000066400000000000000000000006031474765622100322250ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/prop_name_interpolation_after_hyphen.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("prop_name_interpolation_after_hyphen") } #[test] fn test() { assert_eq!( runner().ok("a { -#{\"foo\"}-bar: b; }\n"), "a {\ \n -foo-bar: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/prop_name_only_interpolation.rs000066400000000000000000000005771474765622100305440ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/prop_name_only_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("prop_name_only_interpolation") } #[test] fn test() { assert_eq!( runner().ok("foo {#{\"baz\" + \"bang\"}: blip}\n"), "foo {\ \n bazbang: blip;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/property_interpolation_at_dashes.rs000066400000000000000000000006731474765622100314170ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/property_interpolation_at_dashes.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("property_interpolation_at_dashes") } #[test] fn test() { assert_eq!( runner().ok("$a : a;\ \n$b : b;\ \ndiv { -foo-#{$a}-#{$b}-foo: foo }\n"), "div {\ \n -foo-a-b-foo: foo;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/quotes_in_interpolated_strings.rs000066400000000000000000000013761474765622100311030ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/quotes-in-interpolated-strings.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("quotes-in-interpolated-strings") } #[test] fn test() { assert_eq!( runner().ok("$bar: \"bar\";\ \n$foobar: \"foo#{$bar}\";\ \n#{$bar} {\ \n #{$bar}: #{$bar};\ \n #{$bar}: $bar;\ \n}\ \nfoobar {\ \n #{$foobar}: #{$foobar};\ \n #{$foobar}: $foobar;\ \n}"), "bar {\ \n bar: bar;\ \n bar: \"bar\";\ \n}\ \nfoobar {\ \n foobar: foobar;\ \n foobar: \"foobar\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/retina_image.rs000066400000000000000000000027531474765622100251760ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/retina-image.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("retina-image") } #[test] fn test() { assert_eq!( runner().ok( "@mixin retina-image($filename, $background-size, $extension: png, $retina-filename: null, $asset-pipeline: false) {\ \n @if $asset-pipeline {\ \n background-image: image_url($filename + \".\" + $extension);\ \n }\ \n @else {\ \n background-image: url($filename + \".\" + $extension);\ \n }\ \n @include hidpi {\ \n @if $asset-pipeline {\ \n @if $retina-filename {\ \n background-image: image_url($retina-filename + \".\" + $extension);\ \n }\ \n @else {\ \n background-image: image_url($filename + \"@2x\" + \".\" + $extension);\ \n }\ \n }\ \n @else {\ \n @if $retina-filename {\ \n background-image: url($retina-filename + \".\" + $extension);\ \n }\ \n @else {\ \n background-image: url($filename + \"@2x\" + \".\" + $extension);\ \n }\ \n }\ \n background-size: $background-size;\ \n }\ \n}" ), "" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/sass_script.rs000066400000000000000000000010441474765622100250770ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/sass_script.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("sass_script") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:math\";\ \nfoo {\ \n a: 1 + 2;\ \n b: 1 - 2;\ \n c: foo + bar;\ \n d: math.floor(12.3px); }\n"), "foo {\ \n a: 3;\ \n b: -1;\ \n c: foobar;\ \n d: 12px;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/selector_interpolation_at_attr_beginning.rs000066400000000000000000000006451474765622100330750ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/selector_interpolation_at_attr_beginning.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("selector_interpolation_at_attr_beginning") } #[test] fn test() { assert_eq!( runner().ok("$zzz: zzz;\ \n[#{$zzz}=foo] { a: b; }\n"), "[zzz=foo] {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/selector_interpolation_at_class_begininng.rs000066400000000000000000000006351474765622100332270ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/selector_interpolation_at_class_begininng.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("selector_interpolation_at_class_begininng") } #[test] fn test() { assert_eq!( runner().ok("$zzz: zzz;\ \n.#{$zzz} { a: b; }\n"), ".zzz {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/selector_interpolation_at_id_begininng.rs000066400000000000000000000006271474765622100325170ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/selector_interpolation_at_id_begininng.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("selector_interpolation_at_id_begininng") } #[test] fn test() { assert_eq!( runner().ok("$zzz: zzz;\ \n##{$zzz} { a: b; }\n"), "#zzz {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/selector_interpolation_at_pseudo_begininng.rs000066400000000000000000000006551474765622100334230ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/selector_interpolation_at_pseudo_begininng.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("selector_interpolation_at_pseudo_begininng") } #[test] fn test() { assert_eq!( runner().ok("$zzz: zzz;\ \n:#{$zzz}::#{$zzz} { a: b; }\n"), ":zzz::zzz {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/selector_interpolation_in_pseudoclass.rs000066400000000000000000000006271474765622100324320ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/selector_interpolation_in_pseudoclass.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("selector_interpolation_in_pseudoclass") } #[test] fn test() { assert_eq!( runner().ok("foo:nth-child(#{5 + \"n\"}) {a: b}\n"), "foo:nth-child(5n) {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/several_namespace_properties.rs000066400000000000000000000013151474765622100304740ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/several_namespace_properties.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("several_namespace_properties") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n bar: baz;\ \n bang: {\ \n bip: 1px;\ \n bop: bar;}\ \n buzz: {\ \n fram: \"foo\";\ \n frum: moo;\ \n }\ \n}\n"), "foo {\ \n bar: baz;\ \n bang-bip: 1px;\ \n bang-bop: bar;\ \n buzz-fram: \"foo\";\ \n buzz-frum: moo;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/simple_inheritance.rs000066400000000000000000000054021474765622100264060ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/simple-inheritance.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("simple-inheritance") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok( "earth {\ \n mammal, bird {\ \n blood: warm;\ \n }\ \n}\n\ \nearth {\ \n mammal {\ \n produces-milk: true;\ \n }\ \n}\n\ \n@mixin mammal-says($message) {\ \n @extend mammal;\ \n says: $message;\ \n}\n\ \ndog {\ \n @include mammal-says(\"Woof!\");\ \n}\n\ \ncat {\ \n @include mammal-says(\"Meow.\");\ \n}\n\ \nhorse, naysayer {\ \n @include mammal-says(\"Nay.\");\ \n}\n\ \n[hey] {\ \n a: b;\ \n}\n\ \nho {\ \n @extend [hey];\ \n c: d;\ \n}\n\ \nfancy outer space vehicle {\ \n insides: advanced;\ \n}\n\ \nnew american mars rover {\ \n wheels: big;\ \n @extend vehicle;\ \n}\n\ \nfoo {\ \n something: whatever;\ \n}\n\ \na b c {\ \n blah: blah;\ \n @extend foo;\ \n}\n\ \nd e f {\ \n blah: blah;\ \n}\n\ \ng {\ \n @extend f;\ \n bloo: bloo;\ \n}" ), "earth mammal, earth horse, earth naysayer, earth cat, earth dog, earth bird {\ \n blood: warm;\ \n}\ \nearth mammal, earth horse, earth naysayer, earth cat, earth dog {\ \n produces-milk: true;\ \n}\ \ndog {\ \n says: \"Woof!\";\ \n}\ \ncat {\ \n says: \"Meow.\";\ \n}\ \nhorse, naysayer {\ \n says: \"Nay.\";\ \n}\ \n[hey], ho {\ \n a: b;\ \n}\ \nho {\ \n c: d;\ \n}\ \nfancy outer space vehicle, fancy outer space new american mars rover, new american mars fancy outer space rover {\ \n insides: advanced;\ \n}\ \nnew american mars rover {\ \n wheels: big;\ \n}\ \nfoo, a b c {\ \n something: whatever;\ \n}\ \na b c {\ \n blah: blah;\ \n}\ \nd e f, d e g {\ \n blah: blah;\ \n}\ \ng {\ \n bloo: bloo;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/simple_lists.rs000066400000000000000000000010541474765622100252520ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/simple-lists.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("simple-lists") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:string\";\ \ndiv {\ \n hey: a, b, c, d;\ \n ho: a b c d;\ \n ha: string.unquote(\"a, b, c, d\");\ \n}"), "div {\ \n hey: a, b, c, d;\ \n ho: a b c d;\ \n ha: a, b, c, d;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/star_plus_and_parent.rs000066400000000000000000000005431474765622100267540ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/star_plus_and_parent.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("star_plus_and_parent") } #[test] fn test() { assert_eq!( runner().ok("foo {*+html & {a: b}}\n"), "* + html foo {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/strings.rs000066400000000000000000000013661474765622100242420ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/strings.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("strings") } #[test] fn test() { assert_eq!( runner().ok("div {\ \n content: blang + 1;\ \n content: 1 + blang;\ \n content: \"blang\" + 1;\ \n content: 1 + \"blang\";\ \n content: bar + \"foo\";\ \n content: \"quoted\" + unquoted;\ \n}"), "div {\ \n content: blang1;\ \n content: 1blang;\ \n content: \"blang1\";\ \n content: \"1blang\";\ \n content: barfoo;\ \n content: \"quotedunquoted\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/test_if.rs000066400000000000000000000020731474765622100242020ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/if.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("if") } #[test] fn test() { assert_eq!( runner().ok("@if false {\ \n div {\ \n color: red;\ \n }\ \n}\ \n@else if true {\ \n span {\ \n color: blue;\ \n }\ \n}\n\ \ndiv {\ \n @if true {\ \n color: green;\ \n }\ \n @if false {\ \n height: 10px;\ \n }\ \n @else if false {\ \n height: 20px;\ \n }\ \n @else if false {\ \n height: 30px;\ \n }\ \n @else {\ \n height: 40px;\ \n }\ \n}"), "span {\ \n color: blue;\ \n}\ \ndiv {\ \n color: green;\ \n height: 40px;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/test_while.rs000066400000000000000000000012341474765622100247120ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/while.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("while") } #[test] fn test() { assert_eq!( runner().ok("div {\ \n $x : true;\ \n @while $x {\ \n stuff: 1;\ \n more-stuff: 2;\ \n even-more-stuff: 3;\ \n lets-stop-now: 4;\ \n $x: false;\ \n }\ \n}"), "div {\ \n stuff: 1;\ \n more-stuff: 2;\ \n even-more-stuff: 3;\ \n lets-stop-now: 4;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/url_import.rs000066400000000000000000000004701474765622100247400ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/url_import.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("url_import") } #[test] fn test() { assert_eq!( runner().ok("@import url(fonts.sass);"), "@import url(fonts.sass);\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/variables.rs000066400000000000000000000007141474765622100245150ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/variables.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("variables") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n $var: 2;\ \n $another-var: 4;\ \n a: $var;\ \n b: $var + $another-var;}\n"), "foo {\ \n a: 2;\ \n b: 6;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/vars.rs000066400000000000000000000007541474765622100235240ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/vars.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("vars") } #[test] fn test() { assert_eq!( runner().ok("$x: hello;\ \n$y: 1/2 3/4 (2+3);\n\ \ndiv {\ \n content: 1 2 $x;\ \n content: $y;\ \n}"), "div {\ \n content: 1 2 hello;\ \n content: 1/2 3/4 5;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/weird_added_space.rs000066400000000000000000000006461474765622100261570ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/weird_added_space.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("weird_added_space") } #[test] fn test() { assert_eq!( runner().ok("$value : bip;\n\ \nfoo {\ \n bar: -moz-#{$value};\ \n}\n"), "foo {\ \n bar: -moz-bip;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/weird_selectors.rs000066400000000000000000000010231474765622100257340ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/weird-selectors.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("weird-selectors") } #[test] fn test() { assert_eq!( runner().ok("> > E {\ \n color: red;\ \n}\n\ \nE > > {\ \n color: red;\ \n}\n\ \n> > E > > {\ \n > > F > > {\ \n color: red;\ \n }\ \n}"), "" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/while_directive.rs000066400000000000000000000010331474765622100257060ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/while_directive.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("while_directive") } #[test] fn test() { assert_eq!( runner().ok("$i: 1;\n\ \n.foo {\ \n @while $i != 5 {\ \n a: $i;\ \n $i: $i + 1;\ \n }\ \n}\n"), ".foo {\ \n a: 1;\ \n a: 2;\ \n a: 3;\ \n a: 4;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/while_in_functions.rs000066400000000000000000000010471474765622100264330ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/while_in_functions.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("while_in_functions") } #[test] fn test() { assert_eq!( runner().ok("@function test-while() {\ \n $x : true;\ \n @while $x {\ \n @return $x\ \n }\ \n}\n\ \ndiv {\ \n y: test-while();\ \n}"), "div {\ \n y: true;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/while_without_condition.rs000066400000000000000000000010131474765622100274770ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/while_without_condition.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("while_without_condition") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "@while {\n\ \n}\n" ), "Error: Expected expression.\ \n ,\ \n1 | @while {\ \n | ^\ \n \'\ \n input.scss 1:8 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss/zero_compression.rs000066400000000000000000000014141474765622100261430ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss/zero-compression.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("zero-compression") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:map\";\n\ \n$orig: 0.12em;\ \n$value: (0.12em);\ \n$score: (item-height: 0.12em);\ \nfoo {\ \n tst-1: 0 -#{0.12em};\ \n tst-2: 0 -#{$orig};\ \n tst-3: 0 -#{$value};\ \n tst-4: 0 -#{map.get($score, item-height)};\ \n}"), "foo {\ \n tst-1: 0 -0.12em;\ \n tst-2: 0 -0.12em;\ \n tst-3: 0 -0.12em;\ \n tst-4: 0 -0.12em;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/000077500000000000000000000000001474765622100234175ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/mod.rs000066400000000000000000000121351474765622100245460ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("scss-tests") } mod t001_test_one_line_comments; mod t002_test_one_line_comments; mod t003_test_variables; mod t004_test_variables; mod t005_test_unicode_variables; mod t006_test_guard_assign; mod t007_test_guard_assign; mod t008_test_sass_script; mod t011_test_if_directive; mod t012_test_if_directive; mod t013_test_if_directive; mod t014_test_comment_after_if_directive; mod t015_test_comment_after_if_directive; mod t017_test_each_directive; mod t019_test_css_import_directive; mod t020_test_css_import_directive; mod t021_test_css_import_directive; mod t022_test_css_import_directive; mod t023_test_css_import_directive; mod t024_test_media_import; mod t025_test_dynamic_media_import; mod t027_test_protocol_relative_import; mod t028_test_import_with_interpolation; mod t029_test_url_import; mod t030_test_block_comment_in_script; mod t031_test_line_comment_in_script; mod t032_test_nested_rules; mod t033_test_nested_rules; mod t034_test_nested_rules; mod t035_test_nested_rules_with_declarations; mod t036_test_nested_rules_with_declarations; mod t037_test_nested_rules_with_declarations; mod t038_test_nested_rules_with_fancy_selectors; mod t039_test_almost_ambiguous_nested_rules_and_declarations; mod t041_test_newlines_in_selectors; mod t042_test_newlines_in_selectors; mod t044_test_trailing_comma_in_selector; mod t045_test_parent_selectors; mod t047_test_unknown_directive_bubbling; mod t048_test_namespace_properties; mod t049_test_several_namespace_properties; mod t050_test_nested_namespace_properties; mod t051_test_namespace_properties_with_value; mod t052_test_namespace_properties_with_script_value; mod t053_test_no_namespace_properties_without_space; mod t054_test_basic_mixins; mod t055_test_basic_mixins; mod t056_test_basic_mixins; mod t057_test_mixins_with_empty_args; mod t058_test_mixins_with_empty_args; mod t059_test_mixins_with_empty_args; mod t060_test_mixins_with_args; mod t061_test_mixins_with_args; mod t062_test_basic_function; mod t063_test_function_args; mod t064_test_mixin_var_args; mod t065_test_mixin_empty_var_args; mod t066_test_mixin_var_args_act_like_list; mod t067_test_mixin_splat_args; mod t068_test_mixin_splat_expression; mod t069_test_mixin_splat_args_with_var_args; mod t070_test_mixin_splat_args_with_var_args_and_normal_args; mod t071_test_mixin_splat_args_with_var_args_preserves_separator; mod t072_test_mixin_var_and_splat_args_pass_through_keywords; mod t078_test_mixin_list_of_pairs_splat_treated_as_list; mod t083_test_function_var_args; mod t084_test_function_empty_var_args; mod t085_test_function_var_args_act_like_list; mod t086_test_function_splat_args; mod t087_test_function_splat_expression; mod t088_test_function_splat_args_with_var_args; mod t089_test_function_splat_args_with_var_args_and_normal_args; mod t090_test_function_splat_args_with_var_args_preserves_separator; mod t091_test_function_var_and_splat_args_pass_through_keywords; mod t098_test_function_list_of_pairs_splat_treated_as_list; mod t103_test_function_var_args_passed_to_native; mod t104_test_basic_selector_interpolation; mod t105_test_basic_selector_interpolation; mod t106_test_basic_selector_interpolation; mod t107_test_selector_only_interpolation; mod t108_test_selector_interpolation_before_element_name; mod t109_test_selector_interpolation_in_string; mod t110_test_selector_interpolation_in_pseudoclass; mod t111_test_selector_interpolation_at_class_begininng; mod t112_test_selector_interpolation_at_id_begininng; mod t113_test_selector_interpolation_at_pseudo_begininng; mod t114_test_selector_interpolation_at_attr_beginning; mod t115_test_selector_interpolation_at_attr_end; mod t116_test_selector_interpolation_at_dashes; mod t119_test_basic_prop_name_interpolation; mod t120_test_basic_prop_name_interpolation; mod t121_test_prop_name_only_interpolation; mod t122_test_directive_interpolation; mod t130_test_random_directive_interpolation; mod t131_test_nested_mixin_def; mod t132_test_nested_mixin_shadow; mod t133_test_nested_function_def; mod t134_test_nested_function_shadow; mod t171_test_loud_comment_in_compressed_mode; mod t172_test_parsing_decimals_followed_by_comments_doesnt_take_forever; mod t173_test_parsing_many_numbers_doesnt_take_forever; mod t174_test_import_comments_in_imports; mod t176_test_newline_selector_rendered_multiple_times; mod t177_test_prop_name_interpolation_after_hyphen; mod t178_test_star_plus_and_parent; mod t179_test_weird_added_space; mod t180_test_interpolation_with_bracket_on_next_line; mod t181_test_interpolation; mod t182_test_mixin_with_keyword_args; mod t183_test_passing_required_args_as_a_keyword_arg; mod t184_test_passing_all_as_keyword_args_in_opposite_order; mod t185_test_keyword_args_in_functions; mod t186_test_newlines_removed_from_selectors_when_compressed; mod t187_test_multiline_var; mod t188_test_mixin_content; mod t189_test_empty_content; mod t190_test_options_passed_to_script; mod t191_test_extend_in_media_in_rule; rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t001_test_one_line_comments.rs000066400000000000000000000006431474765622100312700ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/001_test_one_line_comments.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("001_test_one_line_comments") } #[test] fn test() { assert_eq!( runner().ok(".foo {// bar: baz;}\ \n baz: bang; //}\ \n}\n"), ".foo {\ \n baz: bang;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t002_test_one_line_comments.rs000066400000000000000000000006661474765622100312760ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/002_test_one_line_comments.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("002_test_one_line_comments") } #[test] fn test() { assert_eq!( runner().ok(".foo bar[val=\"//\"] {\ \n baz: bang; //}\ \n}\n"), ".foo bar[val=\"//\"] {\ \n baz: bang;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t003_test_variables.rs000066400000000000000000000005651474765622100275500ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/003_test_variables.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("003_test_variables") } #[test] fn test() { assert_eq!( runner().ok("$var: foo;\n\ \nblat {a: $var}\n"), "blat {\ \n a: foo;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t004_test_variables.rs000066400000000000000000000007441474765622100275500ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/004_test_variables.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("004_test_variables") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n $var: 2;\ \n $another-var: 4;\ \n a: $var;\ \n b: $var + $another-var;}\n"), "foo {\ \n a: 2;\ \n b: 6;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t005_test_unicode_variables.rs000066400000000000000000000006071474765622100312550ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/005_test_unicode_variables.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("005_test_unicode_variables") } #[test] fn test() { assert_eq!( runner().ok("$vär: foo;\n\ \nblat {a: $vär}\n"), "blat {\ \n a: foo;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t006_test_guard_assign.rs000066400000000000000000000006271474765622100302500ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/006_test_guard_assign.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("006_test_guard_assign") } #[test] fn test() { assert_eq!( runner().ok("$var: 1;\ \n$var: 2 !default;\n\ \nfoo {a: $var}\n"), "foo {\ \n a: 1;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t007_test_guard_assign.rs000066400000000000000000000005761474765622100302540ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/007_test_guard_assign.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("007_test_guard_assign") } #[test] fn test() { assert_eq!( runner().ok("$var: 2 !default;\n\ \nfoo {a: $var}\n"), "foo {\ \n a: 2;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t008_test_sass_script.rs000066400000000000000000000010741474765622100301360ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/008_test_sass_script.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("008_test_sass_script") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:math\";\ \nfoo {\ \n a: 1 + 2;\ \n b: 1 - 2;\ \n c: foo + bar;\ \n d: math.floor(12.3px); }\n"), "foo {\ \n a: 3;\ \n b: -1;\ \n c: foobar;\ \n d: 12px;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t011_test_if_directive.rs000066400000000000000000000006441474765622100302310ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/011_test_if_directive.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("011_test_if_directive") } #[test] fn test() { assert_eq!( runner().ok("@if \"foo\" == \"foo\" {foo {a: b}}\ \n@if \"foo\" != \"foo\" {bar {a: b}}\n"), "foo {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t012_test_if_directive.rs000066400000000000000000000007241474765622100302310ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/012_test_if_directive.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("012_test_if_directive") } #[test] fn test() { assert_eq!( runner().ok("@if \"foo\" != \"foo\" {foo {a: b}}\ \n@else if \"foo\" == \"foo\" {bar {a: b}}\ \n@else if true {baz {a: b}}\n"), "bar {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t013_test_if_directive.rs000066400000000000000000000006231474765622100302300ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/013_test_if_directive.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("013_test_if_directive") } #[test] fn test() { assert_eq!( runner().ok("@if \"foo\" != \"foo\" {foo {a: b}}\ \n@else {bar {a: b}}\n"), "bar {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t014_test_comment_after_if_directive.rs000066400000000000000000000010151474765622100331300ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/014_test_comment_after_if_directive.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("014_test_comment_after_if_directive") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n @if true {a: b}\ \n /* This is a comment */\ \n c: d }\n"), "foo {\ \n a: b;\ \n /* This is a comment */\ \n c: d;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t015_test_comment_after_if_directive.rs000066400000000000000000000010541474765622100331340ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/015_test_comment_after_if_directive.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("015_test_comment_after_if_directive") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n @if true {a: b}\ \n @else {x: y}\ \n /* This is a comment */\ \n c: d }\n"), "foo {\ \n a: b;\ \n /* This is a comment */\ \n c: d;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t017_test_each_directive.rs000066400000000000000000000014251474765622100305370ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/017_test_each_directive.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("017_test_each_directive") } #[test] fn test() { assert_eq!( runner().ok("a {\ \n @each $number in 1px 2px 3px 4px {\ \n b: $number;\ \n }\ \n}\ \nc {\ \n @each $str in foo, bar, baz, bang {\ \n d: $str;\ \n }\ \n}\n"), "a {\ \n b: 1px;\ \n b: 2px;\ \n b: 3px;\ \n b: 4px;\ \n}\ \nc {\ \n d: foo;\ \n d: bar;\ \n d: baz;\ \n d: bang;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t019_test_css_import_directive.rs000066400000000000000000000005341474765622100320230ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/019_test_css_import_directive.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("019_test_css_import_directive") } #[test] fn test() { assert_eq!( runner().ok("@import \"foo.css\";"), "@import \"foo.css\";\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t020_test_css_import_directive.rs000066400000000000000000000005341474765622100320130ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/020_test_css_import_directive.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("020_test_css_import_directive") } #[test] fn test() { assert_eq!( runner().ok("@import \'foo.css\';"), "@import \'foo.css\';\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t021_test_css_import_directive.rs000066400000000000000000000005461474765622100320170ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/021_test_css_import_directive.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("021_test_css_import_directive") } #[test] fn test() { assert_eq!( runner().ok("@import url(\"foo.css\");"), "@import url(\"foo.css\");\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t022_test_css_import_directive.rs000066400000000000000000000005461474765622100320200ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/022_test_css_import_directive.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("022_test_css_import_directive") } #[test] fn test() { assert_eq!( runner().ok("@import url(\"foo.css\");"), "@import url(\"foo.css\");\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t023_test_css_import_directive.rs000066400000000000000000000005361474765622100320200ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/023_test_css_import_directive.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("023_test_css_import_directive") } #[test] fn test() { assert_eq!( runner().ok("@import url(foo.css);"), "@import url(foo.css);\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t024_test_media_import.rs000066400000000000000000000005361474765622100302520ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/024_test_media_import.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("024_test_media_import") } #[test] fn test() { assert_eq!( runner().ok("@import \"./fonts.sass\" all;"), "@import \"./fonts.sass\" all;\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t025_test_dynamic_media_import.rs000066400000000000000000000010741474765622100317550ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/025_test_dynamic_media_import.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("025_test_dynamic_media_import") } #[test] fn test() { assert_eq!( runner().ok( "$media: print;\ \n$key: -webkit-min-device-pixel-ratio;\ \n$value: 20;\ \n@import \"foo\" #{$media} and ($key + \"-foo\": $value + 5);\n" ), "@import \"foo\" print and (-webkit-min-device-pixel-ratio-foo: 25);\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t027_test_protocol_relative_import.rs000066400000000000000000000006731474765622100327340ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/027_test_protocol_relative_import.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("027_test_protocol_relative_import") } #[test] fn test() { assert_eq!( runner() .ok("@import \"//fonts.googleapis.com/css?family=Droid+Sans\";"), "@import \"//fonts.googleapis.com/css?family=Droid+Sans\";\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t028_test_import_with_interpolation.rs000066400000000000000000000010731474765622100331160ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/028_test_import_with_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("028_test_import_with_interpolation") } #[test] fn test() { assert_eq!( runner().ok( "@use \"sass:string\";\ \n$family: string.unquote(\"Droid+Sans\");\ \n@import url(\"http://fonts.googleapis.com/css?family=#{$family}\");\n" ), "@import url(\"http://fonts.googleapis.com/css?family=Droid+Sans\");\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t029_test_url_import.rs000066400000000000000000000005201474765622100277730ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/029_test_url_import.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("029_test_url_import") } #[test] fn test() { assert_eq!( runner().ok("@import url(fonts.sass);"), "@import url(fonts.sass);\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t030_test_block_comment_in_script.rs000066400000000000000000000006021474765622100324560ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/030_test_block_comment_in_script.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("030_test_block_comment_in_script") } #[test] fn test() { assert_eq!( runner().ok("foo {a: 1 + /* flang */ bar}\n"), "foo {\ \n a: 1bar;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t031_test_line_comment_in_script.rs000066400000000000000000000006261474765622100323220ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/031_test_line_comment_in_script.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("031_test_line_comment_in_script") } #[test] fn test() { assert_eq!( runner().ok("foo {a: 1 + // flang }\ \n blang }\n"), "foo {\ \n a: 1blang;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t032_test_nested_rules.rs000066400000000000000000000005411474765622100302700ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/032_test_nested_rules.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("032_test_nested_rules") } #[test] fn test() { assert_eq!( runner().ok("foo {bar {a: b}}\n"), "foo bar {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t033_test_nested_rules.rs000066400000000000000000000007111474765622100302700ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/033_test_nested_rules.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("033_test_nested_rules") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n bar {a: b}\ \n baz {b: c}}\n"), "foo bar {\ \n a: b;\ \n}\ \nfoo baz {\ \n b: c;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t034_test_nested_rules.rs000066400000000000000000000007371474765622100303010ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/034_test_nested_rules.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("034_test_nested_rules") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n bar {baz {a: b}}\ \n bang {bip {a: b}}}\n"), "foo bar baz {\ \n a: b;\ \n}\ \nfoo bang bip {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t035_test_nested_rules_with_declarations.rs000066400000000000000000000007441474765622100340630ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/035_test_nested_rules_with_declarations.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("035_test_nested_rules_with_declarations") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n a: b;\ \n bar {c: d}}\n"), "foo {\ \n a: b;\ \n}\ \nfoo bar {\ \n c: d;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t036_test_nested_rules_with_declarations.rs000066400000000000000000000007431474765622100340630ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/036_test_nested_rules_with_declarations.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("036_test_nested_rules_with_declarations") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n bar {c: d}\ \n a: b}\n"), "foo {\ \n a: b;\ \n}\ \nfoo bar {\ \n c: d;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t037_test_nested_rules_with_declarations.rs000066400000000000000000000016741474765622100340700ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/037_test_nested_rules_with_declarations.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("037_test_nested_rules_with_declarations") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n ump: nump;\ \n grump: clump;\ \n bar {\ \n blat: bang;\ \n habit: rabbit;\ \n baz {a: b}\ \n bip {c: d}}\ \n bibble {\ \n bap {e: f}}}\n"), "foo {\ \n ump: nump;\ \n grump: clump;\ \n}\ \nfoo bar {\ \n blat: bang;\ \n habit: rabbit;\ \n}\ \nfoo bar baz {\ \n a: b;\ \n}\ \nfoo bar bip {\ \n c: d;\ \n}\ \nfoo bibble bap {\ \n e: f;\ \n}\n" ); } t038_test_nested_rules_with_fancy_selectors.rs000066400000000000000000000011261474765622100345150ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/038_test_nested_rules_with_fancy_selectors.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("038_test_nested_rules_with_fancy_selectors") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n .bar {a: b}\ \n :baz {c: d}\ \n bang:bop {e: f}}\n"), "foo .bar {\ \n a: b;\ \n}\ \nfoo :baz {\ \n c: d;\ \n}\ \nfoo bang:bop {\ \n e: f;\ \n}\n" ); } t039_test_almost_ambiguous_nested_rules_and_declarations.rs000066400000000000000000000016521474765622100372300ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/039_test_almost_ambiguous_nested_rules_and_declarations.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("039_test_almost_ambiguous_nested_rules_and_declarations") } #[test] fn test() { assert_eq!( runner().ok( "foo {\ \n bar:baz:bang:bop:biddle:woo:look:at:all:these:pseudoclasses {a: b};\ \n bar:baz bang bop biddle woo look at all these elems {a: b};\ \n bar:baz bang bop biddle woo look at all these elems; }\n" ), "foo {\ \n bar: baz bang bop biddle woo look at all these elems;\ \n}\ \nfoo bar:baz:bang:bop:biddle:woo:look:at:all:these:pseudoclasses {\ \n a: b;\ \n}\ \nfoo bar:baz bang bop biddle woo look at all these elems {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t041_test_newlines_in_selectors.rs000066400000000000000000000010161474765622100321670ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/041_test_newlines_in_selectors.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("041_test_newlines_in_selectors") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok("foo,\ \nbar {\ \n baz,\ \n bang {a: b}}\n"), "foo baz,\ \nfoo bang,\ \nbar baz,\ \nbar bang {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t042_test_newlines_in_selectors.rs000066400000000000000000000010351474765622100321710ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/042_test_newlines_in_selectors.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("042_test_newlines_in_selectors") } #[test] fn test() { assert_eq!( runner().ok("foo\ \nbar {\ \n baz\ \n bang {a: b}\n\ \n bip bop {c: d}}\n"), "foo bar baz bang {\ \n a: b;\ \n}\ \nfoo bar bip bop {\ \n c: d;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t044_test_trailing_comma_in_selector.rs000066400000000000000000000010611474765622100331500ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/044_test_trailing_comma_in_selector.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("044_test_trailing_comma_in_selector") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok("#foo #bar,,\ \n,#baz #boom, {a: b}\n\ \n#bip #bop, ,, {c: d}\n"), "#foo #bar,\ \n#baz #boom {\ \n a: b;\ \n}\ \n#bip #bop {\ \n c: d;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t045_test_parent_selectors.rs000066400000000000000000000007411474765622100311560ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/045_test_parent_selectors.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("045_test_parent_selectors") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n &:hover {a: b}\ \n bar &.baz {c: d}}\n"), "foo:hover {\ \n a: b;\ \n}\ \nbar foo.baz {\ \n c: d;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t047_test_unknown_directive_bubbling.rs000066400000000000000000000010011474765622100331730ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/047_test_unknown_directive_bubbling.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("047_test_unknown_directive_bubbling") } #[test] fn test() { assert_eq!( runner().ok(".foo {\ \n @fblthp {\ \n .bar {a: b}\ \n }\ \n}\n"), "@fblthp {\ \n .foo .bar {\ \n a: b;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t048_test_namespace_properties.rs000066400000000000000000000010241474765622100320100ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/048_test_namespace_properties.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("048_test_namespace_properties") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n bar: baz;\ \n bang: {\ \n bip: 1px;\ \n bop: bar;}}\n"), "foo {\ \n bar: baz;\ \n bang-bip: 1px;\ \n bang-bop: bar;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t049_test_several_namespace_properties.rs000066400000000000000000000013451474765622100335400ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/049_test_several_namespace_properties.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("049_test_several_namespace_properties") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n bar: baz;\ \n bang: {\ \n bip: 1px;\ \n bop: bar;}\ \n buzz: {\ \n fram: \"foo\";\ \n frum: moo;\ \n }\ \n}\n"), "foo {\ \n bar: baz;\ \n bang-bip: 1px;\ \n bang-bop: bar;\ \n buzz-fram: \"foo\";\ \n buzz-frum: moo;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t050_test_nested_namespace_properties.rs000066400000000000000000000011511474765622100333440ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/050_test_nested_namespace_properties.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("050_test_nested_namespace_properties") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n bar: baz;\ \n bang: {\ \n bip: 1px;\ \n bop: bar;\ \n blat:{baf:bort}}}\n"), "foo {\ \n bar: baz;\ \n bang-bip: 1px;\ \n bang-bop: bar;\ \n bang-blat-baf: bort;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t051_test_namespace_properties_with_value.rs000066400000000000000000000010221474765622100342270ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/051_test_namespace_properties_with_value.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("051_test_namespace_properties_with_value") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n bar: baz {\ \n bip: bop;\ \n bing: bop; }}\n"), "foo {\ \n bar: baz;\ \n bar-bip: bop;\ \n bar-bing: bop;\ \n}\n" ); } t052_test_namespace_properties_with_script_value.rs000066400000000000000000000010641474765622100355430ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/052_test_namespace_properties_with_script_value.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("052_test_namespace_properties_with_script_value") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n bar: baz + bang {\ \n bip: bop;\ \n bing: bop; }}\n"), "foo {\ \n bar: bazbang;\ \n bar-bip: bop;\ \n bar-bing: bop;\ \n}\n" ); } t053_test_no_namespace_properties_without_space.rs000066400000000000000000000007141474765622100353640ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/053_test_no_namespace_properties_without_space.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("053_test_no_namespace_properties_without_space") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n bar:baz {\ \n bip: bop }}\n"), "foo bar:baz {\ \n bip: bop;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t054_test_basic_mixins.rs000066400000000000000000000006311474765622100302500ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/054_test_basic_mixins.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("054_test_basic_mixins") } #[test] fn test() { assert_eq!( runner().ok("@mixin foo {\ \n .foo {a: b}}\n\ \n@include foo;\n"), ".foo {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t055_test_basic_mixins.rs000066400000000000000000000010031474765622100302430ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/055_test_basic_mixins.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("055_test_basic_mixins") } #[test] fn test() { assert_eq!( runner().ok("@mixin foo {\ \n .foo {a: b}}\n\ \nbar {\ \n @include foo;\ \n c: d; }\n"), "bar {\ \n c: d;\ \n}\ \nbar .foo {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t056_test_basic_mixins.rs000066400000000000000000000007041474765622100302530ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/056_test_basic_mixins.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("056_test_basic_mixins") } #[test] fn test() { assert_eq!( runner().ok("@mixin foo {a: b}\n\ \nbar {\ \n @include foo;\ \n c: d; }\n"), "bar {\ \n a: b;\ \n c: d;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t057_test_mixins_with_empty_args.rs000066400000000000000000000006361474765622100324040ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/057_test_mixins_with_empty_args.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("057_test_mixins_with_empty_args") } #[test] fn test() { assert_eq!( runner().ok("@mixin foo() {a: b}\n\ \n.foo {@include foo();}\n"), ".foo {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t058_test_mixins_with_empty_args.rs000066400000000000000000000006341474765622100324030ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/058_test_mixins_with_empty_args.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("058_test_mixins_with_empty_args") } #[test] fn test() { assert_eq!( runner().ok("@mixin foo() {a: b}\n\ \n.foo {@include foo;}\n"), ".foo {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t059_test_mixins_with_empty_args.rs000066400000000000000000000006341474765622100324040ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/059_test_mixins_with_empty_args.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("059_test_mixins_with_empty_args") } #[test] fn test() { assert_eq!( runner().ok("@mixin foo {a: b}\n\ \n.foo {@include foo();}\n"), ".foo {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t060_test_mixins_with_args.rs000066400000000000000000000006311474765622100311530ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/060_test_mixins_with_args.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("060_test_mixins_with_args") } #[test] fn test() { assert_eq!( runner().ok("@mixin foo($a) {a: $a}\n\ \n.foo {@include foo(bar)}\n"), ".foo {\ \n a: bar;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t061_test_mixins_with_args.rs000066400000000000000000000007501474765622100311560ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/061_test_mixins_with_args.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("061_test_mixins_with_args") } #[test] fn test() { assert_eq!( runner().ok("@mixin foo($a, $b) {\ \n a: $a;\ \n b: $b; }\n\ \n.foo {@include foo(bar, 12px)}\n"), ".foo {\ \n a: bar;\ \n b: 12px;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t062_test_basic_function.rs000066400000000000000000000007331474765622100305700ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/062_test_basic_function.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("062_test_basic_function") } #[test] fn test() { assert_eq!( runner().ok("@function foo() {\ \n @return 1 + 2;\ \n}\n\ \nbar {\ \n a: foo();\ \n}\n"), "bar {\ \n a: 3;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t063_test_function_args.rs000066400000000000000000000007631474765622100304470ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/063_test_function_args.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("063_test_function_args") } #[test] fn test() { assert_eq!( runner().ok("@function plus($var1, $var2) {\ \n @return $var1 + $var2;\ \n}\n\ \nbar {\ \n a: plus(1, 2);\ \n}\n"), "bar {\ \n a: 3;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t064_test_mixin_var_args.rs000066400000000000000000000007711474765622100306160ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/064_test_mixin_var_args.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("064_test_mixin_var_args") } #[test] fn test() { assert_eq!( runner().ok("@mixin foo($a, $b...) {\ \n a: $a;\ \n b: $b;\ \n}\n\ \n.foo {@include foo(1, 2, 3, 4)}\n"), ".foo {\ \n a: 1;\ \n b: 2, 3, 4;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t065_test_mixin_empty_var_args.rs000066400000000000000000000010471474765622100320320ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/065_test_mixin_empty_var_args.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("065_test_mixin_empty_var_args") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:list\";\ \n@mixin foo($a, $b...) {\ \n a: $a;\ \n b: list.length($b);\ \n}\n\ \n.foo {@include foo(1)}\n"), ".foo {\ \n a: 1;\ \n b: 0;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t066_test_mixin_var_args_act_like_list.rs000066400000000000000000000011151474765622100334770ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/066_test_mixin_var_args_act_like_list.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("066_test_mixin_var_args_act_like_list") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:list\";\ \n@mixin foo($a, $b...) {\ \n a: list.length($b);\ \n b: list.nth($b, 2);\ \n}\n\ \n.foo {@include foo(1, 2, 3, 4)}\n"), ".foo {\ \n a: 3;\ \n b: 3;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t067_test_mixin_splat_args.rs000066400000000000000000000011671474765622100311540ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/067_test_mixin_splat_args.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("067_test_mixin_splat_args") } #[test] fn test() { assert_eq!( runner().ok("@mixin foo($a, $b, $c, $d) {\ \n a: $a;\ \n b: $b;\ \n c: $c;\ \n d: $d;\ \n}\n\ \n$list: 2, 3, 4;\ \n.foo {@include foo(1, $list...)}\n"), ".foo {\ \n a: 1;\ \n b: 2;\ \n c: 3;\ \n d: 4;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t068_test_mixin_splat_expression.rs000066400000000000000000000011471474765622100324160ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/068_test_mixin_splat_expression.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("068_test_mixin_splat_expression") } #[test] fn test() { assert_eq!( runner().ok("@mixin foo($a, $b, $c, $d) {\ \n a: $a;\ \n b: $b;\ \n c: $c;\ \n d: $d;\ \n}\n\ \n.foo {@include foo(1, (2, 3, 4)...)}\n"), ".foo {\ \n a: 1;\ \n b: 2;\ \n c: 3;\ \n d: 4;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t069_test_mixin_splat_args_with_var_args.rs000066400000000000000000000010721474765622100340700ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/069_test_mixin_splat_args_with_var_args.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("069_test_mixin_splat_args_with_var_args") } #[test] fn test() { assert_eq!( runner().ok("@mixin foo($a, $b...) {\ \n a: $a;\ \n b: $b;\ \n}\n\ \n$list: 2, 3, 4;\ \n.foo {@include foo(1, $list...)}\n"), ".foo {\ \n a: 1;\ \n b: 2, 3, 4;\ \n}\n" ); } t070_test_mixin_splat_args_with_var_args_and_normal_args.rs000066400000000000000000000012211474765622100372030ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/070_test_mixin_splat_args_with_var_args_and_normal_args.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("070_test_mixin_splat_args_with_var_args_and_normal_args") } #[test] fn test() { assert_eq!( runner().ok("@mixin foo($a, $b, $c...) {\ \n a: $a;\ \n b: $b;\ \n c: $c;\ \n}\n\ \n$list: 2, 3, 4;\ \n.foo {@include foo(1, $list...)}\n"), ".foo {\ \n a: 1;\ \n b: 2;\ \n c: 3, 4;\ \n}\n" ); } t071_test_mixin_splat_args_with_var_args_preserves_separator.rs000066400000000000000000000012141474765622100401560ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/071_test_mixin_splat_args_with_var_args_preserves_separator.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "071_test_mixin_splat_args_with_var_args_preserves_separator", ) } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok("@mixin foo($a, $b...) {\ \n a: $a;\ \n b: $b;\ \n}\n\ \n$list: 3 4 5;\ \n.foo {@include foo(1, 2, $list...)}\n"), ".foo {\ \n a: 1;\ \n b: 2 3 4 5;\ \n}\n" ); } t072_test_mixin_var_and_splat_args_pass_through_keywords.rs000066400000000000000000000013161474765622100372740ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/072_test_mixin_var_and_splat_args_pass_through_keywords.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("072_test_mixin_var_and_splat_args_pass_through_keywords") } #[test] fn test() { assert_eq!( runner().ok("@mixin foo($a...) {\ \n @include bar($a...);\ \n}\n\ \n@mixin bar($b, $c, $a) {\ \n a: $a;\ \n b: $b;\ \n c: $c;\ \n}\n\ \n.foo {@include foo(1, $c: 2, $a: 3)}\n"), ".foo {\ \n a: 3;\ \n b: 1;\ \n c: 2;\ \n}\n" ); } t078_test_mixin_list_of_pairs_splat_treated_as_list.rs000066400000000000000000000012231474765622100362170ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/078_test_mixin_list_of_pairs_splat_treated_as_list.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("078_test_mixin_list_of_pairs_splat_treated_as_list") } #[test] fn test() { assert_eq!( runner().ok("@mixin foo($a, $b, $c) {\ \n a: $a;\ \n b: $b;\ \n c: $c;\ \n}\n\ \n.foo {\ \n @include foo((a 1, b 2, c 3)...);\ \n}\n"), ".foo {\ \n a: a 1;\ \n b: b 2;\ \n c: c 3;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t083_test_function_var_args.rs000066400000000000000000000007711474765622100313200ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/083_test_function_var_args.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("083_test_function_var_args") } #[test] fn test() { assert_eq!( runner().ok("@function foo($a, $b...) {\ \n @return \"a: #{$a}, b: #{$b}\";\ \n}\n\ \n.foo {val: foo(1, 2, 3, 4)}\n"), ".foo {\ \n val: \"a: 1, b: 2, 3, 4\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t084_test_function_empty_var_args.rs000066400000000000000000000010471474765622100325340ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/084_test_function_empty_var_args.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("084_test_function_empty_var_args") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:list\";\ \n@function foo($a, $b...) {\ \n @return \"a: #{$a}, b: #{list.length($b)}\";\ \n}\n\ \n.foo {val: foo(1)}\n"), ".foo {\ \n val: \"a: 1, b: 0\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t085_test_function_var_args_act_like_list.rs000066400000000000000000000011151474765622100342010ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/085_test_function_var_args_act_like_list.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("085_test_function_var_args_act_like_list") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:list\";\ \n@function foo($a, $b...) {\ \n @return \"a: #{list.length($b)}, b: #{list.nth($b, 2)}\";\ \n}\n\ \n.foo {val: foo(1, 2, 3, 4)}\n"), ".foo {\ \n val: \"a: 3, b: 3\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t086_test_function_splat_args.rs000066400000000000000000000010751474765622100316540ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/086_test_function_splat_args.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("086_test_function_splat_args") } #[test] fn test() { assert_eq!( runner().ok("@function foo($a, $b, $c, $d) {\ \n @return \"a: #{$a}, b: #{$b}, c: #{$c}, d: #{$d}\";\ \n}\n\ \n$list: 2, 3, 4;\ \n.foo {val: foo(1, $list...)}\n"), ".foo {\ \n val: \"a: 1, b: 2, c: 3, d: 4\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t087_test_function_splat_expression.rs000066400000000000000000000010551474765622100331160ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/087_test_function_splat_expression.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("087_test_function_splat_expression") } #[test] fn test() { assert_eq!( runner().ok("@function foo($a, $b, $c, $d) {\ \n @return \"a: #{$a}, b: #{$b}, c: #{$c}, d: #{$d}\";\ \n}\n\ \n.foo {val: foo(1, (2, 3, 4)...)}\n"), ".foo {\ \n val: \"a: 1, b: 2, c: 3, d: 4\";\ \n}\n" ); } t088_test_function_splat_args_with_var_args.rs000066400000000000000000000010721474765622100345130ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/088_test_function_splat_args_with_var_args.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("088_test_function_splat_args_with_var_args") } #[test] fn test() { assert_eq!( runner().ok("@function foo($a, $b...) {\ \n @return \"a: #{$a}, b: #{$b}\";\ \n}\n\ \n$list: 2, 3, 4;\ \n.foo {val: foo(1, $list...)}\n"), ".foo {\ \n val: \"a: 1, b: 2, 3, 4\";\ \n}\n" ); } t089_test_function_splat_args_with_var_args_and_normal_args.rs000066400000000000000000000011721474765622100377230ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/089_test_function_splat_args_with_var_args_and_normal_args.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "089_test_function_splat_args_with_var_args_and_normal_args", ) } #[test] fn test() { assert_eq!( runner().ok("@function foo($a, $b, $c...) {\ \n @return \"a: #{$a}, b: #{$b}, c: #{$c}\";\ \n}\n\ \n$list: 2, 3, 4;\ \n.foo {val: foo(1, $list...)}\n"), ".foo {\ \n val: \"a: 1, b: 2, c: 3, 4\";\ \n}\n" ); } t090_test_function_splat_args_with_var_args_preserves_separator.rs000066400000000000000000000012141474765622100406600ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/090_test_function_splat_args_with_var_args_preserves_separator.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "090_test_function_splat_args_with_var_args_preserves_separator", ) } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok("@function foo($a, $b...) {\ \n @return \"a: #{$a}, b: #{$b}\";\ \n}\n\ \n$list: 3 4 5;\ \n.foo {val: foo(1, 2, $list...)}\n"), ".foo {\ \n val: \"a: 1, b: 2 3 4 5\";\ \n}\n" ); } t091_test_function_var_and_splat_args_pass_through_keywords.rs000066400000000000000000000012711474765622100377760ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/091_test_function_var_and_splat_args_pass_through_keywords.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "091_test_function_var_and_splat_args_pass_through_keywords", ) } #[test] fn test() { assert_eq!( runner().ok("@function foo($a...) {\ \n @return bar($a...);\ \n}\n\ \n@function bar($b, $c, $a) {\ \n @return \"a: #{$a}, b: #{$b}, c: #{$c}\";\ \n}\n\ \n.foo {val: foo(1, $c: 2, $a: 3)}\n"), ".foo {\ \n val: \"a: 3, b: 1, c: 2\";\ \n}\n" ); } t098_test_function_list_of_pairs_splat_treated_as_list.rs000066400000000000000000000011661474765622100367300ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/098_test_function_list_of_pairs_splat_treated_as_list.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("098_test_function_list_of_pairs_splat_treated_as_list") } #[test] fn test() { assert_eq!( runner().ok("@function foo($a, $b, $c) {\ \n @return \"a: #{$a}, b: #{$b}, c: #{$c}\";\ \n}\n\ \n.foo {\ \n val: foo((a 1, b 2, c 3)...);\ \n}\n"), ".foo {\ \n val: \"a: a 1, b: b 2, c: c 3\";\ \n}\n" ); } t103_test_function_var_args_passed_to_native.rs000066400000000000000000000010711474765622100346330ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/103_test_function_var_args_passed_to_native.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("103_test_function_var_args_passed_to_native") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:color\";\ \n@function foo($args...) {\ \n @return color.adjust($args...);\ \n}\n\ \n.foo {val: foo(#102030, $blue: 5)}\n"), ".foo {\ \n val: #102035;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t104_test_basic_selector_interpolation.rs000066400000000000000000000006101474765622100335210ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/104_test_basic_selector_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("104_test_basic_selector_interpolation") } #[test] fn test() { assert_eq!( runner().ok("foo#{1 + 2} baz {a: b}\n"), "foo3 baz {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t105_test_basic_selector_interpolation.rs000066400000000000000000000006161474765622100335300ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/105_test_basic_selector_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("105_test_basic_selector_interpolation") } #[test] fn test() { assert_eq!( runner().ok("foo#{\".bar\"} baz {a: b}\n"), "foo.bar baz {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t106_test_basic_selector_interpolation.rs000066400000000000000000000006161474765622100335310ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/106_test_basic_selector_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("106_test_basic_selector_interpolation") } #[test] fn test() { assert_eq!( runner().ok("#{\"foo\"}.bar baz {a: b}\n"), "foo.bar baz {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t107_test_selector_only_interpolation.rs000066400000000000000000000006131474765622100334270ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/107_test_selector_only_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("107_test_selector_only_interpolation") } #[test] fn test() { assert_eq!( runner().ok("#{\"foo\" + \" bar\"} {a: b}\n"), "foo bar {\ \n a: b;\ \n}\n" ); } t108_test_selector_interpolation_before_element_name.rs000066400000000000000000000006701474765622100363460ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/108_test_selector_interpolation_before_element_name.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("108_test_selector_interpolation_before_element_name") } #[test] fn test() { assert_eq!( runner().ok("#{\"foo\" + \" bar\"}baz {a: b}\n"), "foo barbaz {\ \n a: b;\ \n}\n" ); } t109_test_selector_interpolation_in_string.rs000066400000000000000000000006771474765622100343770ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/109_test_selector_interpolation_in_string.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("109_test_selector_interpolation_in_string") } #[test] fn test() { assert_eq!( runner().ok("foo[val=\"bar #{\"foo\" + \" bar\"} baz\"] {a: b}\n"), "foo[val=\"bar foo bar baz\"] {\ \n a: b;\ \n}\n" ); } t110_test_selector_interpolation_in_pseudoclass.rs000066400000000000000000000006571474765622100354040ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/110_test_selector_interpolation_in_pseudoclass.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("110_test_selector_interpolation_in_pseudoclass") } #[test] fn test() { assert_eq!( runner().ok("foo:nth-child(#{5 + \"n\"}) {a: b}\n"), "foo:nth-child(5n) {\ \n a: b;\ \n}\n" ); } t111_test_selector_interpolation_at_class_begininng.rs000066400000000000000000000006761474765622100362040ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/111_test_selector_interpolation_at_class_begininng.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("111_test_selector_interpolation_at_class_begininng") } #[test] fn test() { assert_eq!( runner().ok("$zzz: zzz;\ \n.#{$zzz} { a: b; }\n"), ".zzz {\ \n a: b;\ \n}\n" ); } t112_test_selector_interpolation_at_id_begininng.rs000066400000000000000000000006701474765622100354660ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/112_test_selector_interpolation_at_id_begininng.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("112_test_selector_interpolation_at_id_begininng") } #[test] fn test() { assert_eq!( runner().ok("$zzz: zzz;\ \n##{$zzz} { a: b; }\n"), "#zzz {\ \n a: b;\ \n}\n" ); } t113_test_selector_interpolation_at_pseudo_begininng.rs000066400000000000000000000007161474765622100363730ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/113_test_selector_interpolation_at_pseudo_begininng.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("113_test_selector_interpolation_at_pseudo_begininng") } #[test] fn test() { assert_eq!( runner().ok("$zzz: zzz;\ \n:#{$zzz}::#{$zzz} { a: b; }\n"), ":zzz::zzz {\ \n a: b;\ \n}\n" ); } t114_test_selector_interpolation_at_attr_beginning.rs000066400000000000000000000007061474765622100360460ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/114_test_selector_interpolation_at_attr_beginning.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("114_test_selector_interpolation_at_attr_beginning") } #[test] fn test() { assert_eq!( runner().ok("$zzz: zzz;\ \n[#{$zzz}=foo] { a: b; }\n"), "[zzz=foo] {\ \n a: b;\ \n}\n" ); } t115_test_selector_interpolation_at_attr_end.rs000066400000000000000000000006611474765622100346550ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/115_test_selector_interpolation_at_attr_end.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("115_test_selector_interpolation_at_attr_end") } #[test] fn test() { assert_eq!( runner().ok("$zzz: zzz;\ \n[foo=#{$zzz}] { a: b; }\n"), "[foo=zzz] {\ \n a: b;\ \n}\n" ); } t116_test_selector_interpolation_at_dashes.rs000066400000000000000000000007231474765622100343240ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/116_test_selector_interpolation_at_dashes.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("116_test_selector_interpolation_at_dashes") } #[test] fn test() { assert_eq!( runner().ok("$a : a;\ \n$b : b;\ \ndiv { -foo-#{$a}-#{$b}-foo: foo }\n"), "div {\ \n -foo-a-b-foo: foo;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t119_test_basic_prop_name_interpolation.rs000066400000000000000000000006371474765622100337000ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/119_test_basic_prop_name_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("119_test_basic_prop_name_interpolation") } #[test] fn test() { assert_eq!( runner().ok("foo {bar#{\"baz\" + \"bang\"}: blip}\n"), "foo {\ \n barbazbang: blip;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t120_test_basic_prop_name_interpolation.rs000066400000000000000000000006141474765622100336630ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/120_test_basic_prop_name_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("120_test_basic_prop_name_interpolation") } #[test] fn test() { assert_eq!( runner().ok("foo {bar#{1 + 2}: blip}\n"), "foo {\ \n bar3: blip;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t121_test_prop_name_only_interpolation.rs000066400000000000000000000006271474765622100335700ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/121_test_prop_name_only_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("121_test_prop_name_only_interpolation") } #[test] fn test() { assert_eq!( runner().ok("foo {#{\"baz\" + \"bang\"}: blip}\n"), "foo {\ \n bazbang: blip;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t122_test_directive_interpolation.rs000066400000000000000000000006421474765622100325230ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/122_test_directive_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("122_test_directive_interpolation") } #[test] fn test() { assert_eq!( runner().ok("$baz: 12;\ \n@foo bar#{$baz} qux {a: b}\n"), "@foo bar12 qux {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t130_test_random_directive_interpolation.rs000066400000000000000000000014731474765622100340650ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/130_test_random_directive_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("130_test_random_directive_interpolation") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok("$domain: \"sass-lang.com\";\ \n@foo url(https://#{$domain}/),\ \n #{domain($domain)},\ \n \"foo#{\'ba\' + \'r\'}baz\",\ \n foo#{\'ba\' + \'r\'}baz {\ \n .foo {a: b}\ \n}\n"), "@foo url(https://sass-lang.com/),\ \n domain(\"sass-lang.com\"),\ \n \"foobarbaz\",\ \n foobarbaz {\ \n .foo {\ \n a: b;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t131_test_nested_mixin_def.rs000066400000000000000000000006401474765622100311000ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/131_test_nested_mixin_def.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("131_test_nested_mixin_def") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n @mixin bar {a: b}\ \n @include bar; }\n"), "foo {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t132_test_nested_mixin_shadow.rs000066400000000000000000000010631474765622100316300ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/132_test_nested_mixin_shadow.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("132_test_nested_mixin_shadow") } #[test] fn test() { assert_eq!( runner().ok("@mixin bar {a: b}\n\ \nfoo {\ \n @mixin bar {c: d}\ \n @include bar;\ \n}\n\ \nbaz {@include bar}\n"), "foo {\ \n c: d;\ \n}\ \nbaz {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t133_test_nested_function_def.rs000066400000000000000000000010051474765622100315770ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/133_test_nested_function_def.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("133_test_nested_function_def") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n @function foo() {@return 1}\ \n a: foo(); }\n\ \nbar {b: foo()}\n"), "foo {\ \n a: 1;\ \n}\ \nbar {\ \n b: foo();\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t134_test_nested_function_shadow.rs000066400000000000000000000011051474765622100323300ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/134_test_nested_function_shadow.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("134_test_nested_function_shadow") } #[test] fn test() { assert_eq!( runner().ok("@function foo() {@return 1}\n\ \nfoo {\ \n @function foo() {@return 2}\ \n a: foo();\ \n}\n\ \nbaz {b: foo()}\n"), "foo {\ \n a: 2;\ \n}\ \nbaz {\ \n b: 1;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t171_test_loud_comment_in_compressed_mode.rs000066400000000000000000000005121474765622100342010ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/171_test_loud_comment_in_compressed_mode.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("171_test_loud_comment_in_compressed_mode") } #[test] fn test() { assert_eq!(runner().ok("/*! foo */\n"), "/*! foo */\n"); } t172_test_parsing_decimals_followed_by_comments_doesnt_take_forever.rs000066400000000000000000000011521474765622100414270ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/172_test_parsing_decimals_followed_by_comments_doesnt_take_forever.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd( "172_test_parsing_decimals_followed_by_comments_doesnt_take_forever", ) } #[test] fn test() { assert_eq!( runner().ok( ".foo {\ \n padding: 4.21052631578947% 4.21052631578947% 5.631578947368421% /**/\ \n}\n" ), ".foo {\ \n padding: 4.2105263158% 4.2105263158% 5.6315789474%;\ \n}\n" ); } t173_test_parsing_many_numbers_doesnt_take_forever.rs000066400000000000000000000440531474765622100360630ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/173_test_parsing_many_numbers_doesnt_take_forever.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("173_test_parsing_many_numbers_doesnt_take_forever") } #[test] fn test() { assert_eq!( runner().ok( ".foo {\ \n padding: 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%;\ \n}\n" ), ".foo {\ \n padding: 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%, 80% 90%;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t174_test_import_comments_in_imports.rs000066400000000000000000000011041474765622100332610ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/174_test_import_comments_in_imports.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("174_test_import_comments_in_imports") } #[test] fn test() { assert_eq!( runner().ok("@import \"foo.css\", // this is a comment\ \n \"bar.css\", /* this is another comment */\ \n \"baz.css\"; // this is a third comment\n"), "@import \"foo.css\";\ \n@import \"bar.css\";\ \n@import \"baz.css\";\n" ); } t176_test_newline_selector_rendered_multiple_times.rs000066400000000000000000000013671474765622100360620ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/176_test_newline_selector_rendered_multiple_times.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("176_test_newline_selector_rendered_multiple_times") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok("@for $i from 1 through 2 {\ \n form {\ \n input,\ \n select {\ \n color: white;\ \n }\ \n }\ \n}\n"), "form input,\ \nform select {\ \n color: white;\ \n}\ \nform input,\ \nform select {\ \n color: white;\ \n}\n" ); } t177_test_prop_name_interpolation_after_hyphen.rs000066400000000000000000000006331474765622100352140ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/177_test_prop_name_interpolation_after_hyphen.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("177_test_prop_name_interpolation_after_hyphen") } #[test] fn test() { assert_eq!( runner().ok("a { -#{\"foo\"}-bar: b; }\n"), "a {\ \n -foo-bar: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t178_test_star_plus_and_parent.rs000066400000000000000000000005731474765622100320230ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/178_test_star_plus_and_parent.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("178_test_star_plus_and_parent") } #[test] fn test() { assert_eq!( runner().ok("foo {*+html & {a: b}}\n"), "* + html foo {\ \n a: b;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t179_test_weird_added_space.rs000066400000000000000000000006761474765622100312270ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/179_test_weird_added_space.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("179_test_weird_added_space") } #[test] fn test() { assert_eq!( runner().ok("$value : bip;\n\ \nfoo {\ \n bar: -moz-#{$value};\ \n}\n"), "foo {\ \n bar: -moz-bip;\ \n}\n" ); } t180_test_interpolation_with_bracket_on_next_line.rs000066400000000000000000000007011474765622100356750ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/180_test_interpolation_with_bracket_on_next_line.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("180_test_interpolation_with_bracket_on_next_line") } #[test] fn test() { assert_eq!( runner().ok("a.#{\"foo\"} b\ \n{color: red}\n"), "a.foo b {\ \n color: red;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t181_test_interpolation.rs000066400000000000000000000006561474765622100304770ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/181_test_interpolation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("181_test_interpolation") } #[test] fn test() { assert_eq!( runner().ok("$bar : \"#foo\";\ \nul li#{$bar} a span.label { foo: bar; }\n"), "ul li#foo a span.label {\ \n foo: bar;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t182_test_mixin_with_keyword_args.rs000066400000000000000000000013241474765622100325410ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/182_test_mixin_with_keyword_args.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("182_test_mixin_with_keyword_args") } #[test] fn test() { assert_eq!( runner().ok( "@mixin a-mixin($required, $arg1: default-val1, $arg2: default-val2) {\ \n required: $required;\ \n arg1: $arg1;\ \n arg2: $arg2;\ \n}\ \n.mixed { @include a-mixin(foo, $arg2: non-default-val2); }\n" ), ".mixed {\ \n required: foo;\ \n arg1: default-val1;\ \n arg2: non-default-val2;\ \n}\n" ); } t183_test_passing_required_args_as_a_keyword_arg.rs000066400000000000000000000013311474765622100354620ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/183_test_passing_required_args_as_a_keyword_arg.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("183_test_passing_required_args_as_a_keyword_arg") } #[test] fn test() { assert_eq!( runner().ok( "@mixin a-mixin($required, $arg1: default-val1, $arg2: default-val2) {\ \n required: $required;\ \n arg1: $arg1;\ \n arg2: $arg2; }\ \n.mixed { @include a-mixin($required: foo); }\n" ), ".mixed {\ \n required: foo;\ \n arg1: default-val1;\ \n arg2: default-val2;\ \n}\n" ); } t184_test_passing_all_as_keyword_args_in_opposite_order.rs000066400000000000000000000014411474765622100370670ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/184_test_passing_all_as_keyword_args_in_opposite_order.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("184_test_passing_all_as_keyword_args_in_opposite_order") } #[test] fn test() { assert_eq!( runner().ok( "@mixin a-mixin($required, $arg1: default-val1, $arg2: default-val2) {\ \n required: $required;\ \n arg1: $arg1;\ \n arg2: $arg2; }\ \n.mixed { @include a-mixin($arg2: non-default-val2, $arg1: non-default-val1, $required: foo); }\n" ), ".mixed {\ \n required: foo;\ \n arg1: non-default-val1;\ \n arg2: non-default-val2;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t185_test_keyword_args_in_functions.rs000066400000000000000000000006661474765622100330730ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/185_test_keyword_args_in_functions.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("185_test_keyword_args_in_functions") } #[test] fn test() { assert_eq!( runner().ok(".keyed { color: rgba($color: #a7c, $alpha: 0.4) }\n"), ".keyed {\ \n color: rgba(170, 119, 204, 0.4);\ \n}\n" ); } t186_test_newlines_removed_from_selectors_when_compressed.rs000066400000000000000000000011121474765622100374420ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/186_test_newlines_removed_from_selectors_when_compressed.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("186_test_newlines_removed_from_selectors_when_compressed") } #[test] #[ignore] // wrong result fn test() { assert_eq!( runner().ok("a\ \n, b {\ \n z & {\ \n display: block;\ \n }\ \n}\n"), "z a,\ \nz b {\ \n display: block;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t187_test_multiline_var.rs000066400000000000000000000011771474765622100304670ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/187_test_multiline_var.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("187_test_multiline_var") } #[test] fn test() { assert_eq!( runner().ok("foo {\ \n $var1: 1 +\ \n 2;\ \n $var2: true and\ \n false;\ \n $var3: a b\ \n c;\ \n a: $var1;\ \n b: $var2;\ \n c: $var3; }\n"), "foo {\ \n a: 3;\ \n b: false;\ \n c: a b c;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t188_test_mixin_content.rs000066400000000000000000000017051474765622100304710ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/188_test_mixin_content.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("188_test_mixin_content") } #[test] fn test() { assert_eq!( runner().ok("$color: blue;\ \n@mixin context($class, $color: red) {\ \n .#{$class} {\ \n background-color: $color;\ \n @content;\ \n border-color: $color;\ \n }\ \n}\ \n@include context(parent) {\ \n @include context(child, $color: yellow) {\ \n color: $color;\ \n }\ \n}\n"), ".parent {\ \n background-color: red;\ \n border-color: red;\ \n}\ \n.parent .child {\ \n background-color: yellow;\ \n color: blue;\ \n border-color: yellow;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t189_test_empty_content.rs000066400000000000000000000006201474765622100304770ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/189_test_empty_content.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("189_test_empty_content") } #[test] fn test() { assert_eq!( runner().ok("@mixin foo { @content }\ \na { b: c; @include foo {} }\n"), "a {\ \n b: c;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t190_test_options_passed_to_script.rs000066400000000000000000000007171474765622100327260ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/190_test_options_passed_to_script.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("190_test_options_passed_to_script") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:color\";\ \nfoo {color: color.adjust(black, $lightness: -10%)}\n"), "foo {\ \n color: hsl(0, 0%, -10%);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/scss_tests/t191_test_extend_in_media_in_rule.rs000066400000000000000000000012361474765622100324350ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/scss-tests/191_test_extend_in_media_in_rule.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("191_test_extend_in_media_in_rule") } #[test] #[ignore] // unexepected error fn test() { assert_eq!( runner().ok(".foo {\ \n @media screen {\ \n @extend %bar;\ \n }\ \n}\n\ \n@media screen {\ \n %bar {\ \n a: b;\ \n }\ \n}\n"), "@media screen {\ \n .foo {\ \n a: b;\ \n }\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/non_conformant/variables.rs000066400000000000000000000014271474765622100235440ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/non_conformant/variables.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("variables") } mod global { #[allow(unused)] use super::runner; mod first_declaration { #[allow(unused)] use super::runner; #[test] fn nested() { assert_eq!( runner().ok("x {$var: value !global}\ \na {b: $var}\n"), "a {\ \n b: value;\ \n}\n" ); } #[test] fn top_level() { assert_eq!( runner().ok("$var: value !global;\ \na {b: $var}\n"), "a {\ \n b: value;\ \n}\n" ); } } } rsass-0.29.0/rsass/tests/spec/operators/000077500000000000000000000000001474765622100202205ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/operators/minus.rs000066400000000000000000000044251474765622100217260ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/operators/minus.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("minus") } mod syntax { #[allow(unused)] use super::runner; mod comment { #[allow(unused)] use super::runner; #[test] fn both() { assert_eq!( runner().ok("a {b: c/**/-/**/d}\n"), "a {\ \n b: c-d;\ \n}\n" ); } #[test] fn left() { assert_eq!( runner().ok("a {b: c/**/-(d)}\n"), "a {\ \n b: c-d;\ \n}\n" ); } #[test] fn right() { assert_eq!( runner().ok("a {b: (c)-/**/d}\n"), "a {\ \n b: c-d;\ \n}\n" ); } } mod whitespace { #[allow(unused)] use super::runner; #[test] fn both() { assert_eq!( runner().ok("a {b: c - d}\n"), "a {\ \n b: c-d;\ \n}\n" ); } mod left { #[allow(unused)] use super::runner; #[test] fn newline() { assert_eq!( runner().ok("a {b: c\ \n-(d)}\n"), "a {\ \n b: c-d;\ \n}\n" ); } #[test] fn space() { assert_eq!( runner().ok("a {b: c -(d)}\n"), "a {\ \n b: c-d;\ \n}\n" ); } #[test] fn tab() { assert_eq!( runner().ok("a {b: c\t-(d)}\n"), "a {\ \n b: c-d;\ \n}\n" ); } } #[test] fn neither() { assert_eq!( runner().ok("a {b: (c)-(d)}\n"), "a {\ \n b: c-d;\ \n}\n" ); } #[test] fn right() { assert_eq!( runner().ok("a {b: (c)- d}\n"), "a {\ \n b: c-d;\ \n}\n" ); } } } rsass-0.29.0/rsass/tests/spec/operators/mod.rs000066400000000000000000000003121474765622100213410ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/operators" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("operators") } mod minus; mod modulo; mod plus; mod slash; rsass-0.29.0/rsass/tests/spec/operators/modulo.rs000066400000000000000000000026631474765622100220740ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/operators/modulo.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("modulo") } mod degenerate { #[allow(unused)] use super::runner; mod modulus { #[allow(unused)] use super::runner; mod infinity { #[allow(unused)] use super::runner; #[test] fn negative_and_negative() { assert_eq!( runner().ok("a {b: -1px % calc(-infinity * 1px)}\n"), "a {\ \n b: -1px;\ \n}\n" ); } #[test] fn negative_and_positive() { assert_eq!( runner().ok("a {b: -1px % calc(infinity * 1px)}\n"), "a {\ \n b: calc(NaN * 1px);\ \n}\n" ); } #[test] fn positive_and_negative() { assert_eq!( runner().ok("a {b: 1px % calc(-infinity * 1px)}\n"), "a {\ \n b: calc(NaN * 1px);\ \n}\n" ); } #[test] fn positive_and_positive() { assert_eq!( runner().ok("a {b: 1px % calc(infinity * 1px)}\n"), "a {\ \n b: 1px;\ \n}\n" ); } } } } rsass-0.29.0/rsass/tests/spec/operators/plus.rs000066400000000000000000000043721474765622100215570ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/operators/plus.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("plus") } mod syntax { #[allow(unused)] use super::runner; mod comment { #[allow(unused)] use super::runner; #[test] fn both() { assert_eq!( runner().ok("a {b: c/**/+/**/d}\n"), "a {\ \n b: cd;\ \n}\n" ); } #[test] fn left() { assert_eq!( runner().ok("a {b: c/**/+d}\n"), "a {\ \n b: cd;\ \n}\n" ); } #[test] fn right() { assert_eq!( runner().ok("a {b: c+/**/d}\n"), "a {\ \n b: cd;\ \n}\n" ); } } mod whitespace { #[allow(unused)] use super::runner; #[test] fn both() { assert_eq!( runner().ok("a {b: c + d}\n"), "a {\ \n b: cd;\ \n}\n" ); } mod left { #[allow(unused)] use super::runner; #[test] fn newline() { assert_eq!( runner().ok("a {b: c\ \n+d}\n"), "a {\ \n b: cd;\ \n}\n" ); } #[test] fn space() { assert_eq!( runner().ok("a {b: c +d}\n"), "a {\ \n b: cd;\ \n}\n" ); } #[test] fn tab() { assert_eq!( runner().ok("a {b: c\t+d}\n"), "a {\ \n b: cd;\ \n}\n" ); } } #[test] fn neither() { assert_eq!( runner().ok("a {b: c+d}\n"), "a {\ \n b: cd;\ \n}\n" ); } #[test] fn right() { assert_eq!( runner().ok("a {b: c+ d}\n"), "a {\ \n b: cd;\ \n}\n" ); } } } rsass-0.29.0/rsass/tests/spec/operators/slash.rs000066400000000000000000000063771474765622100217150ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/operators/slash.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("slash") .mock_file("namespaced_variables/other.scss", "$a: 1;\n$b: 2;\n") } #[test] fn namespaced_variables() { let runner = runner().with_cwd("namespaced_variables"); assert_eq!( runner.ok("@use \"other\";\ \na {b: other.$a / other.$b}\n"), "a {\ \n b: 0.5;\ \n}\n" ); } mod separator { #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("separator") } mod calculation { #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("calculation") } mod preserved { #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("preserved") } #[test] fn both() { let runner = runner().with_cwd("both"); assert_eq!( runner.ok("a {b: calc(1px + 1%)/calc(2px + 2%)}\n"), "a {\ \n b: calc(1px + 1%)/calc(2px + 2%);\ \n}\n" ); } #[test] fn left() { let runner = runner().with_cwd("left"); assert_eq!( runner.ok("a {b: calc(1px + 1%)/2}\n"), "a {\ \n b: calc(1px + 1%)/2;\ \n}\n" ); } #[test] fn right() { let runner = runner().with_cwd("right"); assert_eq!( runner.ok("a {b: 2/calc(1px + 1%)}\n"), "a {\ \n b: 2/calc(1px + 1%);\ \n}\n" ); } } mod simplified { #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("simplified") } #[test] fn both() { let runner = runner().with_cwd("both"); assert_eq!( runner.ok("a {b: calc(1)/calc(2)}\n"), "a {\ \n b: 1/2;\ \n}\n" ); } #[test] fn left() { let runner = runner().with_cwd("left"); assert_eq!( runner.ok("a {b: calc(1)/2}\n"), "a {\ \n b: 1/2;\ \n}\n" ); } #[test] fn right() { let runner = runner().with_cwd("right"); assert_eq!( runner.ok("a {b: 1/calc(2)}\n"), "a {\ \n b: 1/2;\ \n}\n" ); } } } } mod without_intermediate { #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("without_intermediate") } #[test] #[ignore] // wrong result fn whitespace() { let runner = runner().with_cwd("whitespace"); assert_eq!( runner.ok("a {b: 1/ / /bar}\n"), "a {\ \n b: 1///bar;\ \n}\n" ); } } rsass-0.29.0/rsass/tests/spec/parser/000077500000000000000000000000001474765622100174765ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/parser/indentation.rs000066400000000000000000000005651474765622100223660ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/parser/indentation.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("indentation") } mod empty_line { #[allow(unused)] use super::runner; } mod error { #[allow(unused)] use super::runner; mod mixed_syntax { #[allow(unused)] use super::runner; } } rsass-0.29.0/rsass/tests/spec/parser/mod.rs000066400000000000000000000003171474765622100206240ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/parser" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("parser") } mod indentation; mod operator_precedence; mod selector; rsass-0.29.0/rsass/tests/spec/parser/operator_precedence.rs000066400000000000000000000006661474765622100240640ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/parser/operator_precedence.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("operator_precedence") } #[test] fn mixed() { assert_eq!( runner().ok("// Regression test for scssphp/scssphp#435\ \na {\ \n b: true or 1 < 0 and false;\ \n}\n"), "a {\ \n b: true;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/parser/selector.rs000066400000000000000000000015131474765622100216640ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/parser/selector.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("selector") } mod error { #[allow(unused)] use super::runner; #[test] #[ignore] // wrong error fn empty_placeholder() { assert_eq!( runner().err( "% {\ \n a: b;\ \n}\n" ), "Error: Expected identifier.\ \n ,\ \n1 | % {\ \n | ^\ \n \'\ \n input.scss 1:2 root stylesheet", ); } } #[test] fn escaped_backslash() { assert_eq!( runner().ok("// Regression test for sass/dart-sass#1855.\ \n\\\\{\ \n b: c;\ \n}\n"), "\\\\ {\ \n b: c;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/testrunner.rs000066400000000000000000000077061474765622100207730ustar00rootroot00000000000000use rsass::input::{ Context, FsLoader, LoadError, Loader, SourceFile, SourceName, }; use rsass::output::Format; use rsass::Error; use std::collections::BTreeMap; use std::io::{Cursor, Read}; use std::sync::Arc; pub fn runner() -> TestRunner { TestRunner::new() } #[derive(Clone)] pub struct TestRunner { format: Format, loader: TestLoader, } #[derive(Clone, Debug)] struct TestLoader { parent: Arc, mock: BTreeMap, cwd: String, } impl TestLoader { fn new() -> Self { let mut parent = FsLoader::for_cwd(); parent.push_path("tests/spec".as_ref()); TestLoader { parent: Arc::new(parent), mock: BTreeMap::new(), cwd: String::new(), } } fn mock_file(&mut self, name: &str, content: &str) { self.mock.insert(url_join(&self.cwd, name), content.into()); } #[allow(unused)] // only used while building tests fn has_mock_files(&self) -> bool { !self.mock.is_empty() } fn with_cwd(&mut self, cwd: &str) { self.cwd = url_join(&self.cwd, cwd); } } fn url_join(p: &str, c: &str) -> String { let c = c.trim_start_matches("./").replace("/./", "/"); if p.is_empty() { c } else if c.is_empty() { p.to_string() } else if p.ends_with('/') { format!("{}{}", p, c) } else { format!("{}/{}", p, c) } } impl Loader for TestLoader { type File = Cursor>; fn find_file(&self, name: &str) -> Result, LoadError> { let mut cwd = self.cwd.trim_end_matches('/'); let mut lname = name; while let Some(name) = lname.strip_prefix("../") { cwd = cwd.rfind('/').map(|p| &self.cwd[..p]).unwrap_or(""); lname = name; } let tname = url_join(cwd, lname); if let Some(data) = self.mock.get(&tname) { return Ok(Some(Cursor::new(data.as_bytes().to_vec()))); } if let Some(data) = self.mock.get(lname) { return Ok(Some(Cursor::new(data.as_bytes().to_vec()))); } Ok(self.parent.find_file(name)?.map(|mut file| { let mut buf = Vec::new(); file.read_to_end(&mut buf).unwrap(); Cursor::new(buf) })) } } impl TestRunner { pub fn new() -> TestRunner { TestRunner { format: Default::default(), loader: TestLoader::new(), } } pub fn set_precision(mut self, precision: usize) -> Self { self.format = Format { precision, ..self.format }; self } pub fn mock_file(mut self, name: &str, content: &str) -> Self { self.loader.mock_file(name, content); self } #[allow(unused)] // only used while building tests pub fn has_files(&self) -> bool { self.loader.has_mock_files() } pub fn with_cwd(mut self, cwd: &str) -> Self { self.loader.with_cwd(cwd); self } #[allow(unused)] // only used while executing tests pub fn ok(&self, input: &str) -> String { match self.run(input) { Ok(css) => css, Err(err) => panic!("Unexpected error:\n{}\n", err), } } #[allow(unused)] // only used while executing tests pub fn err(&self, input: &str) -> String { match self.run(input) { Ok(css) => panic!("Unexpected result:\n{css}\n"), Err(err) => err, } } pub fn run(&self, input: &str) -> Result { self.rsass(input) .map(|css| String::from_utf8(css).unwrap().replace("\n\n", "\n")) .map_err(|err| format!("Error: {err}")) } fn rsass(&self, input: &str) -> Result, Error> { let name = SourceName::root("input.scss"); let file = SourceFile::read(&mut input.as_bytes(), name)?; Context::for_loader(self.loader.clone()) .with_format(self.format) .transform(file) } } rsass-0.29.0/rsass/tests/spec/values/000077500000000000000000000000001474765622100175015ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/values/calculation/000077500000000000000000000000001474765622100217775ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/values/calculation/abs.rs000066400000000000000000000074501474765622100231200ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/abs.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("abs") } #[test] fn case_insensitive() { assert_eq!( runner().ok("a {b: AbS(-2)}\n"), "a {\ \n b: 2;\ \n}\n" ); } mod error { #[allow(unused)] use super::runner; #[test] fn sass_script_and_variable() { assert_eq!( runner().err("a {b: abs($number: var(--c))}\n"), "Error: $number: var(--c) is not a number.\ \n ,\ \n1 | a {b: abs($number: var(--c))}\ \n | ^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } mod syntax { #[allow(unused)] use super::runner; #[test] #[ignore] // wrong error fn invalid_arg() { assert_eq!( runner().err("a {b: abs($)}\n"), "Error: Expected identifier.\ \n ,\ \n1 | a {b: abs($)}\ \n | ^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } } #[test] fn too_few_args() { assert_eq!( runner().err("a {b: abs()}\n"), "Error: Missing argument.\ \n ,\ \n1 | a {b: abs()}\ \n | ^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn too_many_args() { assert_eq!( runner().err("a {b: abs(1, 2)}\n"), "Error: Only 1 argument allowed, but 2 were passed.\ \n ,\ \n1 | a {b: abs(1, 2)}\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn test_type() { assert_eq!( runner().err("a {b: abs(\"0\")}\n"), "Error: $number: \"0\" is not a number.\ \n ,\ \n1 | a {b: abs(\"0\")}\ \n | ^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } } mod math { #[allow(unused)] use super::runner; #[test] fn slash_as_division() { assert_eq!( runner().ok("b {\ \n a: 2px / abs(1.5);\ \n}\n"), "b {\ \n a: 1.3333333333px;\ \n}\n" ); } } #[test] fn negative() { assert_eq!( runner().ok("a {b: abs(-5.6)}\n"), "a {\ \n b: 5.6;\ \n}\n" ); } #[test] fn overridden() { assert_eq!( runner().ok("@function abs($arg) {@return $arg}\ \na {b: abs(-2)}\n"), "a {\ \n b: -2;\ \n}\n" ); } #[test] fn percentage_warning() { assert_eq!( runner().ok("a {b: abs(-7.5%)}\n"), "a {\ \n b: 7.5%;\ \n}\n" ); } #[test] fn positive() { assert_eq!( runner().ok("a {b: abs(1)}\n"), "a {\ \n b: 1;\ \n}\n" ); } #[test] fn preserves_single_unit() { assert_eq!( runner().ok("a {b: abs(1 + 1px)}\n"), "a {\ \n b: 2px;\ \n}\n" ); } #[test] fn preserves_units() { assert_eq!( runner().ok("a {b: abs(-7px / 4em) * 1em}\n"), "a {\ \n b: 1.75px;\ \n}\n" ); } #[test] fn sass_script() { assert_eq!( runner().ok("a {b: abs($number: -3)}\n"), "a {\ \n b: 3;\ \n}\n" ); } #[test] fn simplification() { assert_eq!( runner().ok("a {\ \n b: abs(1px + 2px - var(--c))\ \n}\n"), "a {\ \n b: abs(3px - var(--c));\ \n}\n" ); } #[test] fn zero() { assert_eq!( runner().ok("a {b: abs(0)}\n"), "a {\ \n b: 0;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/calculation/acos.rs000066400000000000000000000106071474765622100232760ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/acos.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("acos") } #[test] fn case_insensitive() { assert_eq!( runner().ok("a {b: AcOs(1)}\n"), "a {\ \n b: 0deg;\ \n}\n" ); } mod error { #[allow(unused)] use super::runner; #[test] #[ignore] // missing error fn sass_script() { assert_eq!( runner().err("a {b: acos(7 % 3)}\n"), "Error: This operation can\'t be used in a calculation.\ \n ,\ \n1 | a {b: acos(7 % 3)}\ \n | ^\ \n \'\ \n input.scss 1:14 root stylesheet", ); } mod syntax { #[allow(unused)] use super::runner; #[test] #[ignore] // wrong error fn invalid_arg() { assert_eq!( runner().err("a {b: acos($)}\n"), "Error: Expected identifier.\ \n ,\ \n1 | a {b: acos($)}\ \n | ^\ \n \'\ \n input.scss 1:13 root stylesheet", ); } } #[test] fn too_few_args() { assert_eq!( runner().err("a {b: acos()}\n"), "Error: Missing argument.\ \n ,\ \n1 | a {b: acos()}\ \n | ^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn too_many_args() { assert_eq!( runner().err("a {b: acos(0, 0)}\n"), "Error: Only 1 argument allowed, but 2 were passed.\ \n ,\ \n1 | a {b: acos(0, 0)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] #[ignore] // wrong error fn test_type() { assert_eq!( runner().err("a {b: acos(\"0\")}\n"), "Error: This expression can\'t be used in a calculation.\ \n ,\ \n1 | a {b: acos(\"0\")}\ \n | ^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } mod unit { #[allow(unused)] use super::runner; #[test] fn complex() { assert_eq!( runner().err("a {b: acos(-7px / 4em)}\n"), "Error: Expected calc(-1.75px / 1em) to have no units.\ \n ,\ \n1 | a {b: acos(-7px / 4em)}\ \n | ^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn known() { assert_eq!( runner().err("a {b: acos(1px)}\n"), "Error: Expected 1px to have no units.\ \n ,\ \n1 | a {b: acos(1px)}\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn unknown() { assert_eq!( runner().err("a {b: acos(1%)}\n"), "Error: Expected 1% to have no units.\ \n ,\ \n1 | a {b: acos(1%)}\ \n | ^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } } } #[test] fn greater_than_one() { assert_eq!( runner().ok("a {b: acos(2)}\n"), "a {\ \n b: calc(NaN * 1deg);\ \n}\n" ); } #[test] fn less_than_negative_one() { assert_eq!( runner().ok("a {b: acos(-2)}\n"), "a {\ \n b: calc(NaN * 1deg);\ \n}\n" ); } #[test] fn negative_one() { assert_eq!( runner().ok("a {b: acos(-1)}\n"), "a {\ \n b: 180deg;\ \n}\n" ); } #[test] fn one() { assert_eq!( runner().ok("a {b: acos(1)}\n"), "a {\ \n b: 0deg;\ \n}\n" ); } #[test] fn overridden() { assert_eq!( runner().ok("@function acos($arg) {@return $arg}\ \na {b: acos(1)}\n"), "a {\ \n b: 1;\ \n}\n" ); } #[test] fn simplification() { assert_eq!( runner().ok("a {\ \n b: acos(3px - 1px + var(--c));\ \n}\n"), "a {\ \n b: acos(2px + var(--c));\ \n}\n" ); } #[test] fn zero() { assert_eq!( runner().ok("a {b: acos(0)}\n"), "a {\ \n b: 90deg;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/calculation/asin.rs000066400000000000000000000106101474765622100232750ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/asin.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("asin") } #[test] fn case_insensitive() { assert_eq!( runner().ok("a {b: aSiN(1)}\n"), "a {\ \n b: 90deg;\ \n}\n" ); } mod error { #[allow(unused)] use super::runner; #[test] #[ignore] // missing error fn sass_script() { assert_eq!( runner().err("a {b: asin(7 % 3)}\n"), "Error: This operation can\'t be used in a calculation.\ \n ,\ \n1 | a {b: asin(7 % 3)}\ \n | ^\ \n \'\ \n input.scss 1:14 root stylesheet", ); } mod syntax { #[allow(unused)] use super::runner; #[test] #[ignore] // wrong error fn invalid_arg() { assert_eq!( runner().err("a {b: asin($)}\n"), "Error: Expected identifier.\ \n ,\ \n1 | a {b: asin($)}\ \n | ^\ \n \'\ \n input.scss 1:13 root stylesheet", ); } } #[test] fn too_few_args() { assert_eq!( runner().err("a {b: asin()}\n"), "Error: Missing argument.\ \n ,\ \n1 | a {b: asin()}\ \n | ^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn too_many_args() { assert_eq!( runner().err("a {b: asin(0, 0)}\n"), "Error: Only 1 argument allowed, but 2 were passed.\ \n ,\ \n1 | a {b: asin(0, 0)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] #[ignore] // wrong error fn test_type() { assert_eq!( runner().err("a {b: asin(\"0\")}\n"), "Error: This expression can\'t be used in a calculation.\ \n ,\ \n1 | a {b: asin(\"0\")}\ \n | ^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } mod unit { #[allow(unused)] use super::runner; #[test] fn complex() { assert_eq!( runner().err("a {b: asin(-7px / 4em)}\n"), "Error: Expected calc(-1.75px / 1em) to have no units.\ \n ,\ \n1 | a {b: asin(-7px / 4em)}\ \n | ^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn known() { assert_eq!( runner().err("a {b: asin(1px)}\n"), "Error: Expected 1px to have no units.\ \n ,\ \n1 | a {b: asin(1px)}\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn unknown() { assert_eq!( runner().err("a {b: asin(1%)}\n"), "Error: Expected 1% to have no units.\ \n ,\ \n1 | a {b: asin(1%)}\ \n | ^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } } } #[test] fn greater_than_one() { assert_eq!( runner().ok("a {b: asin(2)}\n"), "a {\ \n b: calc(NaN * 1deg);\ \n}\n" ); } #[test] fn less_than_negative_one() { assert_eq!( runner().ok("a {b: asin(-2)}\n"), "a {\ \n b: calc(NaN * 1deg);\ \n}\n" ); } #[test] fn negative_one() { assert_eq!( runner().ok("a {b: asin(-1)}\n"), "a {\ \n b: -90deg;\ \n}\n" ); } #[test] fn one() { assert_eq!( runner().ok("a {b: asin(1)}\n"), "a {\ \n b: 90deg;\ \n}\n" ); } #[test] fn overridden() { assert_eq!( runner().ok("@function asin($arg) {@return $arg}\ \na {b: asin(1)}\n"), "a {\ \n b: 1;\ \n}\n" ); } #[test] fn simplification() { assert_eq!( runner().ok("a {\ \n b: asin(3px - 1px + var(--c));\ \n}\n"), "a {\ \n b: asin(2px + var(--c));\ \n}\n" ); } #[test] fn zero() { assert_eq!( runner().ok("a {b: asin(0)}\n"), "a {\ \n b: 0deg;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/calculation/atan.rs000066400000000000000000000074471474765622100233040ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/atan.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("atan") } #[test] fn case_insensitive() { assert_eq!( runner().ok("a {b: AtAn(1)}\n"), "a {\ \n b: 45deg;\ \n}\n" ); } mod error { #[allow(unused)] use super::runner; #[test] #[ignore] // missing error fn sass_script() { assert_eq!( runner().err("a {b: atan(7 % 3)}\n"), "Error: This operation can\'t be used in a calculation.\ \n ,\ \n1 | a {b: atan(7 % 3)}\ \n | ^\ \n \'\ \n input.scss 1:14 root stylesheet", ); } #[test] fn too_few_args() { assert_eq!( runner().err("a {b: atan()}\n"), "Error: Missing argument.\ \n ,\ \n1 | a {b: atan()}\ \n | ^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn too_many_args() { assert_eq!( runner().err("a {b: atan(0, 0)}\n"), "Error: Only 1 argument allowed, but 2 were passed.\ \n ,\ \n1 | a {b: atan(0, 0)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] #[ignore] // wrong error fn test_type() { assert_eq!( runner().err("a {b: atan(\"0\")}\n"), "Error: This expression can\'t be used in a calculation.\ \n ,\ \n1 | a {b: atan(\"0\")}\ \n | ^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } mod unit { #[allow(unused)] use super::runner; #[test] fn complex() { assert_eq!( runner().err("a {b: atan(-7px / 4em)}\n"), "Error: Expected calc(-1.75px / 1em) to have no units.\ \n ,\ \n1 | a {b: atan(-7px / 4em)}\ \n | ^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn known() { assert_eq!( runner().err("a {b: atan(1px)}\n"), "Error: Expected 1px to have no units.\ \n ,\ \n1 | a {b: atan(1px)}\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn unknown() { assert_eq!( runner().err("a {b: atan(1%)}\n"), "Error: Expected 1% to have no units.\ \n ,\ \n1 | a {b: atan(1%)}\ \n | ^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } } } #[test] fn infinity() { assert_eq!( runner().ok("a {b: atan(infinity)}\n"), "a {\ \n b: 90deg;\ \n}\n" ); } #[test] fn negative_infinity() { assert_eq!( runner().ok("a {b: atan(-infinity)}\n"), "a {\ \n b: -90deg;\ \n}\n" ); } #[test] fn one() { assert_eq!( runner().ok("a {b: atan(1)}\n"), "a {\ \n b: 45deg;\ \n}\n" ); } #[test] fn overridden() { assert_eq!( runner().ok("@function atan($arg) {@return $arg}\ \na {b: atan(1)}\n"), "a {\ \n b: 1;\ \n}\n" ); } #[test] fn simplification() { assert_eq!( runner().ok("a {\ \n b: atan(3px - 1px + var(--c));\ \n}\n"), "a {\ \n b: atan(2px + var(--c));\ \n}\n" ); } #[test] fn zero() { assert_eq!( runner().ok("a {b: atan(0)}\n"), "a {\ \n b: 0deg;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/calculation/atan2.rs000066400000000000000000000136221474765622100233560ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/atan2.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("atan2") } #[test] fn case_insensitive() { assert_eq!( runner().ok("a {b: aTaN2(1, -10)}\n"), "a {\ \n b: 174.2894068625deg;\ \n}\n" ); } mod error { #[allow(unused)] use super::runner; #[test] #[ignore] // missing error fn sass_script() { assert_eq!( runner().err("a {b: atan2(7 % 3, 1)}\n"), "Error: This operation can\'t be used in a calculation.\ \n ,\ \n1 | a {b: atan2(7 % 3, 1)}\ \n | ^\ \n \'\ \n input.scss 1:15 root stylesheet", ); } mod syntax { #[allow(unused)] use super::runner; #[test] #[ignore] // wrong error fn invalid_arg() { assert_eq!( runner().err("a {b: atan2(1, $)}\n"), "Error: Expected identifier.\ \n ,\ \n1 | a {b: atan2(1, $)}\ \n | ^\ \n \'\ \n input.scss 1:17 root stylesheet", ); } } #[test] fn too_few_args() { assert_eq!( runner().err("a {b: atan2(0)}\n"), "Error: 2 arguments required, but only 1 was passed.\ \n ,\ \n1 | a {b: atan2(0)}\ \n | ^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn too_many_args() { assert_eq!( runner().err("a {b: atan2(0, 0, 0)}\n"), "Error: Only 2 arguments allowed, but 3 were passed.\ \n ,\ \n1 | a {b: atan2(0, 0, 0)}\ \n | ^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } mod units { #[allow(unused)] use super::runner; #[test] #[ignore] // wrong error fn complex_and_unknown() { assert_eq!( runner().err( "a {b: atan2(1px*2px, 10%)}\n" ), "Error: Number calc(2px * 1px) isn\'t compatible with CSS calculations.\ \n ,\ \n1 | a {b: atan2(1px*2px, 10%)}\ \n | ^^^^^^^\ \n \'\ \n input.scss 1:13 root stylesheet", ); } #[test] #[ignore] // wrong error fn known_incompatible() { assert_eq!( runner().err("a {b: atan2(1deg, 1px)}\n"), "Error: 1deg and 1px are incompatible.\ \n ,\ \n1 | a {b: atan2(1deg, 1px)}\ \n | ^^^^ 1deg\ \n | === 1px\ \n \'\ \n input.scss 1:13 root stylesheet", ); } #[test] #[ignore] // wrong error fn unitless_and_real() { assert_eq!( runner().err("a {b: atan2(1, 1px)}\n"), "Error: 1 and 1px are incompatible.\ \n ,\ \n1 | a {b: atan2(1, 1px)}\ \n | ^ 1\ \n | === 1px\ \n \'\ \n input.scss 1:13 root stylesheet", ); } } #[test] #[ignore] // wrong error fn x_type() { assert_eq!( runner().err("a {b: atan2(0, \"0\")}\n"), "Error: This expression can\'t be used in a calculation.\ \n ,\ \n1 | a {b: atan2(0, \"0\")}\ \n | ^^^\ \n \'\ \n input.scss 1:16 root stylesheet", ); } #[test] #[ignore] // wrong error fn y_type() { assert_eq!( runner().err("a {b: atan2(\"0\", 0)}\n"), "Error: This expression can\'t be used in a calculation.\ \n ,\ \n1 | a {b: atan2(\"0\", 0)}\ \n | ^^^\ \n \'\ \n input.scss 1:13 root stylesheet", ); } } #[test] fn overridden() { assert_eq!( runner().ok("@function atan2($arg) {@return $arg}\ \na {b: atan2(1)}\n"), "a {\ \n b: 1;\ \n}\n" ); } #[test] fn simplification() { assert_eq!( runner().ok("a {\ \n b: atan2(3px - 1px + var(--c), -7px / 4em * 1em);\ \n}\n"), "a {\ \n b: atan2(2px + var(--c), -1.75px);\ \n}\n" ); } mod units { #[allow(unused)] use super::runner; #[test] fn compatible() { assert_eq!( runner().ok("a {b: atan2(1cm, -10mm)}\n"), "a {\ \n b: 135deg;\ \n}\n" ); } #[test] fn fake() { assert_eq!( runner().ok("a {\ \n b: atan2(1foo, 2bar);\ \n}\n"), "a {\ \n b: atan2(1foo, 2bar);\ \n}\n" ); } #[test] fn none() { assert_eq!( runner().ok("a {b: atan2(1, -10)}\n"), "a {\ \n b: 174.2894068625deg;\ \n}\n" ); } #[test] fn real_and_fake() { assert_eq!( runner().ok("a {\ \n b: atan2(1px, 2bar);\ \n}\n"), "a {\ \n b: atan2(1px, 2bar);\ \n}\n" ); } #[test] fn real_and_unknown() { assert_eq!( runner().ok("a {b: atan2(1px, 10%)}\n"), "a {\ \n b: atan2(1px, 10%);\ \n}\n" ); } #[test] fn same_fake() { assert_eq!( runner().ok("a {\ \n b: atan2(1foo, 2foo);\ \n}\n"), "a {\ \n b: 26.5650511771deg;\ \n}\n" ); } #[test] fn unknown() { assert_eq!( runner().ok("a {\ \n b: atan2(1%, 2%);\ \n}\n"), "a {\ \n b: atan2(1%, 2%);\ \n}\n" ); } } rsass-0.29.0/rsass/tests/spec/values/calculation/calc/000077500000000000000000000000001474765622100227015ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/values/calculation/calc/constant.rs000066400000000000000000000237371474765622100251140ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/calc/constant.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("constant") } mod e { #[allow(unused)] use super::runner; #[test] fn alone() { assert_eq!( runner().ok("a {b: calc(e)}\n"), "a {\ \n b: 2.7182818285;\ \n}\n" ); } #[test] fn case_insensitive() { assert_eq!( runner().ok("a {b: calc(E)}\n"), "a {\ \n b: 2.7182818285;\ \n}\n" ); } #[test] fn equals_max_precision() { assert_eq!( runner().ok( "// Verify that e is equal to the maximum precision representable in a double.\ \na {b: calc(e) == 2.718281828459045}\n" ), "a {\ \n b: true;\ \n}\n" ); } mod math { #[allow(unused)] use super::runner; #[test] fn simplified() { assert_eq!( runner().ok("a {b: calc(e * 2)}\n"), "a {\ \n b: 5.4365636569;\ \n}\n" ); } #[test] fn unsimplified() { assert_eq!( runner().ok("a {b: calc(e * (1% + 1px))}\n"), "a {\ \n b: calc(2.7182818285 * (1% + 1px));\ \n}\n" ); } } } mod infinity { #[allow(unused)] use super::runner; #[test] fn alone() { assert_eq!( runner().ok("a {b: calc(infinity)}\n"), "a {\ \n b: calc(infinity);\ \n}\n" ); } #[test] fn case_insensitive() { assert_eq!( runner().ok("a {b: calc(InFiNiTy)}\n"), "a {\ \n b: calc(infinity);\ \n}\n" ); } mod math { #[allow(unused)] use super::runner; #[test] fn simplified() { assert_eq!( runner().ok("a {b: calc(infinity * 2)}\n"), "a {\ \n b: calc(infinity);\ \n}\n" ); } mod unsimplified { #[allow(unused)] use super::runner; #[test] fn computed() { assert_eq!( runner().ok("a {b: calc((1/0) * (1% + 1px))}\n"), "a {\ \n b: calc(infinity * (1% + 1px));\ \n}\n" ); } #[test] fn from_variable() { assert_eq!( runner().ok("@use \'sass:math\';\ \n$var: math.div(1, 0);\ \na {b: calc($var * (1% + 1px))}\n"), "a {\ \n b: calc(infinity * (1% + 1px));\ \n}\n" ); } #[test] fn literal() { assert_eq!( runner().ok("a {b: calc(infinity * (1% + 1px))}\n"), "a {\ \n b: calc(infinity * (1% + 1px));\ \n}\n" ); } } } #[test] fn test_type() { assert_eq!( runner().ok("@use \'sass:meta\';\ \na {b: meta.type-of(calc(infinity))}\n"), "a {\ \n b: number;\ \n}\n" ); } } mod minus_infinity { #[allow(unused)] use super::runner; #[test] fn alone() { assert_eq!( runner().ok("a {b: calc(-infinity)}\n"), "a {\ \n b: calc(-infinity);\ \n}\n" ); } #[test] fn case_insensitive() { assert_eq!( runner().ok("a {b: calc(-iNfInItY)}\n"), "a {\ \n b: calc(-infinity);\ \n}\n" ); } mod math { #[allow(unused)] use super::runner; #[test] fn simplified() { assert_eq!( runner().ok("a {b: calc(-infinity * 2)}\n"), "a {\ \n b: calc(-infinity);\ \n}\n" ); } mod unsimplified { #[allow(unused)] use super::runner; #[test] fn computed() { assert_eq!( runner().ok("a {b: calc((-1/0) * (1% + 1px))}\n"), "a {\ \n b: calc(-infinity * (1% + 1px));\ \n}\n" ); } #[test] fn from_variable() { assert_eq!( runner().ok("@use \'sass:math\';\ \n$var: math.div(-1, 0);\ \na {b: calc($var * (1% + 1px))}\n"), "a {\ \n b: calc(-infinity * (1% + 1px));\ \n}\n" ); } #[test] fn literal() { assert_eq!( runner().ok("a {b: calc(-infinity * (1% + 1px))}\n"), "a {\ \n b: calc(-infinity * (1% + 1px));\ \n}\n" ); } } } #[test] fn test_type() { assert_eq!( runner().ok("@use \'sass:meta\';\ \na {b: meta.type-of(calc(-infinity))}\n"), "a {\ \n b: number;\ \n}\n" ); } } mod nan { #[allow(unused)] use super::runner; #[test] fn alone() { assert_eq!( runner().ok("a {b: calc(NaN)}\n"), "a {\ \n b: calc(NaN);\ \n}\n" ); } #[test] fn case_insensitive() { assert_eq!( runner().ok("a {b: calc(nan)}\n"), "a {\ \n b: calc(NaN);\ \n}\n" ); } mod math { #[allow(unused)] use super::runner; #[test] fn simplified() { assert_eq!( runner().ok("a {b: calc(NaN * 2)}\n"), "a {\ \n b: calc(NaN);\ \n}\n" ); } mod unsimplified { #[allow(unused)] use super::runner; #[test] fn computed() { assert_eq!( runner().ok("a {b: calc((0/0) * (1% + 1px))}\n"), "a {\ \n b: calc(NaN * (1% + 1px));\ \n}\n" ); } #[test] fn from_variable() { assert_eq!( runner().ok("@use \'sass:math\';\ \n$var: math.div(0, 0);\ \na {b: calc($var * (1% + 1px))}\n"), "a {\ \n b: calc(NaN * (1% + 1px));\ \n}\n" ); } #[test] fn literal() { assert_eq!( runner().ok("a {b: calc(NaN * (1% + 1px))}\n"), "a {\ \n b: calc(NaN * (1% + 1px));\ \n}\n" ); } } } #[test] fn test_type() { assert_eq!( runner().ok("@use \'sass:meta\';\ \na {b: meta.type-of(calc(NaN))}\n"), "a {\ \n b: number;\ \n}\n" ); } } mod pi { #[allow(unused)] use super::runner; #[test] fn alone() { assert_eq!( runner().ok("a {b: calc(pi)}\n"), "a {\ \n b: 3.1415926536;\ \n}\n" ); } #[test] fn case_insensitive() { assert_eq!( runner().ok("a {b: calc(pI)}\n"), "a {\ \n b: 3.1415926536;\ \n}\n" ); } #[test] fn equals_max_precision() { assert_eq!( runner().ok( "// Verify that pi is equal to the maximum precision representable in a double.\ \na {b: calc(pi) == 3.141592653589793}\n" ), "a {\ \n b: true;\ \n}\n" ); } mod math { #[allow(unused)] use super::runner; #[test] fn simplified() { assert_eq!( runner().ok("a {b: calc(pi * 2)}\n"), "a {\ \n b: 6.2831853072;\ \n}\n" ); } #[test] fn unsimplified() { assert_eq!( runner().ok("a {b: calc(pi * (1% + 1px))}\n"), "a {\ \n b: calc(3.1415926536 * (1% + 1px));\ \n}\n" ); } } } mod precedence { #[allow(unused)] use super::runner; mod after_divide { #[allow(unused)] use super::runner; #[test] fn no_unit() { assert_eq!( runner().ok("a {b: calc(var(--c) / infinity)}\n"), "a {\ \n b: calc(var(--c) / infinity);\ \n}\n" ); } #[test] fn unit() { assert_eq!( runner().ok("a {b: calc(var(--c) / (infinity * 1px))}\n"), "a {\ \n b: calc(var(--c) / (infinity * 1px));\ \n}\n" ); } } #[test] fn after_minus() { assert_eq!( runner().ok("a {b: calc(1% - (infinity * 1px))}\n"), "a {\ \n b: calc(1% - infinity * 1px);\ \n}\n" ); } #[test] fn after_plus() { assert_eq!( runner().ok("a {b: calc(1% + (infinity * 1px))}\n"), "a {\ \n b: calc(1% + infinity * 1px);\ \n}\n" ); } #[test] fn after_times() { assert_eq!( runner().ok("a {b: calc(var(--c) * (infinity * 1px))}\n"), "a {\ \n b: calc(var(--c) * infinity * 1px);\ \n}\n" ); } } mod undefined { #[allow(unused)] use super::runner; #[test] fn alone() { assert_eq!( runner().ok("a {b: calc(c)}\n"), "a {\ \n b: calc(c);\ \n}\n" ); } #[test] fn math() { assert_eq!( runner().ok("a {b: calc(c * 2)}\n"), "a {\ \n b: calc(c * 2);\ \n}\n" ); } } rsass-0.29.0/rsass/tests/spec/values/calculation/calc/error/000077500000000000000000000000001474765622100240325ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/values/calculation/calc/error/complex_units.rs000066400000000000000000000055071474765622100273000ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/calc/error/complex_units.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("complex_units") } mod denominator { #[allow(unused)] use super::runner; #[test] fn from_variable() { assert_eq!( runner().err( "@use \"sass:math\";\ \n$a: math.div(1, 2px);\ \nb {c: calc(1% + $a)}\n" ), "Error: Number calc(0.5 / 1px) isn\'t compatible with CSS calculations.\ \n ,\ \n3 | b {c: calc(1% + $a)}\ \n | ^^^^^^^\ \n \'\ \n input.scss 3:12 root stylesheet", ); } #[test] fn within_calc() { assert_eq!( runner().err( "a {b: calc(1% + 1 / 2px)}\n" ), "Error: Number calc(0.5 / 1px) isn\'t compatible with CSS calculations.\ \n ,\ \n1 | a {b: calc(1% + 1 / 2px)}\ \n | ^^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } } mod multiple_numerator { #[allow(unused)] use super::runner; #[test] fn from_variable() { assert_eq!( runner().err( "$a: 1px * 2px;\ \nb {c: calc(1% + $a)}\n" ), "Error: Number calc(2px * 1px) isn\'t compatible with CSS calculations.\ \n ,\ \n2 | b {c: calc(1% + $a)}\ \n | ^^^^^^^\ \n \'\ \n input.scss 2:12 root stylesheet", ); } #[test] fn within_calc() { assert_eq!( runner().err( "a {b: calc(1% + 1px * 2px)}\n" ), "Error: Number calc(2px * 1px) isn\'t compatible with CSS calculations.\ \n ,\ \n1 | a {b: calc(1% + 1px * 2px)}\ \n | ^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } } mod numerator_and_denominator { #[allow(unused)] use super::runner; #[test] fn from_variable() { assert_eq!( runner().err( "@use \"sass:math\";\ \n$a: math.div(1s, 2px);\ \nb {c: calc(1% + $a)}\n" ), "Error: Number calc(0.5s / 1px) isn\'t compatible with CSS calculations.\ \n ,\ \n3 | b {c: calc(1% + $a)}\ \n | ^^^^^^^\ \n \'\ \n input.scss 3:12 root stylesheet", ); } #[test] fn within_calc() { assert_eq!( runner().err( "a {b: calc(1% + 1s / 2px)}\n" ), "Error: Number calc(0.5s / 1px) isn\'t compatible with CSS calculations.\ \n ,\ \n1 | a {b: calc(1% + 1s / 2px)}\ \n | ^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } } rsass-0.29.0/rsass/tests/spec/values/calculation/calc/error/known_incompatible/000077500000000000000000000000001474765622100277145ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/values/calculation/calc/error/known_incompatible/angle.rs000066400000000000000000000231061474765622100313520ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/calc/error/known_incompatible/angle.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("angle") } mod deg { #[allow(unused)] use super::runner; #[test] fn dpcm() { assert_eq!( runner().err("a {b: calc(1deg + 1dpcm)}\n"), "Error: 1deg and 1dpcm are incompatible.\ \n ,\ \n1 | a {b: calc(1deg + 1dpcm)}\ \n | ^^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dpi() { assert_eq!( runner().err("a {b: calc(1deg + 1dpi)}\n"), "Error: 1deg and 1dpi are incompatible.\ \n ,\ \n1 | a {b: calc(1deg + 1dpi)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dppx() { assert_eq!( runner().err("a {b: calc(1deg + 1dppx)}\n"), "Error: 1deg and 1dppx are incompatible.\ \n ,\ \n1 | a {b: calc(1deg + 1dppx)}\ \n | ^^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn hz() { assert_eq!( runner().err("a {b: calc(1deg + 1Hz)}\n"), "Error: 1deg and 1Hz are incompatible.\ \n ,\ \n1 | a {b: calc(1deg + 1Hz)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn khz() { assert_eq!( runner().err("a {b: calc(1deg + 1kHz)}\n"), "Error: 1deg and 1kHz are incompatible.\ \n ,\ \n1 | a {b: calc(1deg + 1kHz)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn ms() { assert_eq!( runner().err("a {b: calc(1deg + 1ms)}\n"), "Error: 1deg and 1ms are incompatible.\ \n ,\ \n1 | a {b: calc(1deg + 1ms)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn s() { assert_eq!( runner().err("a {b: calc(1deg + 1s)}\n"), "Error: 1deg and 1s are incompatible.\ \n ,\ \n1 | a {b: calc(1deg + 1s)}\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } } mod grad { #[allow(unused)] use super::runner; #[test] fn dpcm() { assert_eq!( runner().err("a {b: calc(1grad + 1dpcm)}\n"), "Error: 1grad and 1dpcm are incompatible.\ \n ,\ \n1 | a {b: calc(1grad + 1dpcm)}\ \n | ^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dpi() { assert_eq!( runner().err("a {b: calc(1grad + 1dpi)}\n"), "Error: 1grad and 1dpi are incompatible.\ \n ,\ \n1 | a {b: calc(1grad + 1dpi)}\ \n | ^^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dppx() { assert_eq!( runner().err("a {b: calc(1grad + 1dppx)}\n"), "Error: 1grad and 1dppx are incompatible.\ \n ,\ \n1 | a {b: calc(1grad + 1dppx)}\ \n | ^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn hz() { assert_eq!( runner().err("a {b: calc(1grad + 1Hz)}\n"), "Error: 1grad and 1Hz are incompatible.\ \n ,\ \n1 | a {b: calc(1grad + 1Hz)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn khz() { assert_eq!( runner().err("a {b: calc(1grad + 1kHz)}\n"), "Error: 1grad and 1kHz are incompatible.\ \n ,\ \n1 | a {b: calc(1grad + 1kHz)}\ \n | ^^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn ms() { assert_eq!( runner().err("a {b: calc(1grad + 1ms)}\n"), "Error: 1grad and 1ms are incompatible.\ \n ,\ \n1 | a {b: calc(1grad + 1ms)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn s() { assert_eq!( runner().err("a {b: calc(1grad + 1s)}\n"), "Error: 1grad and 1s are incompatible.\ \n ,\ \n1 | a {b: calc(1grad + 1s)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } } mod rad { #[allow(unused)] use super::runner; #[test] fn dpcm() { assert_eq!( runner().err("a {b: calc(1rad + 1dpcm)}\n"), "Error: 1rad and 1dpcm are incompatible.\ \n ,\ \n1 | a {b: calc(1rad + 1dpcm)}\ \n | ^^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dpi() { assert_eq!( runner().err("a {b: calc(1rad + 1dpi)}\n"), "Error: 1rad and 1dpi are incompatible.\ \n ,\ \n1 | a {b: calc(1rad + 1dpi)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dppx() { assert_eq!( runner().err("a {b: calc(1rad + 1dppx)}\n"), "Error: 1rad and 1dppx are incompatible.\ \n ,\ \n1 | a {b: calc(1rad + 1dppx)}\ \n | ^^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn hz() { assert_eq!( runner().err("a {b: calc(1rad + 1Hz)}\n"), "Error: 1rad and 1Hz are incompatible.\ \n ,\ \n1 | a {b: calc(1rad + 1Hz)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn khz() { assert_eq!( runner().err("a {b: calc(1rad + 1kHz)}\n"), "Error: 1rad and 1kHz are incompatible.\ \n ,\ \n1 | a {b: calc(1rad + 1kHz)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn ms() { assert_eq!( runner().err("a {b: calc(1rad + 1ms)}\n"), "Error: 1rad and 1ms are incompatible.\ \n ,\ \n1 | a {b: calc(1rad + 1ms)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn s() { assert_eq!( runner().err("a {b: calc(1rad + 1s)}\n"), "Error: 1rad and 1s are incompatible.\ \n ,\ \n1 | a {b: calc(1rad + 1s)}\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } } mod turn { #[allow(unused)] use super::runner; #[test] fn dpcm() { assert_eq!( runner().err("a {b: calc(1turn + 1dpcm)}\n"), "Error: 1turn and 1dpcm are incompatible.\ \n ,\ \n1 | a {b: calc(1turn + 1dpcm)}\ \n | ^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dpi() { assert_eq!( runner().err("a {b: calc(1turn + 1dpi)}\n"), "Error: 1turn and 1dpi are incompatible.\ \n ,\ \n1 | a {b: calc(1turn + 1dpi)}\ \n | ^^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dppx() { assert_eq!( runner().err("a {b: calc(1turn + 1dppx)}\n"), "Error: 1turn and 1dppx are incompatible.\ \n ,\ \n1 | a {b: calc(1turn + 1dppx)}\ \n | ^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn hz() { assert_eq!( runner().err("a {b: calc(1turn + 1Hz)}\n"), "Error: 1turn and 1Hz are incompatible.\ \n ,\ \n1 | a {b: calc(1turn + 1Hz)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn khz() { assert_eq!( runner().err("a {b: calc(1turn + 1kHz)}\n"), "Error: 1turn and 1kHz are incompatible.\ \n ,\ \n1 | a {b: calc(1turn + 1kHz)}\ \n | ^^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn ms() { assert_eq!( runner().err("a {b: calc(1turn + 1ms)}\n"), "Error: 1turn and 1ms are incompatible.\ \n ,\ \n1 | a {b: calc(1turn + 1ms)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn s() { assert_eq!( runner().err("a {b: calc(1turn + 1s)}\n"), "Error: 1turn and 1s are incompatible.\ \n ,\ \n1 | a {b: calc(1turn + 1s)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } } rsass-0.29.0/rsass/tests/spec/values/calculation/calc/error/known_incompatible/complex.rs000066400000000000000000000056741474765622100317450ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/calc/error/known_incompatible/complex.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("complex") } #[test] fn denominator_and_denominators() { assert_eq!( runner().err( "a {b: calc(1/1px + 1/1px/1px)}\n" ), "Error: Number calc(1 / 1px) isn\'t compatible with CSS calculations.\ \n ,\ \n1 | a {b: calc(1/1px + 1/1px/1px)}\ \n | ^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn mismatched_denominators() { assert_eq!( runner().err( "a {b: calc(1/1px/1s + 1/1px/1px)}\n" ), "Error: Number calc(1 / 1px / 1s) isn\'t compatible with CSS calculations.\ \n ,\ \n1 | a {b: calc(1/1px/1s + 1/1px/1px)}\ \n | ^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn mismatched_numerators() { assert_eq!( runner().err( "a {b: calc(1px*1s + 1px*1px)}\n" ), "Error: Number calc(1px * 1s) isn\'t compatible with CSS calculations.\ \n ,\ \n1 | a {b: calc(1px*1s + 1px*1px)}\ \n | ^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn numerator_and_denominator() { assert_eq!( runner().err( "a {b: calc(1px + 1/1px)}\n" ), "Error: Number calc(1 / 1px) isn\'t compatible with CSS calculations.\ \n ,\ \n1 | a {b: calc(1px + 1/1px)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn numerator_and_numerators() { assert_eq!( runner().err( "a {b: calc(1px + 1px*1px)}\n" ), "Error: Number calc(1px * 1px) isn\'t compatible with CSS calculations.\ \n ,\ \n1 | a {b: calc(1px + 1px*1px)}\ \n | ^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } mod unitless { #[allow(unused)] use super::runner; #[test] #[ignore] // wrong error fn and_denominator() { assert_eq!( runner().err( "a {b: calc(1 + 1/1px)}\n" ), "Error: Number calc(1 / 1px) isn\'t compatible with CSS calculations.\ \n ,\ \n1 | a {b: calc(1 + 1/1px)}\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] #[ignore] // missing error fn and_numerator() { assert_eq!( runner().err("a {b: calc(1 + 1px)}\n"), "Error: 1 and 1px are incompatible.\ \n ,\ \n1 | a {b: calc(1 + 1px)}\ \n | ^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } } rsass-0.29.0/rsass/tests/spec/values/calculation/calc/error/known_incompatible/frequency.rs000066400000000000000000000044351474765622100322710ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/calc/error/known_incompatible/frequency.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("frequency") } mod hz { #[allow(unused)] use super::runner; #[test] fn dpcm() { assert_eq!( runner().err("a {b: calc(1Hz + 1dpcm)}\n"), "Error: 1Hz and 1dpcm are incompatible.\ \n ,\ \n1 | a {b: calc(1Hz + 1dpcm)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dpi() { assert_eq!( runner().err("a {b: calc(1Hz + 1dpi)}\n"), "Error: 1Hz and 1dpi are incompatible.\ \n ,\ \n1 | a {b: calc(1Hz + 1dpi)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dppx() { assert_eq!( runner().err("a {b: calc(1Hz + 1dppx)}\n"), "Error: 1Hz and 1dppx are incompatible.\ \n ,\ \n1 | a {b: calc(1Hz + 1dppx)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } } mod khz { #[allow(unused)] use super::runner; #[test] fn dpcm() { assert_eq!( runner().err("a {b: calc(1kHz + 1dpcm)}\n"), "Error: 1kHz and 1dpcm are incompatible.\ \n ,\ \n1 | a {b: calc(1kHz + 1dpcm)}\ \n | ^^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dpi() { assert_eq!( runner().err("a {b: calc(1kHz + 1dpi)}\n"), "Error: 1kHz and 1dpi are incompatible.\ \n ,\ \n1 | a {b: calc(1kHz + 1dpi)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dppx() { assert_eq!( runner().err("a {b: calc(1kHz + 1dppx)}\n"), "Error: 1kHz and 1dppx are incompatible.\ \n ,\ \n1 | a {b: calc(1kHz + 1dppx)}\ \n | ^^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } } rsass-0.29.0/rsass/tests/spec/values/calculation/calc/error/known_incompatible/length/000077500000000000000000000000001474765622100311755ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/values/calculation/calc/error/known_incompatible/length/ch.rs000066400000000000000000000067031474765622100321430ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/calc/error/known_incompatible/length/ch.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("ch") } #[test] fn deg() { assert_eq!( runner().err("a {b: calc(1ch + 1deg)}\n"), "Error: 1ch and 1deg are incompatible.\ \n ,\ \n1 | a {b: calc(1ch + 1deg)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dpcm() { assert_eq!( runner().err("a {b: calc(1ch + 1dpcm)}\n"), "Error: 1ch and 1dpcm are incompatible.\ \n ,\ \n1 | a {b: calc(1ch + 1dpcm)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dpi() { assert_eq!( runner().err("a {b: calc(1ch + 1dpi)}\n"), "Error: 1ch and 1dpi are incompatible.\ \n ,\ \n1 | a {b: calc(1ch + 1dpi)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dppx() { assert_eq!( runner().err("a {b: calc(1ch + 1dppx)}\n"), "Error: 1ch and 1dppx are incompatible.\ \n ,\ \n1 | a {b: calc(1ch + 1dppx)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn grad() { assert_eq!( runner().err("a {b: calc(1ch + 1grad)}\n"), "Error: 1ch and 1grad are incompatible.\ \n ,\ \n1 | a {b: calc(1ch + 1grad)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn hz() { assert_eq!( runner().err("a {b: calc(1ch + 1Hz)}\n"), "Error: 1ch and 1Hz are incompatible.\ \n ,\ \n1 | a {b: calc(1ch + 1Hz)}\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn khz() { assert_eq!( runner().err("a {b: calc(1ch + 1kHz)}\n"), "Error: 1ch and 1kHz are incompatible.\ \n ,\ \n1 | a {b: calc(1ch + 1kHz)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn ms() { assert_eq!( runner().err("a {b: calc(1ch + 1ms)}\n"), "Error: 1ch and 1ms are incompatible.\ \n ,\ \n1 | a {b: calc(1ch + 1ms)}\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn rad() { assert_eq!( runner().err("a {b: calc(1ch + 1rad)}\n"), "Error: 1ch and 1rad are incompatible.\ \n ,\ \n1 | a {b: calc(1ch + 1rad)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn s() { assert_eq!( runner().err("a {b: calc(1ch + 1s)}\n"), "Error: 1ch and 1s are incompatible.\ \n ,\ \n1 | a {b: calc(1ch + 1s)}\ \n | ^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn turn() { assert_eq!( runner().err("a {b: calc(1ch + 1turn)}\n"), "Error: 1ch and 1turn are incompatible.\ \n ,\ \n1 | a {b: calc(1ch + 1turn)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/values/calculation/calc/error/known_incompatible/length/cm.rs000066400000000000000000000067031474765622100321500ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/calc/error/known_incompatible/length/cm.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("cm") } #[test] fn deg() { assert_eq!( runner().err("a {b: calc(1cm + 1deg)}\n"), "Error: 1cm and 1deg are incompatible.\ \n ,\ \n1 | a {b: calc(1cm + 1deg)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dpcm() { assert_eq!( runner().err("a {b: calc(1cm + 1dpcm)}\n"), "Error: 1cm and 1dpcm are incompatible.\ \n ,\ \n1 | a {b: calc(1cm + 1dpcm)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dpi() { assert_eq!( runner().err("a {b: calc(1cm + 1dpi)}\n"), "Error: 1cm and 1dpi are incompatible.\ \n ,\ \n1 | a {b: calc(1cm + 1dpi)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dppx() { assert_eq!( runner().err("a {b: calc(1cm + 1dppx)}\n"), "Error: 1cm and 1dppx are incompatible.\ \n ,\ \n1 | a {b: calc(1cm + 1dppx)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn grad() { assert_eq!( runner().err("a {b: calc(1cm + 1grad)}\n"), "Error: 1cm and 1grad are incompatible.\ \n ,\ \n1 | a {b: calc(1cm + 1grad)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn hz() { assert_eq!( runner().err("a {b: calc(1cm + 1Hz)}\n"), "Error: 1cm and 1Hz are incompatible.\ \n ,\ \n1 | a {b: calc(1cm + 1Hz)}\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn khz() { assert_eq!( runner().err("a {b: calc(1cm + 1kHz)}\n"), "Error: 1cm and 1kHz are incompatible.\ \n ,\ \n1 | a {b: calc(1cm + 1kHz)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn ms() { assert_eq!( runner().err("a {b: calc(1cm + 1ms)}\n"), "Error: 1cm and 1ms are incompatible.\ \n ,\ \n1 | a {b: calc(1cm + 1ms)}\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn rad() { assert_eq!( runner().err("a {b: calc(1cm + 1rad)}\n"), "Error: 1cm and 1rad are incompatible.\ \n ,\ \n1 | a {b: calc(1cm + 1rad)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn s() { assert_eq!( runner().err("a {b: calc(1cm + 1s)}\n"), "Error: 1cm and 1s are incompatible.\ \n ,\ \n1 | a {b: calc(1cm + 1s)}\ \n | ^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn turn() { assert_eq!( runner().err("a {b: calc(1cm + 1turn)}\n"), "Error: 1cm and 1turn are incompatible.\ \n ,\ \n1 | a {b: calc(1cm + 1turn)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/values/calculation/calc/error/known_incompatible/length/em.rs000066400000000000000000000067031474765622100321520ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/calc/error/known_incompatible/length/em.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("em") } #[test] fn deg() { assert_eq!( runner().err("a {b: calc(1em + 1deg)}\n"), "Error: 1em and 1deg are incompatible.\ \n ,\ \n1 | a {b: calc(1em + 1deg)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dpcm() { assert_eq!( runner().err("a {b: calc(1em + 1dpcm)}\n"), "Error: 1em and 1dpcm are incompatible.\ \n ,\ \n1 | a {b: calc(1em + 1dpcm)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dpi() { assert_eq!( runner().err("a {b: calc(1em + 1dpi)}\n"), "Error: 1em and 1dpi are incompatible.\ \n ,\ \n1 | a {b: calc(1em + 1dpi)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dppx() { assert_eq!( runner().err("a {b: calc(1em + 1dppx)}\n"), "Error: 1em and 1dppx are incompatible.\ \n ,\ \n1 | a {b: calc(1em + 1dppx)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn grad() { assert_eq!( runner().err("a {b: calc(1em + 1grad)}\n"), "Error: 1em and 1grad are incompatible.\ \n ,\ \n1 | a {b: calc(1em + 1grad)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn hz() { assert_eq!( runner().err("a {b: calc(1em + 1Hz)}\n"), "Error: 1em and 1Hz are incompatible.\ \n ,\ \n1 | a {b: calc(1em + 1Hz)}\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn khz() { assert_eq!( runner().err("a {b: calc(1em + 1kHz)}\n"), "Error: 1em and 1kHz are incompatible.\ \n ,\ \n1 | a {b: calc(1em + 1kHz)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn ms() { assert_eq!( runner().err("a {b: calc(1em + 1ms)}\n"), "Error: 1em and 1ms are incompatible.\ \n ,\ \n1 | a {b: calc(1em + 1ms)}\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn rad() { assert_eq!( runner().err("a {b: calc(1em + 1rad)}\n"), "Error: 1em and 1rad are incompatible.\ \n ,\ \n1 | a {b: calc(1em + 1rad)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn s() { assert_eq!( runner().err("a {b: calc(1em + 1s)}\n"), "Error: 1em and 1s are incompatible.\ \n ,\ \n1 | a {b: calc(1em + 1s)}\ \n | ^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn turn() { assert_eq!( runner().err("a {b: calc(1em + 1turn)}\n"), "Error: 1em and 1turn are incompatible.\ \n ,\ \n1 | a {b: calc(1em + 1turn)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/values/calculation/calc/error/known_incompatible/length/ex.rs000066400000000000000000000067031474765622100321650ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/calc/error/known_incompatible/length/ex.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("ex") } #[test] fn deg() { assert_eq!( runner().err("a {b: calc(1ex + 1deg)}\n"), "Error: 1ex and 1deg are incompatible.\ \n ,\ \n1 | a {b: calc(1ex + 1deg)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dpcm() { assert_eq!( runner().err("a {b: calc(1ex + 1dpcm)}\n"), "Error: 1ex and 1dpcm are incompatible.\ \n ,\ \n1 | a {b: calc(1ex + 1dpcm)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dpi() { assert_eq!( runner().err("a {b: calc(1ex + 1dpi)}\n"), "Error: 1ex and 1dpi are incompatible.\ \n ,\ \n1 | a {b: calc(1ex + 1dpi)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dppx() { assert_eq!( runner().err("a {b: calc(1ex + 1dppx)}\n"), "Error: 1ex and 1dppx are incompatible.\ \n ,\ \n1 | a {b: calc(1ex + 1dppx)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn grad() { assert_eq!( runner().err("a {b: calc(1ex + 1grad)}\n"), "Error: 1ex and 1grad are incompatible.\ \n ,\ \n1 | a {b: calc(1ex + 1grad)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn hz() { assert_eq!( runner().err("a {b: calc(1ex + 1Hz)}\n"), "Error: 1ex and 1Hz are incompatible.\ \n ,\ \n1 | a {b: calc(1ex + 1Hz)}\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn khz() { assert_eq!( runner().err("a {b: calc(1ex + 1kHz)}\n"), "Error: 1ex and 1kHz are incompatible.\ \n ,\ \n1 | a {b: calc(1ex + 1kHz)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn ms() { assert_eq!( runner().err("a {b: calc(1ex + 1ms)}\n"), "Error: 1ex and 1ms are incompatible.\ \n ,\ \n1 | a {b: calc(1ex + 1ms)}\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn rad() { assert_eq!( runner().err("a {b: calc(1ex + 1rad)}\n"), "Error: 1ex and 1rad are incompatible.\ \n ,\ \n1 | a {b: calc(1ex + 1rad)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn s() { assert_eq!( runner().err("a {b: calc(1ex + 1s)}\n"), "Error: 1ex and 1s are incompatible.\ \n ,\ \n1 | a {b: calc(1ex + 1s)}\ \n | ^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn turn() { assert_eq!( runner().err("a {b: calc(1ex + 1turn)}\n"), "Error: 1ex and 1turn are incompatible.\ \n ,\ \n1 | a {b: calc(1ex + 1turn)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/values/calculation/calc/error/known_incompatible/length/mm.rs000066400000000000000000000067031474765622100321620ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/calc/error/known_incompatible/length/mm.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("mm") } #[test] fn deg() { assert_eq!( runner().err("a {b: calc(1mm + 1deg)}\n"), "Error: 1mm and 1deg are incompatible.\ \n ,\ \n1 | a {b: calc(1mm + 1deg)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dpcm() { assert_eq!( runner().err("a {b: calc(1mm + 1dpcm)}\n"), "Error: 1mm and 1dpcm are incompatible.\ \n ,\ \n1 | a {b: calc(1mm + 1dpcm)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dpi() { assert_eq!( runner().err("a {b: calc(1mm + 1dpi)}\n"), "Error: 1mm and 1dpi are incompatible.\ \n ,\ \n1 | a {b: calc(1mm + 1dpi)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dppx() { assert_eq!( runner().err("a {b: calc(1mm + 1dppx)}\n"), "Error: 1mm and 1dppx are incompatible.\ \n ,\ \n1 | a {b: calc(1mm + 1dppx)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn grad() { assert_eq!( runner().err("a {b: calc(1mm + 1grad)}\n"), "Error: 1mm and 1grad are incompatible.\ \n ,\ \n1 | a {b: calc(1mm + 1grad)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn hz() { assert_eq!( runner().err("a {b: calc(1mm + 1Hz)}\n"), "Error: 1mm and 1Hz are incompatible.\ \n ,\ \n1 | a {b: calc(1mm + 1Hz)}\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn khz() { assert_eq!( runner().err("a {b: calc(1mm + 1kHz)}\n"), "Error: 1mm and 1kHz are incompatible.\ \n ,\ \n1 | a {b: calc(1mm + 1kHz)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn ms() { assert_eq!( runner().err("a {b: calc(1mm + 1ms)}\n"), "Error: 1mm and 1ms are incompatible.\ \n ,\ \n1 | a {b: calc(1mm + 1ms)}\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn rad() { assert_eq!( runner().err("a {b: calc(1mm + 1rad)}\n"), "Error: 1mm and 1rad are incompatible.\ \n ,\ \n1 | a {b: calc(1mm + 1rad)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn s() { assert_eq!( runner().err("a {b: calc(1mm + 1s)}\n"), "Error: 1mm and 1s are incompatible.\ \n ,\ \n1 | a {b: calc(1mm + 1s)}\ \n | ^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn turn() { assert_eq!( runner().err("a {b: calc(1mm + 1turn)}\n"), "Error: 1mm and 1turn are incompatible.\ \n ,\ \n1 | a {b: calc(1mm + 1turn)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/values/calculation/calc/error/known_incompatible/length/mod.rs000066400000000000000000000005251474765622100323240ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/calc/error/known_incompatible/length" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("length") } mod ch; mod cm; mod em; mod ex; mod test_in; mod mm; mod pc; mod pt; mod px; mod q; mod rem; mod vh; mod vmax; mod vmin; mod vw; rsass-0.29.0/rsass/tests/spec/values/calculation/calc/error/known_incompatible/length/pc.rs000066400000000000000000000067031474765622100321530ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/calc/error/known_incompatible/length/pc.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("pc") } #[test] fn deg() { assert_eq!( runner().err("a {b: calc(1pc + 1deg)}\n"), "Error: 1pc and 1deg are incompatible.\ \n ,\ \n1 | a {b: calc(1pc + 1deg)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dpcm() { assert_eq!( runner().err("a {b: calc(1pc + 1dpcm)}\n"), "Error: 1pc and 1dpcm are incompatible.\ \n ,\ \n1 | a {b: calc(1pc + 1dpcm)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dpi() { assert_eq!( runner().err("a {b: calc(1pc + 1dpi)}\n"), "Error: 1pc and 1dpi are incompatible.\ \n ,\ \n1 | a {b: calc(1pc + 1dpi)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dppx() { assert_eq!( runner().err("a {b: calc(1pc + 1dppx)}\n"), "Error: 1pc and 1dppx are incompatible.\ \n ,\ \n1 | a {b: calc(1pc + 1dppx)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn grad() { assert_eq!( runner().err("a {b: calc(1pc + 1grad)}\n"), "Error: 1pc and 1grad are incompatible.\ \n ,\ \n1 | a {b: calc(1pc + 1grad)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn hz() { assert_eq!( runner().err("a {b: calc(1pc + 1Hz)}\n"), "Error: 1pc and 1Hz are incompatible.\ \n ,\ \n1 | a {b: calc(1pc + 1Hz)}\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn khz() { assert_eq!( runner().err("a {b: calc(1pc + 1kHz)}\n"), "Error: 1pc and 1kHz are incompatible.\ \n ,\ \n1 | a {b: calc(1pc + 1kHz)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn ms() { assert_eq!( runner().err("a {b: calc(1pc + 1ms)}\n"), "Error: 1pc and 1ms are incompatible.\ \n ,\ \n1 | a {b: calc(1pc + 1ms)}\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn rad() { assert_eq!( runner().err("a {b: calc(1pc + 1rad)}\n"), "Error: 1pc and 1rad are incompatible.\ \n ,\ \n1 | a {b: calc(1pc + 1rad)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn s() { assert_eq!( runner().err("a {b: calc(1pc + 1s)}\n"), "Error: 1pc and 1s are incompatible.\ \n ,\ \n1 | a {b: calc(1pc + 1s)}\ \n | ^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn turn() { assert_eq!( runner().err("a {b: calc(1pc + 1turn)}\n"), "Error: 1pc and 1turn are incompatible.\ \n ,\ \n1 | a {b: calc(1pc + 1turn)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/values/calculation/calc/error/known_incompatible/length/pt.rs000066400000000000000000000067031474765622100321740ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/calc/error/known_incompatible/length/pt.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("pt") } #[test] fn deg() { assert_eq!( runner().err("a {b: calc(1pt + 1deg)}\n"), "Error: 1pt and 1deg are incompatible.\ \n ,\ \n1 | a {b: calc(1pt + 1deg)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dpcm() { assert_eq!( runner().err("a {b: calc(1pt + 1dpcm)}\n"), "Error: 1pt and 1dpcm are incompatible.\ \n ,\ \n1 | a {b: calc(1pt + 1dpcm)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dpi() { assert_eq!( runner().err("a {b: calc(1pt + 1dpi)}\n"), "Error: 1pt and 1dpi are incompatible.\ \n ,\ \n1 | a {b: calc(1pt + 1dpi)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dppx() { assert_eq!( runner().err("a {b: calc(1pt + 1dppx)}\n"), "Error: 1pt and 1dppx are incompatible.\ \n ,\ \n1 | a {b: calc(1pt + 1dppx)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn grad() { assert_eq!( runner().err("a {b: calc(1pt + 1grad)}\n"), "Error: 1pt and 1grad are incompatible.\ \n ,\ \n1 | a {b: calc(1pt + 1grad)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn hz() { assert_eq!( runner().err("a {b: calc(1pt + 1Hz)}\n"), "Error: 1pt and 1Hz are incompatible.\ \n ,\ \n1 | a {b: calc(1pt + 1Hz)}\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn khz() { assert_eq!( runner().err("a {b: calc(1pt + 1kHz)}\n"), "Error: 1pt and 1kHz are incompatible.\ \n ,\ \n1 | a {b: calc(1pt + 1kHz)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn ms() { assert_eq!( runner().err("a {b: calc(1pt + 1ms)}\n"), "Error: 1pt and 1ms are incompatible.\ \n ,\ \n1 | a {b: calc(1pt + 1ms)}\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn rad() { assert_eq!( runner().err("a {b: calc(1pt + 1rad)}\n"), "Error: 1pt and 1rad are incompatible.\ \n ,\ \n1 | a {b: calc(1pt + 1rad)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn s() { assert_eq!( runner().err("a {b: calc(1pt + 1s)}\n"), "Error: 1pt and 1s are incompatible.\ \n ,\ \n1 | a {b: calc(1pt + 1s)}\ \n | ^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn turn() { assert_eq!( runner().err("a {b: calc(1pt + 1turn)}\n"), "Error: 1pt and 1turn are incompatible.\ \n ,\ \n1 | a {b: calc(1pt + 1turn)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/values/calculation/calc/error/known_incompatible/length/px.rs000066400000000000000000000067031474765622100322000ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/calc/error/known_incompatible/length/px.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("px") } #[test] fn deg() { assert_eq!( runner().err("a {b: calc(1px + 1deg)}\n"), "Error: 1px and 1deg are incompatible.\ \n ,\ \n1 | a {b: calc(1px + 1deg)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dpcm() { assert_eq!( runner().err("a {b: calc(1px + 1dpcm)}\n"), "Error: 1px and 1dpcm are incompatible.\ \n ,\ \n1 | a {b: calc(1px + 1dpcm)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dpi() { assert_eq!( runner().err("a {b: calc(1px + 1dpi)}\n"), "Error: 1px and 1dpi are incompatible.\ \n ,\ \n1 | a {b: calc(1px + 1dpi)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dppx() { assert_eq!( runner().err("a {b: calc(1px + 1dppx)}\n"), "Error: 1px and 1dppx are incompatible.\ \n ,\ \n1 | a {b: calc(1px + 1dppx)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn grad() { assert_eq!( runner().err("a {b: calc(1px + 1grad)}\n"), "Error: 1px and 1grad are incompatible.\ \n ,\ \n1 | a {b: calc(1px + 1grad)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn hz() { assert_eq!( runner().err("a {b: calc(1px + 1Hz)}\n"), "Error: 1px and 1Hz are incompatible.\ \n ,\ \n1 | a {b: calc(1px + 1Hz)}\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn khz() { assert_eq!( runner().err("a {b: calc(1px + 1kHz)}\n"), "Error: 1px and 1kHz are incompatible.\ \n ,\ \n1 | a {b: calc(1px + 1kHz)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn ms() { assert_eq!( runner().err("a {b: calc(1px + 1ms)}\n"), "Error: 1px and 1ms are incompatible.\ \n ,\ \n1 | a {b: calc(1px + 1ms)}\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn rad() { assert_eq!( runner().err("a {b: calc(1px + 1rad)}\n"), "Error: 1px and 1rad are incompatible.\ \n ,\ \n1 | a {b: calc(1px + 1rad)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn s() { assert_eq!( runner().err("a {b: calc(1px + 1s)}\n"), "Error: 1px and 1s are incompatible.\ \n ,\ \n1 | a {b: calc(1px + 1s)}\ \n | ^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn turn() { assert_eq!( runner().err("a {b: calc(1px + 1turn)}\n"), "Error: 1px and 1turn are incompatible.\ \n ,\ \n1 | a {b: calc(1px + 1turn)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/values/calculation/calc/error/known_incompatible/length/q.rs000066400000000000000000000066251474765622100320140ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/calc/error/known_incompatible/length/q.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("q") } #[test] fn deg() { assert_eq!( runner().err("a {b: calc(1Q + 1deg)}\n"), "Error: 1Q and 1deg are incompatible.\ \n ,\ \n1 | a {b: calc(1Q + 1deg)}\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dpcm() { assert_eq!( runner().err("a {b: calc(1Q + 1dpcm)}\n"), "Error: 1Q and 1dpcm are incompatible.\ \n ,\ \n1 | a {b: calc(1Q + 1dpcm)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dpi() { assert_eq!( runner().err("a {b: calc(1Q + 1dpi)}\n"), "Error: 1Q and 1dpi are incompatible.\ \n ,\ \n1 | a {b: calc(1Q + 1dpi)}\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dppx() { assert_eq!( runner().err("a {b: calc(1Q + 1dppx)}\n"), "Error: 1Q and 1dppx are incompatible.\ \n ,\ \n1 | a {b: calc(1Q + 1dppx)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn grad() { assert_eq!( runner().err("a {b: calc(1Q + 1grad)}\n"), "Error: 1Q and 1grad are incompatible.\ \n ,\ \n1 | a {b: calc(1Q + 1grad)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn hz() { assert_eq!( runner().err("a {b: calc(1Q + 1Hz)}\n"), "Error: 1Q and 1Hz are incompatible.\ \n ,\ \n1 | a {b: calc(1Q + 1Hz)}\ \n | ^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn khz() { assert_eq!( runner().err("a {b: calc(1Q + 1kHz)}\n"), "Error: 1Q and 1kHz are incompatible.\ \n ,\ \n1 | a {b: calc(1Q + 1kHz)}\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn ms() { assert_eq!( runner().err("a {b: calc(1Q + 1ms)}\n"), "Error: 1Q and 1ms are incompatible.\ \n ,\ \n1 | a {b: calc(1Q + 1ms)}\ \n | ^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn rad() { assert_eq!( runner().err("a {b: calc(1Q + 1rad)}\n"), "Error: 1Q and 1rad are incompatible.\ \n ,\ \n1 | a {b: calc(1Q + 1rad)}\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn s() { assert_eq!( runner().err("a {b: calc(1Q + 1s)}\n"), "Error: 1Q and 1s are incompatible.\ \n ,\ \n1 | a {b: calc(1Q + 1s)}\ \n | ^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn turn() { assert_eq!( runner().err("a {b: calc(1Q + 1turn)}\n"), "Error: 1Q and 1turn are incompatible.\ \n ,\ \n1 | a {b: calc(1Q + 1turn)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/values/calculation/calc/error/known_incompatible/length/rem.rs000066400000000000000000000067611474765622100323400ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/calc/error/known_incompatible/length/rem.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("rem") } #[test] fn deg() { assert_eq!( runner().err("a {b: calc(1rem + 1deg)}\n"), "Error: 1rem and 1deg are incompatible.\ \n ,\ \n1 | a {b: calc(1rem + 1deg)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dpcm() { assert_eq!( runner().err("a {b: calc(1rem + 1dpcm)}\n"), "Error: 1rem and 1dpcm are incompatible.\ \n ,\ \n1 | a {b: calc(1rem + 1dpcm)}\ \n | ^^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dpi() { assert_eq!( runner().err("a {b: calc(1rem + 1dpi)}\n"), "Error: 1rem and 1dpi are incompatible.\ \n ,\ \n1 | a {b: calc(1rem + 1dpi)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dppx() { assert_eq!( runner().err("a {b: calc(1rem + 1dppx)}\n"), "Error: 1rem and 1dppx are incompatible.\ \n ,\ \n1 | a {b: calc(1rem + 1dppx)}\ \n | ^^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn grad() { assert_eq!( runner().err("a {b: calc(1rem + 1grad)}\n"), "Error: 1rem and 1grad are incompatible.\ \n ,\ \n1 | a {b: calc(1rem + 1grad)}\ \n | ^^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn hz() { assert_eq!( runner().err("a {b: calc(1rem + 1Hz)}\n"), "Error: 1rem and 1Hz are incompatible.\ \n ,\ \n1 | a {b: calc(1rem + 1Hz)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn khz() { assert_eq!( runner().err("a {b: calc(1rem + 1kHz)}\n"), "Error: 1rem and 1kHz are incompatible.\ \n ,\ \n1 | a {b: calc(1rem + 1kHz)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn ms() { assert_eq!( runner().err("a {b: calc(1rem + 1ms)}\n"), "Error: 1rem and 1ms are incompatible.\ \n ,\ \n1 | a {b: calc(1rem + 1ms)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn rad() { assert_eq!( runner().err("a {b: calc(1rem + 1rad)}\n"), "Error: 1rem and 1rad are incompatible.\ \n ,\ \n1 | a {b: calc(1rem + 1rad)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn s() { assert_eq!( runner().err("a {b: calc(1rem + 1s)}\n"), "Error: 1rem and 1s are incompatible.\ \n ,\ \n1 | a {b: calc(1rem + 1s)}\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn turn() { assert_eq!( runner().err("a {b: calc(1rem + 1turn)}\n"), "Error: 1rem and 1turn are incompatible.\ \n ,\ \n1 | a {b: calc(1rem + 1turn)}\ \n | ^^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/values/calculation/calc/error/known_incompatible/length/test_in.rs000066400000000000000000000067031474765622100332160ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/calc/error/known_incompatible/length/in.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("in") } #[test] fn deg() { assert_eq!( runner().err("a {b: calc(1in + 1deg)}\n"), "Error: 1in and 1deg are incompatible.\ \n ,\ \n1 | a {b: calc(1in + 1deg)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dpcm() { assert_eq!( runner().err("a {b: calc(1in + 1dpcm)}\n"), "Error: 1in and 1dpcm are incompatible.\ \n ,\ \n1 | a {b: calc(1in + 1dpcm)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dpi() { assert_eq!( runner().err("a {b: calc(1in + 1dpi)}\n"), "Error: 1in and 1dpi are incompatible.\ \n ,\ \n1 | a {b: calc(1in + 1dpi)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dppx() { assert_eq!( runner().err("a {b: calc(1in + 1dppx)}\n"), "Error: 1in and 1dppx are incompatible.\ \n ,\ \n1 | a {b: calc(1in + 1dppx)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn grad() { assert_eq!( runner().err("a {b: calc(1in + 1grad)}\n"), "Error: 1in and 1grad are incompatible.\ \n ,\ \n1 | a {b: calc(1in + 1grad)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn hz() { assert_eq!( runner().err("a {b: calc(1in + 1Hz)}\n"), "Error: 1in and 1Hz are incompatible.\ \n ,\ \n1 | a {b: calc(1in + 1Hz)}\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn khz() { assert_eq!( runner().err("a {b: calc(1in + 1kHz)}\n"), "Error: 1in and 1kHz are incompatible.\ \n ,\ \n1 | a {b: calc(1in + 1kHz)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn ms() { assert_eq!( runner().err("a {b: calc(1in + 1ms)}\n"), "Error: 1in and 1ms are incompatible.\ \n ,\ \n1 | a {b: calc(1in + 1ms)}\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn rad() { assert_eq!( runner().err("a {b: calc(1in + 1rad)}\n"), "Error: 1in and 1rad are incompatible.\ \n ,\ \n1 | a {b: calc(1in + 1rad)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn s() { assert_eq!( runner().err("a {b: calc(1in + 1s)}\n"), "Error: 1in and 1s are incompatible.\ \n ,\ \n1 | a {b: calc(1in + 1s)}\ \n | ^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn turn() { assert_eq!( runner().err("a {b: calc(1in + 1turn)}\n"), "Error: 1in and 1turn are incompatible.\ \n ,\ \n1 | a {b: calc(1in + 1turn)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/values/calculation/calc/error/known_incompatible/length/vh.rs000066400000000000000000000067031474765622100321660ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/calc/error/known_incompatible/length/vh.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("vh") } #[test] fn deg() { assert_eq!( runner().err("a {b: calc(1vh + 1deg)}\n"), "Error: 1vh and 1deg are incompatible.\ \n ,\ \n1 | a {b: calc(1vh + 1deg)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dpcm() { assert_eq!( runner().err("a {b: calc(1vh + 1dpcm)}\n"), "Error: 1vh and 1dpcm are incompatible.\ \n ,\ \n1 | a {b: calc(1vh + 1dpcm)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dpi() { assert_eq!( runner().err("a {b: calc(1vh + 1dpi)}\n"), "Error: 1vh and 1dpi are incompatible.\ \n ,\ \n1 | a {b: calc(1vh + 1dpi)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dppx() { assert_eq!( runner().err("a {b: calc(1vh + 1dppx)}\n"), "Error: 1vh and 1dppx are incompatible.\ \n ,\ \n1 | a {b: calc(1vh + 1dppx)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn grad() { assert_eq!( runner().err("a {b: calc(1vh + 1grad)}\n"), "Error: 1vh and 1grad are incompatible.\ \n ,\ \n1 | a {b: calc(1vh + 1grad)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn hz() { assert_eq!( runner().err("a {b: calc(1vh + 1Hz)}\n"), "Error: 1vh and 1Hz are incompatible.\ \n ,\ \n1 | a {b: calc(1vh + 1Hz)}\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn khz() { assert_eq!( runner().err("a {b: calc(1vh + 1kHz)}\n"), "Error: 1vh and 1kHz are incompatible.\ \n ,\ \n1 | a {b: calc(1vh + 1kHz)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn ms() { assert_eq!( runner().err("a {b: calc(1vh + 1ms)}\n"), "Error: 1vh and 1ms are incompatible.\ \n ,\ \n1 | a {b: calc(1vh + 1ms)}\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn rad() { assert_eq!( runner().err("a {b: calc(1vh + 1rad)}\n"), "Error: 1vh and 1rad are incompatible.\ \n ,\ \n1 | a {b: calc(1vh + 1rad)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn s() { assert_eq!( runner().err("a {b: calc(1vh + 1s)}\n"), "Error: 1vh and 1s are incompatible.\ \n ,\ \n1 | a {b: calc(1vh + 1s)}\ \n | ^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn turn() { assert_eq!( runner().err("a {b: calc(1vh + 1turn)}\n"), "Error: 1vh and 1turn are incompatible.\ \n ,\ \n1 | a {b: calc(1vh + 1turn)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/values/calculation/calc/error/known_incompatible/length/vmax.rs000066400000000000000000000070371474765622100325250ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/calc/error/known_incompatible/length/vmax.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("vmax") } #[test] fn deg() { assert_eq!( runner().err("a {b: calc(1vmax + 1deg)}\n"), "Error: 1vmax and 1deg are incompatible.\ \n ,\ \n1 | a {b: calc(1vmax + 1deg)}\ \n | ^^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dpcm() { assert_eq!( runner().err("a {b: calc(1vmax + 1dpcm)}\n"), "Error: 1vmax and 1dpcm are incompatible.\ \n ,\ \n1 | a {b: calc(1vmax + 1dpcm)}\ \n | ^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dpi() { assert_eq!( runner().err("a {b: calc(1vmax + 1dpi)}\n"), "Error: 1vmax and 1dpi are incompatible.\ \n ,\ \n1 | a {b: calc(1vmax + 1dpi)}\ \n | ^^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dppx() { assert_eq!( runner().err("a {b: calc(1vmax + 1dppx)}\n"), "Error: 1vmax and 1dppx are incompatible.\ \n ,\ \n1 | a {b: calc(1vmax + 1dppx)}\ \n | ^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn grad() { assert_eq!( runner().err("a {b: calc(1vmax + 1grad)}\n"), "Error: 1vmax and 1grad are incompatible.\ \n ,\ \n1 | a {b: calc(1vmax + 1grad)}\ \n | ^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn hz() { assert_eq!( runner().err("a {b: calc(1vmax + 1Hz)}\n"), "Error: 1vmax and 1Hz are incompatible.\ \n ,\ \n1 | a {b: calc(1vmax + 1Hz)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn khz() { assert_eq!( runner().err("a {b: calc(1vmax + 1kHz)}\n"), "Error: 1vmax and 1kHz are incompatible.\ \n ,\ \n1 | a {b: calc(1vmax + 1kHz)}\ \n | ^^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn ms() { assert_eq!( runner().err("a {b: calc(1vmax + 1ms)}\n"), "Error: 1vmax and 1ms are incompatible.\ \n ,\ \n1 | a {b: calc(1vmax + 1ms)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn rad() { assert_eq!( runner().err("a {b: calc(1vmax + 1rad)}\n"), "Error: 1vmax and 1rad are incompatible.\ \n ,\ \n1 | a {b: calc(1vmax + 1rad)}\ \n | ^^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn s() { assert_eq!( runner().err("a {b: calc(1vmax + 1s)}\n"), "Error: 1vmax and 1s are incompatible.\ \n ,\ \n1 | a {b: calc(1vmax + 1s)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn turn() { assert_eq!( runner().err("a {b: calc(1vmax + 1turn)}\n"), "Error: 1vmax and 1turn are incompatible.\ \n ,\ \n1 | a {b: calc(1vmax + 1turn)}\ \n | ^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/values/calculation/calc/error/known_incompatible/length/vmin.rs000066400000000000000000000070371474765622100325230ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/calc/error/known_incompatible/length/vmin.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("vmin") } #[test] fn deg() { assert_eq!( runner().err("a {b: calc(1vmin + 1deg)}\n"), "Error: 1vmin and 1deg are incompatible.\ \n ,\ \n1 | a {b: calc(1vmin + 1deg)}\ \n | ^^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dpcm() { assert_eq!( runner().err("a {b: calc(1vmin + 1dpcm)}\n"), "Error: 1vmin and 1dpcm are incompatible.\ \n ,\ \n1 | a {b: calc(1vmin + 1dpcm)}\ \n | ^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dpi() { assert_eq!( runner().err("a {b: calc(1vmin + 1dpi)}\n"), "Error: 1vmin and 1dpi are incompatible.\ \n ,\ \n1 | a {b: calc(1vmin + 1dpi)}\ \n | ^^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dppx() { assert_eq!( runner().err("a {b: calc(1vmin + 1dppx)}\n"), "Error: 1vmin and 1dppx are incompatible.\ \n ,\ \n1 | a {b: calc(1vmin + 1dppx)}\ \n | ^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn grad() { assert_eq!( runner().err("a {b: calc(1vmin + 1grad)}\n"), "Error: 1vmin and 1grad are incompatible.\ \n ,\ \n1 | a {b: calc(1vmin + 1grad)}\ \n | ^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn hz() { assert_eq!( runner().err("a {b: calc(1vmin + 1Hz)}\n"), "Error: 1vmin and 1Hz are incompatible.\ \n ,\ \n1 | a {b: calc(1vmin + 1Hz)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn khz() { assert_eq!( runner().err("a {b: calc(1vmin + 1kHz)}\n"), "Error: 1vmin and 1kHz are incompatible.\ \n ,\ \n1 | a {b: calc(1vmin + 1kHz)}\ \n | ^^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn ms() { assert_eq!( runner().err("a {b: calc(1vmin + 1ms)}\n"), "Error: 1vmin and 1ms are incompatible.\ \n ,\ \n1 | a {b: calc(1vmin + 1ms)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn rad() { assert_eq!( runner().err("a {b: calc(1vmin + 1rad)}\n"), "Error: 1vmin and 1rad are incompatible.\ \n ,\ \n1 | a {b: calc(1vmin + 1rad)}\ \n | ^^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn s() { assert_eq!( runner().err("a {b: calc(1vmin + 1s)}\n"), "Error: 1vmin and 1s are incompatible.\ \n ,\ \n1 | a {b: calc(1vmin + 1s)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn turn() { assert_eq!( runner().err("a {b: calc(1vmin + 1turn)}\n"), "Error: 1vmin and 1turn are incompatible.\ \n ,\ \n1 | a {b: calc(1vmin + 1turn)}\ \n | ^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/values/calculation/calc/error/known_incompatible/length/vw.rs000066400000000000000000000067031474765622100322050ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/calc/error/known_incompatible/length/vw.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("vw") } #[test] fn deg() { assert_eq!( runner().err("a {b: calc(1vw + 1deg)}\n"), "Error: 1vw and 1deg are incompatible.\ \n ,\ \n1 | a {b: calc(1vw + 1deg)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dpcm() { assert_eq!( runner().err("a {b: calc(1vw + 1dpcm)}\n"), "Error: 1vw and 1dpcm are incompatible.\ \n ,\ \n1 | a {b: calc(1vw + 1dpcm)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dpi() { assert_eq!( runner().err("a {b: calc(1vw + 1dpi)}\n"), "Error: 1vw and 1dpi are incompatible.\ \n ,\ \n1 | a {b: calc(1vw + 1dpi)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dppx() { assert_eq!( runner().err("a {b: calc(1vw + 1dppx)}\n"), "Error: 1vw and 1dppx are incompatible.\ \n ,\ \n1 | a {b: calc(1vw + 1dppx)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn grad() { assert_eq!( runner().err("a {b: calc(1vw + 1grad)}\n"), "Error: 1vw and 1grad are incompatible.\ \n ,\ \n1 | a {b: calc(1vw + 1grad)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn hz() { assert_eq!( runner().err("a {b: calc(1vw + 1Hz)}\n"), "Error: 1vw and 1Hz are incompatible.\ \n ,\ \n1 | a {b: calc(1vw + 1Hz)}\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn khz() { assert_eq!( runner().err("a {b: calc(1vw + 1kHz)}\n"), "Error: 1vw and 1kHz are incompatible.\ \n ,\ \n1 | a {b: calc(1vw + 1kHz)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn ms() { assert_eq!( runner().err("a {b: calc(1vw + 1ms)}\n"), "Error: 1vw and 1ms are incompatible.\ \n ,\ \n1 | a {b: calc(1vw + 1ms)}\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn rad() { assert_eq!( runner().err("a {b: calc(1vw + 1rad)}\n"), "Error: 1vw and 1rad are incompatible.\ \n ,\ \n1 | a {b: calc(1vw + 1rad)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn s() { assert_eq!( runner().err("a {b: calc(1vw + 1s)}\n"), "Error: 1vw and 1s are incompatible.\ \n ,\ \n1 | a {b: calc(1vw + 1s)}\ \n | ^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn turn() { assert_eq!( runner().err("a {b: calc(1vw + 1turn)}\n"), "Error: 1vw and 1turn are incompatible.\ \n ,\ \n1 | a {b: calc(1vw + 1turn)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/values/calculation/calc/error/known_incompatible/minus.rs000066400000000000000000000007571474765622100314260ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/calc/error/known_incompatible/minus.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("minus") } #[test] fn test() { assert_eq!( runner().err("a {b: calc(1px - 1s)}\n"), "Error: 1px and 1s are incompatible.\ \n ,\ \n1 | a {b: calc(1px - 1s)}\ \n | ^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/values/calculation/calc/error/known_incompatible/mod.rs000066400000000000000000000004571474765622100310470ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/calc/error/known_incompatible" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("known_incompatible") } mod angle; mod complex; mod frequency; mod length; mod minus; mod time; mod unknown_and_none; rsass-0.29.0/rsass/tests/spec/values/calculation/calc/error/known_incompatible/time.rs000066400000000000000000000070171474765622100312250ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/calc/error/known_incompatible/time.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("time") } mod ms { #[allow(unused)] use super::runner; #[test] fn dpcm() { assert_eq!( runner().err("a {b: calc(1ms + 1dpcm)}\n"), "Error: 1ms and 1dpcm are incompatible.\ \n ,\ \n1 | a {b: calc(1ms + 1dpcm)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dpi() { assert_eq!( runner().err("a {b: calc(1ms + 1dpi)}\n"), "Error: 1ms and 1dpi are incompatible.\ \n ,\ \n1 | a {b: calc(1ms + 1dpi)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dppx() { assert_eq!( runner().err("a {b: calc(1ms + 1dppx)}\n"), "Error: 1ms and 1dppx are incompatible.\ \n ,\ \n1 | a {b: calc(1ms + 1dppx)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn hz() { assert_eq!( runner().err("a {b: calc(1ms + 1Hz)}\n"), "Error: 1ms and 1Hz are incompatible.\ \n ,\ \n1 | a {b: calc(1ms + 1Hz)}\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn khz() { assert_eq!( runner().err("a {b: calc(1ms + 1kHz)}\n"), "Error: 1ms and 1kHz are incompatible.\ \n ,\ \n1 | a {b: calc(1ms + 1kHz)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } } mod s { #[allow(unused)] use super::runner; #[test] fn dpcm() { assert_eq!( runner().err("a {b: calc(1s + 1dpcm)}\n"), "Error: 1s and 1dpcm are incompatible.\ \n ,\ \n1 | a {b: calc(1s + 1dpcm)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dpi() { assert_eq!( runner().err("a {b: calc(1s + 1dpi)}\n"), "Error: 1s and 1dpi are incompatible.\ \n ,\ \n1 | a {b: calc(1s + 1dpi)}\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn dppx() { assert_eq!( runner().err("a {b: calc(1s + 1dppx)}\n"), "Error: 1s and 1dppx are incompatible.\ \n ,\ \n1 | a {b: calc(1s + 1dppx)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn hz() { assert_eq!( runner().err("a {b: calc(1s + 1Hz)}\n"), "Error: 1s and 1Hz are incompatible.\ \n ,\ \n1 | a {b: calc(1s + 1Hz)}\ \n | ^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn khz() { assert_eq!( runner().err("a {b: calc(1s + 1kHz)}\n"), "Error: 1s and 1kHz are incompatible.\ \n ,\ \n1 | a {b: calc(1s + 1kHz)}\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } } rsass-0.29.0/rsass/tests/spec/values/calculation/calc/error/known_incompatible/unknown_and_none.rs000066400000000000000000000010601474765622100336170ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/calc/error/known_incompatible/unknown_and_none.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("unknown_and_none") } #[test] #[ignore] // missing error fn test() { assert_eq!( runner().err("a {b: calc(1unknown + 1)}\n"), "Error: 1unknown and 1 are incompatible.\ \n ,\ \n1 | a {b: calc(1unknown + 1)}\ \n | ^^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/values/calculation/calc/error/mod.rs000066400000000000000000000004131474765622100251550ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/calc/error" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("error") } mod complex_units; mod known_incompatible; mod operator; mod space; mod syntax; mod value; rsass-0.29.0/rsass/tests/spec/values/calculation/calc/error/operator.rs000066400000000000000000000237121474765622100262400ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/calc/error/operator.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("operator") } mod greater_than { #[allow(unused)] use super::runner; #[test] fn both() { assert_eq!( runner().err("a {b: calc(var(--c)) > calc(var(--d))}\n"), "Error: Undefined operation \"calc(var(--c)) > calc(var(--d))\".\ \n ,\ \n1 | a {b: calc(var(--c)) > calc(var(--d))}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn lhs() { assert_eq!( runner().err("a {b: calc(var(--c)) > 1}\n"), "Error: Undefined operation \"calc(var(--c)) > 1\".\ \n ,\ \n1 | a {b: calc(var(--c)) > 1}\ \n | ^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn rhs() { assert_eq!( runner().err("a {b: 1 > calc(var(--c))}\n"), "Error: Undefined operation \"1 > calc(var(--c))\".\ \n ,\ \n1 | a {b: 1 > calc(var(--c))}\ \n | ^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } } mod greater_than_or_equals { #[allow(unused)] use super::runner; #[test] fn both() { assert_eq!( runner().err( "a {b: calc(var(--c)) >= calc(var(--d))}\n" ), "Error: Undefined operation \"calc(var(--c)) >= calc(var(--d))\".\ \n ,\ \n1 | a {b: calc(var(--c)) >= calc(var(--d))}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn lhs() { assert_eq!( runner().err("a {b: calc(var(--c)) >= 1}\n"), "Error: Undefined operation \"calc(var(--c)) >= 1\".\ \n ,\ \n1 | a {b: calc(var(--c)) >= 1}\ \n | ^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn rhs() { assert_eq!( runner().err("a {b: 1 >= calc(var(--c))}\n"), "Error: Undefined operation \"1 >= calc(var(--c))\".\ \n ,\ \n1 | a {b: 1 >= calc(var(--c))}\ \n | ^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } } mod less_than { #[allow(unused)] use super::runner; #[test] fn both() { assert_eq!( runner().err("a {b: calc(var(--c)) < calc(var(--d))}\n"), "Error: Undefined operation \"calc(var(--c)) < calc(var(--d))\".\ \n ,\ \n1 | a {b: calc(var(--c)) < calc(var(--d))}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn lhs() { assert_eq!( runner().err("a {b: calc(var(--c)) < 1}\n"), "Error: Undefined operation \"calc(var(--c)) < 1\".\ \n ,\ \n1 | a {b: calc(var(--c)) < 1}\ \n | ^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn rhs() { assert_eq!( runner().err("a {b: 1 < calc(var(--c))}\n"), "Error: Undefined operation \"1 < calc(var(--c))\".\ \n ,\ \n1 | a {b: 1 < calc(var(--c))}\ \n | ^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } } mod less_than_or_equals { #[allow(unused)] use super::runner; #[test] fn both() { assert_eq!( runner().err( "a {b: calc(var(--c)) <= calc(var(--d))}\n" ), "Error: Undefined operation \"calc(var(--c)) <= calc(var(--d))\".\ \n ,\ \n1 | a {b: calc(var(--c)) <= calc(var(--d))}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn lhs() { assert_eq!( runner().err("a {b: calc(var(--c)) <= 1}\n"), "Error: Undefined operation \"calc(var(--c)) <= 1\".\ \n ,\ \n1 | a {b: calc(var(--c)) <= 1}\ \n | ^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn rhs() { assert_eq!( runner().err("a {b: 1 <= calc(var(--c))}\n"), "Error: Undefined operation \"1 <= calc(var(--c))\".\ \n ,\ \n1 | a {b: 1 <= calc(var(--c))}\ \n | ^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } } mod minus { #[allow(unused)] use super::runner; #[test] fn both() { assert_eq!( runner().err("a {b: calc(var(--c)) - calc(var(--d))}\n"), "Error: Undefined operation \"calc(var(--c)) - calc(var(--d))\".\ \n ,\ \n1 | a {b: calc(var(--c)) - calc(var(--d))}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn lhs() { assert_eq!( runner().err("a {b: calc(var(--c)) - 1}\n"), "Error: Undefined operation \"calc(var(--c)) - 1\".\ \n ,\ \n1 | a {b: calc(var(--c)) - 1}\ \n | ^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn rhs() { assert_eq!( runner().err("a {b: 1 - calc(var(--c))}\n"), "Error: Undefined operation \"1 - calc(var(--c))\".\ \n ,\ \n1 | a {b: 1 - calc(var(--c))}\ \n | ^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } } mod test_mod { #[allow(unused)] use super::runner; #[test] fn both() { assert_eq!( runner().err("a {b: calc(var(--c)) % calc(var(--d))}\n"), "Error: Undefined operation \"calc(var(--c)) % calc(var(--d))\".\ \n ,\ \n1 | a {b: calc(var(--c)) % calc(var(--d))}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn lhs() { assert_eq!( runner().err("a {b: calc(var(--c)) % 1}\n"), "Error: Undefined operation \"calc(var(--c)) % 1\".\ \n ,\ \n1 | a {b: calc(var(--c)) % 1}\ \n | ^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn rhs() { assert_eq!( runner().err("a {b: 1 % calc(var(--c))}\n"), "Error: Undefined operation \"1 % calc(var(--c))\".\ \n ,\ \n1 | a {b: 1 % calc(var(--c))}\ \n | ^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } } mod plus { #[allow(unused)] use super::runner; #[test] fn both() { assert_eq!( runner().err("a {b: calc(var(--c)) + calc(var(--d))}\n"), "Error: Undefined operation \"calc(var(--c)) + calc(var(--d))\".\ \n ,\ \n1 | a {b: calc(var(--c)) + calc(var(--d))}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn lhs() { assert_eq!( runner().err("a {b: calc(var(--c)) + 1}\n"), "Error: Undefined operation \"calc(var(--c)) + 1\".\ \n ,\ \n1 | a {b: calc(var(--c)) + 1}\ \n | ^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn rhs() { assert_eq!( runner().err("a {b: 1 + calc(var(--c))}\n"), "Error: Undefined operation \"1 + calc(var(--c))\".\ \n ,\ \n1 | a {b: 1 + calc(var(--c))}\ \n | ^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } } mod times { #[allow(unused)] use super::runner; #[test] fn both() { assert_eq!( runner().err("a {b: calc(var(--c)) * calc(var(--d))}\n"), "Error: Undefined operation \"calc(var(--c)) * calc(var(--d))\".\ \n ,\ \n1 | a {b: calc(var(--c)) * calc(var(--d))}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn lhs() { assert_eq!( runner().err("a {b: calc(var(--c)) * 1}\n"), "Error: Undefined operation \"calc(var(--c)) * 1\".\ \n ,\ \n1 | a {b: calc(var(--c)) * 1}\ \n | ^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn rhs() { assert_eq!( runner().err("a {b: 1 * calc(var(--c))}\n"), "Error: Undefined operation \"1 * calc(var(--c))\".\ \n ,\ \n1 | a {b: 1 * calc(var(--c))}\ \n | ^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } } #[test] fn unary_minus() { assert_eq!( runner().err("a {b: -(calc(var(--c)))}\n"), "Error: Undefined operation \"-calc(var(--c))\".\ \n ,\ \n1 | a {b: -(calc(var(--c)))}\ \n | ^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn unary_plus() { assert_eq!( runner().err("a {b: +calc(var(--c))}\n"), "Error: Undefined operation \"+calc(var(--c))\".\ \n ,\ \n1 | a {b: +calc(var(--c))}\ \n | ^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/values/calculation/calc/error/space.rs000066400000000000000000000051731474765622100255010ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/calc/error/space.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("space") } #[test] fn number_calc() { assert_eq!( runner().err("a {b: calc(1 calc(1px + 1%))}\n"), "Error: Missing math operator.\ \n ,\ \n1 | a {b: calc(1 calc(1px + 1%))}\ \n | ^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn number_number() { assert_eq!( runner().err("a {b: calc(1 2)}\n"), "Error: Missing math operator.\ \n ,\ \n1 | a {b: calc(1 2)}\ \n | ^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] #[ignore] // wrong error fn number_number_string() { assert_eq!( runner().err("a {b: calc(1 2 c)}\n"), "Error: Missing math operator.\ \n ,\ \n1 | a {b: calc(1 2 c)}\ \n | ^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn number_operation() { assert_eq!( runner().err("a {b: calc(1 3 + 4)}\n"), "Error: Missing math operator.\ \n ,\ \n1 | a {b: calc(1 3 + 4)}\ \n | ^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn number_paren() { assert_eq!( runner().err("a {b: calc(1 (3))}\n"), "Error: Missing math operator.\ \n ,\ \n1 | a {b: calc(1 (3))}\ \n | ^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn operation_operation() { assert_eq!( runner().err("a {b: calc(1 + 2 3 + 4)}\n"), "Error: Missing math operator.\ \n ,\ \n1 | a {b: calc(1 + 2 3 + 4)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] #[ignore] // wrong error fn string_number_number() { assert_eq!( runner().err("a {b: calc(c 1 2)}\n"), "Error: Missing math operator.\ \n ,\ \n1 | a {b: calc(c 1 2)}\ \n | ^^^\ \n \'\ \n input.scss 1:14 root stylesheet", ); } #[test] fn through_variable() { assert_eq!( runner().err( "$c: 1;\ \n$d: 2;\ \na {b: calc($c $d)}\n" ), "Error: Missing math operator.\ \n ,\ \n3 | a {b: calc($c $d)}\ \n | ^^^^^\ \n \'\ \n input.scss 3:12 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/values/calculation/calc/error/syntax.rs000066400000000000000000000153231474765622100257320ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/calc/error/syntax.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("syntax") } #[test] fn dollar() { assert_eq!( runner().err("a {b: calc($)}\n"), "Error: Expected identifier.\ \n ,\ \n1 | a {b: calc($)}\ \n | ^\ \n \'\ \n input.scss 1:13 root stylesheet", ); } #[test] #[ignore] // wrong error fn double_operator() { assert_eq!( runner().err("a {b: calc(1px ** 2px)}\n"), "Error: Expected expression.\ \n ,\ \n1 | a {b: calc(1px ** 2px)}\ \n | ^\ \n \'\ \n input.scss 1:17 root stylesheet", ); } #[test] fn empty() { assert_eq!( runner().err("a {b: calc()}\n"), "Error: Missing argument.\ \n ,\ \n1 | a {b: calc()}\ \n | ^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] #[ignore] // missing error fn hash() { assert_eq!( runner().err("a {b: calc(#)}\n"), "Error: Expected identifier.\ \n ,\ \n1 | a {b: calc(#)}\ \n | ^\ \n \'\ \n input.scss 1:13 root stylesheet", ); } mod interpolation { #[allow(unused)] use super::runner; #[test] fn in_function_arg() { assert_eq!( runner().err("a {b: calc(c(~#{d}))}\n"), "Error: expected \")\".\ \n ,\ \n1 | a {b: calc(c(~#{d}))}\ \n | ^\ \n \'\ \n input.scss 1:14 root stylesheet", ); } #[test] #[ignore] // missing error fn line_noise() { assert_eq!( runner().err( "// Interpolation no longer shifts the parser into a special mode where it allows\ \n// any interpolated declaration value.\ \na {b: calc(!{@}#$%^&*#{c}_-[+]=)}\n" ), "Error: expected \")\".\ \n ,\ \n3 | a {b: calc(!{@}#$%^&*#{c}_-[+]=)}\ \n | ^\ \n \'\ \n input.scss 3:12 root stylesheet", ); } } #[test] #[ignore] // missing error fn leading_operator() { assert_eq!( runner().err("a {b: calc(+ 1px)}\n"), "Error: This expression can\'t be used in a calculation.\ \n ,\ \n1 | a {b: calc(+ 1px)}\ \n | ^^^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] fn multiple_args() { assert_eq!( runner().err("a {b: calc(1px, 2px)}\n"), "Error: Only 1 argument allowed, but 2 were passed.\ \n ,\ \n1 | a {b: calc(1px, 2px)}\ \n | ^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } mod no_whitespace { #[allow(unused)] use super::runner; mod minus { #[allow(unused)] use super::runner; #[test] #[ignore] // wrong error fn after() { assert_eq!( runner().err( "a {b: calc(1 -1)}\n" ), "Error: \"+\" and \"-\" must be surrounded by whitespace in calculations.\ \n ,\ \n1 | a {b: calc(1 -1)}\ \n | ^\ \n \'\ \n input.scss 1:14 root stylesheet", ); } #[test] #[ignore] // missing error fn before() { assert_eq!( runner().err( "a {b: calc(1- 1)}\n" ), "Error: \"+\" and \"-\" must be surrounded by whitespace in calculations.\ \n ,\ \n1 | a {b: calc(1- 1)}\ \n | ^\ \n \'\ \n input.scss 1:13 root stylesheet", ); } #[test] #[ignore] // missing error fn both() { assert_eq!( runner().err( "a {b: calc(1-1)}\n" ), "Error: \"+\" and \"-\" must be surrounded by whitespace in calculations.\ \n ,\ \n1 | a {b: calc(1-1)}\ \n | ^\ \n \'\ \n input.scss 1:13 root stylesheet", ); } } mod plus { #[allow(unused)] use super::runner; #[test] #[ignore] // missing error fn after() { assert_eq!( runner().err( "a {b: calc(1 +1)}\n" ), "DEPRECATION WARNING [strict-unary]: This operation is parsed as:\n\ \n 1 + 1\n\ \nbut you may have intended it to mean:\n\ \n 1 (+1)\n\ \nAdd a space after + to clarify that it\'s meant to be a binary operation, or wrap\ \nit in parentheses to make it a unary operation. This will be an error in future\ \nversions of Sass.\n\ \nMore info and automated migrator: https://sass-lang.com/d/strict-unary\n\ \n ,\ \n1 | a {b: calc(1 +1)}\ \n | ^^^^\ \n \'\ \n input.scss 1:12 root stylesheet\n\ \nError: \"+\" and \"-\" must be surrounded by whitespace in calculations.\ \n ,\ \n1 | a {b: calc(1 +1)}\ \n | ^\ \n \'\ \n input.scss 1:14 root stylesheet", ); } #[test] #[ignore] // missing error fn before() { assert_eq!( runner().err( "a {b: calc(1+ 1)}\n" ), "Error: \"+\" and \"-\" must be surrounded by whitespace in calculations.\ \n ,\ \n1 | a {b: calc(1+ 1)}\ \n | ^\ \n \'\ \n input.scss 1:13 root stylesheet", ); } #[test] #[ignore] // missing error fn both() { assert_eq!( runner().err( "a {b: calc(1+1)}\n" ), "Error: \"+\" and \"-\" must be surrounded by whitespace in calculations.\ \n ,\ \n1 | a {b: calc(1+1)}\ \n | ^\ \n \'\ \n input.scss 1:13 root stylesheet", ); } } } #[test] #[ignore] // wrong error fn trailing_operator() { assert_eq!( runner().err("a {b: calc(1px *)}\n"), "Error: Expected expression.\ \n ,\ \n1 | a {b: calc(1px *)}\ \n | ^\ \n \'\ \n input.scss 1:17 root stylesheet", ); } #[test] #[ignore] // missing error fn unknown_operator() { assert_eq!( runner().err("a {b: calc(1px % 2px)}\n"), "Error: This operation can\'t be used in a calculation.\ \n ,\ \n1 | a {b: calc(1px % 2px)}\ \n | ^\ \n \'\ \n input.scss 1:16 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/values/calculation/calc/error/value.rs000066400000000000000000000136111474765622100255160ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/calc/error/value.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("value") } mod function { #[allow(unused)] use super::runner; #[test] fn boolean() { assert_eq!( runner().err( "@function a() {@return true}\ \nb {c: calc(a())}\n" ), "Error: Value true can\'t be used in a calculation.\ \n ,\ \n2 | b {c: calc(a())}\ \n | ^^^\ \n \'\ \n input.scss 2:12 root stylesheet", ); } #[test] fn color() { assert_eq!( runner().err( "@function a() {@return blue}\ \nb {c: calc(a())}\n" ), "Error: Value blue can\'t be used in a calculation.\ \n ,\ \n2 | b {c: calc(a())}\ \n | ^^^\ \n \'\ \n input.scss 2:12 root stylesheet", ); } #[test] fn function() { assert_eq!( runner().err( "@use \'sass:meta\';\ \n@function a() {@return meta.get-function(\"get-function\", $module: \"meta\")}\ \nb {c: calc(a())}\n" ), "Error: Value get-function(\"get-function\") can\'t be used in a calculation.\ \n ,\ \n3 | b {c: calc(a())}\ \n | ^^^\ \n \'\ \n input.scss 3:12 root stylesheet", ); } #[test] #[ignore] // wrong error fn list() { assert_eq!( runner().err( "@function a() {@return 1 2 3}\ \nb {c: calc(a())}\n" ), "Error: Value (1 2 3) can\'t be used in a calculation.\ \n ,\ \n2 | b {c: calc(a())}\ \n | ^^^\ \n \'\ \n input.scss 2:12 root stylesheet", ); } #[test] fn map() { assert_eq!( runner().err( "@function a() {@return (b: c)}\ \nd {e: calc(a())}\n" ), "Error: Value (b: c) can\'t be used in a calculation.\ \n ,\ \n2 | d {e: calc(a())}\ \n | ^^^\ \n \'\ \n input.scss 2:12 root stylesheet", ); } #[test] fn null() { assert_eq!( runner().err( "@function a() {@return null}\ \nb {c: calc(a())}\n" ), "Error: Value null can\'t be used in a calculation.\ \n ,\ \n2 | b {c: calc(a())}\ \n | ^^^\ \n \'\ \n input.scss 2:12 root stylesheet", ); } #[test] fn quoted_string() { assert_eq!( runner().err( "@function a() {@return \"foo\"}\ \nb {c: calc(a())}\n" ), "Error: Value \"foo\" can\'t be used in a calculation.\ \n ,\ \n2 | b {c: calc(a())}\ \n | ^^^\ \n \'\ \n input.scss 2:12 root stylesheet", ); } } mod variable { #[allow(unused)] use super::runner; #[test] fn boolean() { assert_eq!( runner().err( "$a: true;\ \nb {c: calc($a)}\n" ), "Error: Value true can\'t be used in a calculation.\ \n ,\ \n2 | b {c: calc($a)}\ \n | ^^\ \n \'\ \n input.scss 2:12 root stylesheet", ); } #[test] fn color() { assert_eq!( runner().err( "$a: blue;\ \nb {c: calc($a)}\n" ), "Error: Value blue can\'t be used in a calculation.\ \n ,\ \n2 | b {c: calc($a)}\ \n | ^^\ \n \'\ \n input.scss 2:12 root stylesheet", ); } #[test] fn function() { assert_eq!( runner().err( "@use \'sass:meta\';\ \n$a: meta.get-function(\"get-function\", $module: \"meta\");\ \nb {c: calc($a)}\n" ), "Error: Value get-function(\"get-function\") can\'t be used in a calculation.\ \n ,\ \n3 | b {c: calc($a)}\ \n | ^^\ \n \'\ \n input.scss 3:12 root stylesheet", ); } #[test] #[ignore] // wrong error fn list() { assert_eq!( runner().err( "$a: 1 2 3;\ \nb {c: calc($a)}\n" ), "Error: Value (1 2 3) can\'t be used in a calculation.\ \n ,\ \n2 | b {c: calc($a)}\ \n | ^^\ \n \'\ \n input.scss 2:12 root stylesheet", ); } #[test] fn map() { assert_eq!( runner().err( "$a: (b: c);\ \nd {e: calc($a)}\n" ), "Error: Value (b: c) can\'t be used in a calculation.\ \n ,\ \n2 | d {e: calc($a)}\ \n | ^^\ \n \'\ \n input.scss 2:12 root stylesheet", ); } #[test] fn null() { assert_eq!( runner().err( "$a: null;\ \nb {c: calc($a)}\n" ), "Error: Value null can\'t be used in a calculation.\ \n ,\ \n2 | b {c: calc($a)}\ \n | ^^\ \n \'\ \n input.scss 2:12 root stylesheet", ); } #[test] fn quoted_string() { assert_eq!( runner().err( "$a: \"foo\";\ \nb {c: calc($a)}\n" ), "Error: Value \"foo\" can\'t be used in a calculation.\ \n ,\ \n2 | b {c: calc($a)}\ \n | ^^\ \n \'\ \n input.scss 2:12 root stylesheet", ); } } rsass-0.29.0/rsass/tests/spec/values/calculation/calc/mod.rs000066400000000000000000000004071474765622100240270ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/calc" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("calc") } mod constant; mod error; mod no_operator; mod operator; mod parens; mod simplify; mod space; rsass-0.29.0/rsass/tests/spec/values/calculation/calc/no_operator.rs000066400000000000000000000232711474765622100256030ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/calc/no_operator.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("no_operator") } mod calculation { #[allow(unused)] use super::runner; mod calc { #[allow(unused)] use super::runner; #[test] fn preserved() { assert_eq!( runner().ok("a {b: calc(calc(1px + 1%))}\n"), "a {\ \n b: calc(1px + 1%);\ \n}\n" ); } #[test] fn simplified() { assert_eq!( runner().ok("a {b: calc(calc(1px))}\n"), "a {\ \n b: 1px;\ \n}\n" ); } } mod clamp { #[allow(unused)] use super::runner; #[test] fn preserved() { assert_eq!( runner().ok("a {b: calc(clamp(1%, 2px, 3%))}\n"), "a {\ \n b: clamp(1%, 2px, 3%);\ \n}\n" ); } #[test] fn simplified() { assert_eq!( runner().ok("a {b: calc(clamp(1px, 2px, 3px))}\n"), "a {\ \n b: 2px;\ \n}\n" ); } } mod max { #[allow(unused)] use super::runner; #[test] fn preserved() { assert_eq!( runner().ok("a {b: calc(max(1%, 2px))}\n"), "a {\ \n b: max(1%, 2px);\ \n}\n" ); } #[test] fn simplified() { assert_eq!( runner().ok("a {b: calc(max(1px, 2px))}\n"), "a {\ \n b: 2px;\ \n}\n" ); } } mod min { #[allow(unused)] use super::runner; #[test] fn preserved() { assert_eq!( runner().ok("a {b: calc(min(1%, 2px))}\n"), "a {\ \n b: min(1%, 2px);\ \n}\n" ); } #[test] fn simplified() { assert_eq!( runner().ok("a {b: calc(min(1px, 2px))}\n"), "a {\ \n b: 1px;\ \n}\n" ); } } } #[test] fn case_insensitive() { assert_eq!( runner().ok("a {b: CaLc(1px)}\n"), "a {\ \n b: 1px;\ \n}\n" ); } #[test] fn extra_whitespace() { assert_eq!( runner().ok("a {b: calc( 1px )}\n"), "a {\ \n b: 1px;\ \n}\n" ); } mod function { #[allow(unused)] use super::runner; #[test] fn css() { assert_eq!( runner().ok("a {b: calc(c())}\n"), "a {\ \n b: calc(c());\ \n}\n" ); } #[test] fn test_if() { assert_eq!( runner().ok("b {c: calc(if(true, 1, $undefined))}\n"), "b {\ \n c: 1;\ \n}\n" ); } #[test] fn max() { assert_eq!( runner().ok("b {c: calc(max(1 2 3...))}\n"), "b {\ \n c: 3;\ \n}\n" ); } #[test] fn min() { assert_eq!( runner().ok("b {c: calc(min(1 2 3...))}\n"), "b {\ \n c: 1;\ \n}\n" ); } mod sass { #[allow(unused)] use super::runner; #[test] fn global() { assert_eq!( runner().ok("@function a() {@return 1px}\n\ \nb {c: calc(a())}\n"), "b {\ \n c: 1px;\ \n}\n" ); } #[test] fn namespace() { assert_eq!( runner().ok("@use \"sass:math\";\ \nb {c: calc(math.round(2.3))}\n"), "b {\ \n c: 2;\ \n}\n" ); } } } mod interpolation { #[allow(unused)] use super::runner; #[test] fn nested() { assert_eq!( runner().ok("a {b: calc(calc(#{c}))}\n"), "a {\ \n b: calc(c);\ \n}\n" ); } #[test] fn number() { assert_eq!( runner().ok( "// Although interpolation may return a value that looks like a valid `calc()`,\ \n// it\'s always treated as an unquoted string.\ \na {b: calc(#{1px + 2px})}\n" ), "a {\ \n b: calc(3px);\ \n}\n" ); } #[test] fn parens() { assert_eq!( runner().ok( "// Interpolation is isolated to a single parenthesized context, so the\ \n// parentheses themselves are stripped off.\ \na {b: calc((#{1px + 2px}))}\n" ), "a {\ \n b: calc((3px));\ \n}\n" ); } } mod number { #[allow(unused)] use super::runner; mod decimal { #[allow(unused)] use super::runner; #[test] fn leading_digit() { assert_eq!( runner().ok("a {b: calc(1.2px)}\n"), "a {\ \n b: 1.2px;\ \n}\n" ); } #[test] fn leading_dot() { assert_eq!( runner().ok("a {b: calc(.2px)}\n"), "a {\ \n b: 0.2px;\ \n}\n" ); } } #[test] fn exponent() { assert_eq!( runner().ok("a {b: calc(1e2px)}\n"), "a {\ \n b: 100px;\ \n}\n" ); } #[test] fn integer() { assert_eq!( runner().ok("a {b: calc(1px)}\n"), "a {\ \n b: 1px;\ \n}\n" ); } #[test] fn leading_minus() { assert_eq!( runner().ok("a {b: calc(-1px)}\n"), "a {\ \n b: -1px;\ \n}\n" ); } #[test] fn leading_plus() { assert_eq!( runner().ok("a {b: calc(+1px)}\n"), "a {\ \n b: 1px;\ \n}\n" ); } #[test] fn unitless() { assert_eq!( runner().ok("a {b: calc(1)}\n"), "a {\ \n b: 1;\ \n}\n" ); } } mod syntax { #[allow(unused)] use super::runner; mod extra_whitespace { #[allow(unused)] use super::runner; #[test] fn number() { assert_eq!( runner().ok("a {b: calc( 1 )}\n"), "a {\ \n b: 1;\ \n}\n" ); } #[test] fn parens() { assert_eq!( runner().ok("a {b: calc( ( 1 ) )}\n"), "a {\ \n b: 1;\ \n}\n" ); } #[test] fn parenthesized_var() { assert_eq!( runner().ok("a {b: calc( ( var(--c) ) )}\n"), "a {\ \n b: calc((var(--c)));\ \n}\n" ); } } } mod var { #[allow(unused)] use super::runner; #[test] fn bare() { assert_eq!( runner().ok("a {b: calc(var(--c))}\n"), "a {\ \n b: calc(var(--c));\ \n}\n" ); } } mod variable { #[allow(unused)] use super::runner; #[test] fn calculation() { assert_eq!( runner().ok("$a: calc(1px + 1%);\ \nb {c: calc($a)}\n"), "b {\ \n c: calc(1px + 1%);\ \n}\n" ); } #[test] fn namespace() { assert_eq!( runner().ok("@use \"sass:math\";\ \na {b: calc(math.$pi)}\n"), "a {\ \n b: 3.1415926536;\ \n}\n" ); } mod not_parsed_as_interpolation { #[allow(unused)] use super::runner; #[test] fn followed_by_parenthesized_interp() { assert_eq!( runner().ok("$a: 1;\ \nb {\ \n c: calc($a);\ \n $_: (\"#{\'\'}\");\ \n}\n"), "b {\ \n c: 1;\ \n}\n" ); } #[test] fn in_comment() { assert_eq!( runner().ok( "$a: 1;\ \nb {\ \n // A naive parser might check for interpolation in a comment.\ \n c: calc($a /* #{\'\'} */);\ \n}\n" ), "b {\ \n c: 1;\ \n}\n" ); } #[test] fn parentheses_in_string() { assert_eq!( runner().ok( "@function a($arg) {@return 1}\n\ \n$b: 2;\ \nc {\ \n // A naive parser might check for closing parentheses regardless of string\ \n // context when looking for interpolation in a calc.\ \n d: calc($b + a(\")#{\'\'}\"));\ \n}\n" ), "c {\ \n d: 3;\ \n}\n" ); } } mod number { #[allow(unused)] use super::runner; #[test] fn complex_unit() { assert_eq!( runner().ok("@use \"sass:math\";\ \n$a: math.div(1px*1s, 1rad);\ \nb {c: math.div(calc($a) * 2rad, 2s)}\n"), "b {\ \n c: 1px;\ \n}\n" ); } #[test] fn simple_unit() { assert_eq!( runner().ok("$a: 1px;\ \nb {c: calc($a)}\n"), "b {\ \n c: 1px;\ \n}\n" ); } } #[test] fn unquoted_string() { assert_eq!( runner().ok("$a: foobar;\ \nb {c: calc($a)}\n"), "b {\ \n c: calc(foobar);\ \n}\n" ); } } rsass-0.29.0/rsass/tests/spec/values/calculation/calc/operator.rs000066400000000000000000000330351474765622100251060ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/calc/operator.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("operator") } mod divide { #[allow(unused)] use super::runner; #[test] fn no_whitespace() { assert_eq!( runner().ok("a {b: calc(1px/2)}\n"), "a {\ \n b: 0.5px;\ \n}\n" ); } #[test] fn preserved() { assert_eq!( runner().ok("a {b: calc(1px / var(--c))}\n"), "a {\ \n b: calc(1px / var(--c));\ \n}\n" ); } #[test] fn simplified() { assert_eq!( runner().ok("a {b: calc(1px / 2)}\n"), "a {\ \n b: 0.5px;\ \n}\n" ); } } mod minus { #[allow(unused)] use super::runner; mod preserved { #[allow(unused)] use super::runner; #[test] fn division() { assert_eq!( runner().ok("a {b: calc(1px - (2% / var(--c)))}\n"), "a {\ \n b: calc(1px - 2% / var(--c));\ \n}\n" ); } #[test] fn minus() { assert_eq!( runner().ok("a {b: calc(1px - (2% - var(--c)))}\n"), "a {\ \n b: calc(1px - (2% - var(--c)));\ \n}\n" ); } #[test] fn multiplication() { assert_eq!( runner().ok("a {b: calc(1px - (2% * var(--c)))}\n"), "a {\ \n b: calc(1px - 2% * var(--c));\ \n}\n" ); } #[test] fn number() { assert_eq!( runner().ok("a {b: calc(1px - 2%)}\n"), "a {\ \n b: calc(1px - 2%);\ \n}\n" ); } #[test] fn plus() { assert_eq!( runner().ok("a {b: calc(1px - (2% + var(--c)))}\n"), "a {\ \n b: calc(1px - (2% + var(--c)));\ \n}\n" ); } } #[test] fn simplified() { assert_eq!( runner().ok("a {b: calc(1px - 2px)}\n"), "a {\ \n b: -1px;\ \n}\n" ); } } mod plus { #[allow(unused)] use super::runner; mod preserved { #[allow(unused)] use super::runner; #[test] fn division() { assert_eq!( runner().ok("a {b: calc(1px + (2% / var(--c)))}\n"), "a {\ \n b: calc(1px + 2% / var(--c));\ \n}\n" ); } #[test] fn minus() { assert_eq!( runner().ok("a {b: calc(1px + 2% - var(--c))}\n"), "a {\ \n b: calc(1px + 2% - var(--c));\ \n}\n" ); } #[test] fn multiplication() { assert_eq!( runner().ok("a {b: calc(1px + (2% * var(--c)))}\n"), "a {\ \n b: calc(1px + 2% * var(--c));\ \n}\n" ); } #[test] fn number() { assert_eq!( runner().ok("a {b: calc(1px + 2%)}\n"), "a {\ \n b: calc(1px + 2%);\ \n}\n" ); } #[test] fn plus() { assert_eq!( runner().ok("a {b: calc(1px + (2% + var(--c)))}\n"), "a {\ \n b: calc(1px + 2% + var(--c));\ \n}\n" ); } } #[test] fn simplified() { assert_eq!( runner().ok("a {b: calc(1px + 2px)}\n"), "a {\ \n b: 3px;\ \n}\n" ); } } mod precedence { #[allow(unused)] use super::runner; mod interpolation { #[allow(unused)] use super::runner; mod calculation { #[allow(unused)] use super::runner; #[test] fn asterisk() { assert_eq!( runner().ok("a {b: calc(calc(#{\"c*\"}))}\n"), "a {\ \n b: calc((c*));\ \n}\n" ); } #[test] fn plain() { assert_eq!( runner().ok("a {b: calc(calc(#{c}))}\n"), "a {\ \n b: calc(c);\ \n}\n" ); } #[test] fn slash() { assert_eq!( runner().ok("a {b: calc(calc(#{\"c/\"}))}\n"), "a {\ \n b: calc((c/));\ \n}\n" ); } #[test] fn whitespace() { assert_eq!( runner().ok("a {b: calc(calc(#{\"c \"}))}\n"), "a {\ \n b: calc((c ));\ \n}\n" ); } } #[test] fn parens() { assert_eq!( runner().ok("a {b: calc((#{c}))}\n"), "a {\ \n b: calc((c));\ \n}\n" ); } } mod preserved { #[allow(unused)] use super::runner; mod additive { #[allow(unused)] use super::runner; #[test] fn calculation() { assert_eq!( runner().ok("a {b: calc(1px + calc(2% - 3em))}\n"), "a {\ \n b: calc(1px + 2% - 3em);\ \n}\n" ); } #[test] fn parens() { assert_eq!( runner().ok("a {b: calc(1px + (2% - 3em))}\n"), "a {\ \n b: calc(1px + 2% - 3em);\ \n}\n" ); } } mod additive_then_multiplicative { #[allow(unused)] use super::runner; #[test] fn calculation() { assert_eq!( runner().ok("a {b: calc(1px + calc(2px * var(--c)))}\n"), "a {\ \n b: calc(1px + 2px * var(--c));\ \n}\n" ); } #[test] fn parens() { assert_eq!( runner().ok("a {b: calc(1px + (2px * var(--c)))}\n"), "a {\ \n b: calc(1px + 2px * var(--c));\ \n}\n" ); } } mod multiplicative { #[allow(unused)] use super::runner; mod default { #[allow(unused)] use super::runner; #[test] fn calculation() { assert_eq!( runner() .ok("a {b: calc(1px * calc(2 / var(--c)))}\n"), "a {\ \n b: calc(1px * 2 / var(--c));\ \n}\n" ); } #[test] fn parens() { assert_eq!( runner().ok("a {b: calc(1px * (2 / var(--c)))}\n"), "a {\ \n b: calc(1px * 2 / var(--c));\ \n}\n" ); } } mod needs_parens { #[allow(unused)] use super::runner; #[test] fn calculation() { assert_eq!( runner() .ok("a {b: calc(1px / calc(2 * var(--c)))}\n"), "a {\ \n b: calc(1px / (2 * var(--c)));\ \n}\n" ); } #[test] fn parens() { assert_eq!( runner().ok("a {b: calc(1px / (2 * var(--c)))}\n"), "a {\ \n b: calc(1px / (2 * var(--c)));\ \n}\n" ); } } } mod multiplicative_then_additive { #[allow(unused)] use super::runner; #[test] fn calculation() { assert_eq!( runner().ok("a {b: calc(1px * calc(2 + var(--c)))}\n"), "a {\ \n b: calc(1px * (2 + var(--c)));\ \n}\n" ); } #[test] fn parens() { assert_eq!( runner().ok("a {b: calc(1px * (2 + var(--c)))}\n"), "a {\ \n b: calc(1px * (2 + var(--c)));\ \n}\n" ); } } } mod simplified { #[allow(unused)] use super::runner; #[test] fn additive() { assert_eq!( runner().ok( "a {b: calc(1px + 20px - 300px + 4000px - 50000px)}\n" ), "a {\ \n b: -46279px;\ \n}\n" ); } #[test] fn multiplicative() { assert_eq!( runner().ok("a {b: calc(2 * 3 / 5 * 7 / 11)}\n"), "a {\ \n b: 0.7636363636;\ \n}\n" ); } #[test] fn multiplicative_and_additive() { assert_eq!( runner().ok("a {b: calc(2 * 3 + 4 / 5 - 6)}\n"), "a {\ \n b: 0.8;\ \n}\n" ); } mod parens { #[allow(unused)] use super::runner; #[test] fn multiplicative() { assert_eq!( runner().ok("a {b: calc(1 / (2 * 3))}\n"), "a {\ \n b: 0.1666666667;\ \n}\n" ); } #[test] fn multiplicative_and_additive() { assert_eq!( runner().ok("a {b: calc(2 * (3 + 4) / (5 - 6))}\n"), "a {\ \n b: -14;\ \n}\n" ); } } } } mod sass_script { #[allow(unused)] use super::runner; mod plus_string { #[allow(unused)] use super::runner; #[test] fn lhs() { assert_eq!( runner().ok("a {b: calc(1px + 1%) + \"\"}\n"), "a {\ \n b: \"calc(1px + 1%)\";\ \n}\n" ); } #[test] fn rhs() { assert_eq!( runner().ok("a {b: \"\" + calc(1px + 1%)}\n"), "a {\ \n b: \"calc(1px + 1%)\";\ \n}\n" ); } } } mod times { #[allow(unused)] use super::runner; #[test] fn no_whitespace() { assert_eq!( runner().ok("a {b: calc(1px*2)}\n"), "a {\ \n b: 2px;\ \n}\n" ); } #[test] fn preserved() { assert_eq!( runner().ok("a {b: calc(1px * var(--c))}\n"), "a {\ \n b: calc(1px * var(--c));\ \n}\n" ); } #[test] fn simplified() { assert_eq!( runner().ok("a {b: calc(1px * 2)}\n"), "a {\ \n b: 2px;\ \n}\n" ); } } mod units { #[allow(unused)] use super::runner; #[test] fn denominators() { assert_eq!( runner().ok("a {b: calc(1/2px + 1/4px) * 1px}\n"), "a {\ \n b: 0.75;\ \n}\n" ); } #[test] fn division() { assert_eq!( runner().ok("a {b: calc(1px / 2px)}\n"), "a {\ \n b: 0.5;\ \n}\n" ); } #[test] fn multiplication() { assert_eq!( runner().ok("@use \"sass:math\";\ \na {b: math.div(calc(2px * 3px), 4px)}\n"), "a {\ \n b: 1.5px;\ \n}\n" ); } mod percent { #[allow(unused)] use super::runner; #[test] fn and_known() { assert_eq!( runner().ok("a {b: calc(1% + 1px)}\n"), "a {\ \n b: calc(1% + 1px);\ \n}\n" ); } #[test] fn and_unknown() { assert_eq!( runner().ok("a {b: calc(1% + 1unknown)}\n"), "a {\ \n b: calc(1% + 1unknown);\ \n}\n" ); } } mod unknown { #[allow(unused)] use super::runner; #[test] fn and_known() { assert_eq!( runner().ok("a {b: calc(1unknown + 1px)}\n"), "a {\ \n b: calc(1unknown + 1px);\ \n}\n" ); } #[test] fn and_unknown() { assert_eq!( runner().ok("a {b: calc(1unknown + 1other)}\n"), "a {\ \n b: calc(1unknown + 1other);\ \n}\n" ); } } } mod var { #[allow(unused)] use super::runner; #[test] fn calculation() { assert_eq!( runner().ok("a {b: calc(1 + calc(var(--c)))}\n"), "a {\ \n b: calc(1 + (var(--c)));\ \n}\n" ); } #[test] fn directly_parenthesized() { assert_eq!( runner().ok("a {b: calc(1 + (var(--c)))}\n"), "a {\ \n b: calc(1 + (var(--c)));\ \n}\n" ); } #[test] fn indirectly_parenthesized() { assert_eq!( runner().ok("a {b: calc((1 + var(--c)))}\n"), "a {\ \n b: calc(1 + var(--c));\ \n}\n" ); } } rsass-0.29.0/rsass/tests/spec/values/calculation/calc/parens.rs000066400000000000000000000035321474765622100245420ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/calc/parens.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("parens") } #[test] fn calculation() { assert_eq!( runner().ok("a {b: calc((calc(1px + 1%)))}\n"), "a {\ \n b: calc(1px + 1%);\ \n}\n" ); } #[test] #[ignore] // wrong result fn double_preserved() { assert_eq!( runner().ok("a {b: calc(((var(--c))))}\n"), "a {\ \n b: calc(((var(--c))));\ \n}\n" ); } #[test] fn identifier() { assert_eq!( runner().ok("a {b: calc((d))}\n"), "a {\ \n b: calc((d));\ \n}\n" ); } #[test] fn interpolation() { assert_eq!( runner().ok("a {b: calc((#{\"1 + 2\"}))}\n"), "a {\ \n b: calc((1 + 2));\ \n}\n" ); } #[test] fn number() { assert_eq!( runner().ok("a {b: calc((1px))}\n"), "a {\ \n b: 1px;\ \n}\n" ); } #[test] fn operation() { assert_eq!( runner().ok("a {b: calc((1px + 1%))}\n"), "a {\ \n b: calc(1px + 1%);\ \n}\n" ); } mod var { #[allow(unused)] use super::runner; #[test] fn direct() { assert_eq!( runner().ok("a {b: calc((var(--c)))}\n"), "a {\ \n b: calc((var(--c)));\ \n}\n" ); } #[test] fn variable() { assert_eq!( runner().ok("$c: var(--d);\ \na {b: calc(($c))}\n"), "a {\ \n b: calc((var(--d)));\ \n}\n" ); } } #[test] fn variable() { assert_eq!( runner().ok("@use \"sass:string\";\ \n$c: string.unquote(\"1 + 2\");\ \na {b: calc(($c))}\n"), "a {\ \n b: calc((1 + 2));\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/calculation/calc/simplify.rs000066400000000000000000000047601474765622100251120ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/calc/simplify.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("simplify") } mod divide { #[allow(unused)] use super::runner; #[test] fn left() { assert_eq!( runner().ok("a {b: calc(3px / 2 + 1%)}\n"), "a {\ \n b: calc(1.5px + 1%);\ \n}\n" ); } #[test] fn right() { assert_eq!( runner().ok("a {b: calc(1% + 3px / 2)}\n"), "a {\ \n b: calc(1% + 1.5px);\ \n}\n" ); } } mod invert { #[allow(unused)] use super::runner; #[test] fn minus() { assert_eq!( runner().ok("a {b: calc(1% - -1px)}\n"), "a {\ \n b: calc(1% + 1px);\ \n}\n" ); } #[test] fn plus() { assert_eq!( runner().ok("a {b: calc(1% + -1px)}\n"), "a {\ \n b: calc(1% - 1px);\ \n}\n" ); } } mod minus { #[allow(unused)] use super::runner; #[test] fn left() { assert_eq!( runner().ok("a {b: calc(3px - 2px + 1%)}\n"), "a {\ \n b: calc(1px + 1%);\ \n}\n" ); } #[test] fn right() { assert_eq!( runner().ok("a {b: calc(1% + 3px - 2px)}\n"), "a {\ \n b: calc(1% + 3px - 2px);\ \n}\n" ); } } #[test] fn nested() { assert_eq!( runner().ok("a {b: calc(1% + calc(1px))}\n"), "a {\ \n b: calc(1% + 1px);\ \n}\n" ); } mod plus { #[allow(unused)] use super::runner; #[test] fn left() { assert_eq!( runner().ok("a {b: calc(1px + 2px + 1%)}\n"), "a {\ \n b: calc(3px + 1%);\ \n}\n" ); } #[test] fn right() { assert_eq!( runner().ok("a {b: calc(1% + 1px + 2px)}\n"), "a {\ \n b: calc(1% + 1px + 2px);\ \n}\n" ); } } mod times { #[allow(unused)] use super::runner; #[test] fn left() { assert_eq!( runner().ok("a {b: calc(3px * 2 + 1%)}\n"), "a {\ \n b: calc(6px + 1%);\ \n}\n" ); } #[test] fn right() { assert_eq!( runner().ok("a {b: calc(1% + 3px * 2)}\n"), "a {\ \n b: calc(1% + 6px);\ \n}\n" ); } } rsass-0.29.0/rsass/tests/spec/values/calculation/calc/space.rs000066400000000000000000000043721474765622100243500ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/calc/space.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("space") } mod interpolation { #[allow(unused)] use super::runner; #[test] fn after() { assert_eq!( runner().ok("a {b: calc(1 #{\"+ 2\"})}\n"), "a {\ \n b: calc(1 + 2);\ \n}\n" ); } #[test] fn before() { assert_eq!( runner().ok("a {b: calc(#{\"1 +\"} 2)}\n"), "a {\ \n b: calc(1 + 2);\ \n}\n" ); } #[test] fn between() { assert_eq!( runner().ok("a {b: calc(1 #{\"+ 2 +\"} 3)}\n"), "a {\ \n b: calc(1 + 2 + 3);\ \n}\n" ); } } mod var { #[allow(unused)] use super::runner; #[test] fn after() { assert_eq!( runner().ok("a {b: calc(1 var(--c))}\n"), "a {\ \n b: calc(1 var(--c));\ \n}\n" ); } #[test] fn before() { assert_eq!( runner().ok("a {b: calc(var(--c) 1)}\n"), "a {\ \n b: calc(var(--c) 1);\ \n}\n" ); } #[test] fn between() { assert_eq!( runner().ok("a {b: calc(1 var(--c) 2)}\n"), "a {\ \n b: calc(1 var(--c) 2);\ \n}\n" ); } } mod variable { #[allow(unused)] use super::runner; #[test] fn after() { assert_eq!( runner().ok("@use \"sass:string\";\ \n$c: string.unquote(\"+ 2\");\ \na {b: calc(1 $c)}\n"), "a {\ \n b: calc(1 + 2);\ \n}\n" ); } #[test] fn before() { assert_eq!( runner().ok("@use \"sass:string\";\ \n$c: string.unquote(\"1 +\");\ \na {b: calc($c 2)}\n"), "a {\ \n b: calc(1 + 2);\ \n}\n" ); } #[test] fn between() { assert_eq!( runner().ok("@use \"sass:string\";\ \n$c: string.unquote(\"+ 2 +\");\ \na {b: calc(1 $c 3)}\n"), "a {\ \n b: calc(1 + 2 + 3);\ \n}\n" ); } } rsass-0.29.0/rsass/tests/spec/values/calculation/calc_size.rs000066400000000000000000000055301474765622100243040ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/calc-size.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("calc-size") } #[test] #[ignore] // wrong result fn case_insensitive() { assert_eq!( runner().ok("a {b: CaLc-size(auto, size - 20px)}\n"), "a {\ \n b: calc-size(auto, size - 20px);\ \n}\n" ); } mod error { #[allow(unused)] use super::runner; #[test] #[ignore] // missing error fn sass_script() { assert_eq!( runner().err("a {b: calc-size(auto, 7 % 3)}\n"), "Error: This operation can\'t be used in a calculation.\ \n ,\ \n1 | a {b: calc-size(auto, 7 % 3)}\ \n | ^\ \n \'\ \n input.scss 1:25 root stylesheet", ); } mod syntax { #[allow(unused)] use super::runner; #[test] #[ignore] // wrong error fn invalid_arg() { assert_eq!( runner().err("a {b: calc-size(auto, $)}\n"), "Error: Expected identifier.\ \n ,\ \n1 | a {b: calc-size(auto, $)}\ \n | ^\ \n \'\ \n input.scss 1:24 root stylesheet", ); } } #[test] #[ignore] // missing error fn too_few_args() { assert_eq!( runner().err("a {b: calc-size()}\n"), "Error: Missing argument.\ \n ,\ \n1 | a {b: calc-size()}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] #[ignore] // missing error fn too_many_args() { assert_eq!( runner().err("a {b: calc-size(auto, 0, 0)}\n"), "Error: Only 2 arguments allowed, but 3 were passed.\ \n ,\ \n1 | a {b: calc-size(auto, 0, 0)}\ \n | ^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } } #[test] fn one_arg() { assert_eq!( runner().ok("a {b: calc-size(var(--foo))}\n"), "a {\ \n b: calc-size(var(--foo));\ \n}\n" ); } #[test] fn overridden() { assert_eq!( runner().ok("@function calc-size($arg) {@return $arg}\ \na {b: calc-size(1)}\n"), "a {\ \n b: 1;\ \n}\n" ); } #[test] #[ignore] // wrong result fn simplified() { assert_eq!( runner().ok("a {b: calc-size(auto, 100px - 20px + size)}\n"), "a {\ \n b: calc-size(auto, 80px + size);\ \n}\n" ); } #[test] #[ignore] // wrong result fn unsimplified() { assert_eq!( runner().ok("a {b: calc-size(auto, 5% - 20px + size)}\n"), "a {\ \n b: calc-size(auto, 5% - 20px + size);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/calculation/clamp.rs000066400000000000000000000204161474765622100234440ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/clamp.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("clamp") } #[test] fn case_insensitive() { assert_eq!( runner().ok("a {b: ClAmP(1px, 0px, 3px)}\n"), "a {\ \n b: 1px;\ \n}\n" ); } mod error { #[allow(unused)] use super::runner; #[test] #[ignore] // wrong error fn complex_unit() { assert_eq!( runner().err( "a {b: clamp(1px*1px, 2%*2%, 3px*3px)}\n" ), "Error: Number calc(1px * 1px) isn\'t compatible with CSS calculations.\ \n ,\ \n1 | a {b: clamp(1px*1px, 2%*2%, 3px*3px)}\ \n | ^^^^^^^\ \n \'\ \n input.scss 1:13 root stylesheet", ); } mod known_incompatible { #[allow(unused)] use super::runner; #[test] #[ignore] // wrong error fn first() { assert_eq!( runner().err("a {b: clamp(1s, 2px, 3px)}\n"), "Error: 1s and 2px are incompatible.\ \n ,\ \n1 | a {b: clamp(1s, 2px, 3px)}\ \n | ^^ 1s\ \n | === 2px\ \n \'\ \n input.scss 1:13 root stylesheet", ); } #[test] #[ignore] // wrong error fn second() { assert_eq!( runner().err("a {b: clamp(1px, 2s, 3px)}\n"), "Error: 1px and 2s are incompatible.\ \n ,\ \n1 | a {b: clamp(1px, 2s, 3px)}\ \n | ^^^ 1px\ \n | == 2s\ \n \'\ \n input.scss 1:13 root stylesheet", ); } #[test] #[ignore] // wrong error fn third() { assert_eq!( runner().err("a {b: clamp(1px, 2px, 3s)}\n"), "Error: 1px and 3s are incompatible.\ \n ,\ \n1 | a {b: clamp(1px, 2px, 3s)}\ \n | ^^^ 1px\ \n | == 3s\ \n \'\ \n input.scss 1:13 root stylesheet", ); } } mod syntax { #[allow(unused)] use super::runner; #[test] fn four_args() { assert_eq!( runner().err("a {b: clamp(1px, 2px, 3px, 4px)}\n"), "Error: Only 3 arguments allowed, but 4 were passed.\ \n ,\ \n1 | a {b: clamp(1px, 2px, 3px, 4px)}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] #[ignore] // wrong error fn invalid_arg() { assert_eq!( runner().err("a {b: clamp(1px, $, 2px)}\n"), "Error: Expected identifier.\ \n ,\ \n1 | a {b: clamp(1px, $, 2px)}\ \n | ^\ \n \'\ \n input.scss 1:19 root stylesheet", ); } #[test] fn no_args() { assert_eq!( runner().err("a {b: clamp()}\n"), "Error: Missing argument.\ \n ,\ \n1 | a {b: clamp()}\ \n | ^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn one_arg() { assert_eq!( runner().err("a {b: clamp(1px)}\n"), "Error: 3 arguments required, but only 1 was passed.\ \n ,\ \n1 | a {b: clamp(1px)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] #[ignore] // missing error fn rest() { assert_eq!( runner().err("a {b: clamp(1px 2px 3px...)}\n"), "Error: Rest arguments can\'t be used with calculations.\ \n ,\ \n1 | a {b: clamp(1px 2px 3px...)}\ \n | ^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn two_args() { assert_eq!( runner().err("a {b: clamp(1px, 2px)}\n"), "Error: 3 arguments required, but only 2 were passed.\ \n ,\ \n1 | a {b: clamp(1px, 2px)}\ \n | ^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } } } mod preserved { #[allow(unused)] use super::runner; mod math { #[allow(unused)] use super::runner; #[test] fn first() { assert_eq!( runner().ok("a {b: clamp(1% + 1px, 2px, 3px)}\n"), "a {\ \n b: clamp(1% + 1px, 2px, 3px);\ \n}\n" ); } #[test] fn second() { assert_eq!( runner().ok("a {b: clamp(1px, 1% + 2px, 3px)}\n"), "a {\ \n b: clamp(1px, 1% + 2px, 3px);\ \n}\n" ); } #[test] fn third() { assert_eq!( runner().ok("a {b: clamp(1px, 2px, 1% + 3px)}\n"), "a {\ \n b: clamp(1px, 2px, 1% + 3px);\ \n}\n" ); } } mod single_arg { #[allow(unused)] use super::runner; #[test] #[ignore] // unexepected error fn interpolation() { assert_eq!( runner().ok("a {b: clamp(#{c})}\n"), "a {\ \n b: clamp(c);\ \n}\n" ); } #[test] #[ignore] // unexepected error fn unquoted_string() { assert_eq!( runner().ok("$a: b;\ \nc {d: clamp($a)}\n"), "c {\ \n d: clamp(b);\ \n}\n" ); } #[test] fn var() { assert_eq!( runner().ok("a {b: clamp(var(--c))}\n"), "a {\ \n b: clamp(var(--c));\ \n}\n" ); } } mod unit { #[allow(unused)] use super::runner; #[test] fn first() { assert_eq!( runner().ok("a {b: clamp(1%, 2px, 3px)}\n"), "a {\ \n b: clamp(1%, 2px, 3px);\ \n}\n" ); } #[test] fn second() { assert_eq!( runner().ok("a {b: clamp(1px, 2%, 3px)}\n"), "a {\ \n b: clamp(1px, 2%, 3px);\ \n}\n" ); } #[test] fn third() { assert_eq!( runner().ok("a {b: clamp(1px, 2px, 3%)}\n"), "a {\ \n b: clamp(1px, 2px, 3%);\ \n}\n" ); } } } mod simplified { #[allow(unused)] use super::runner; #[test] fn between() { assert_eq!( runner().ok("a {b: clamp(1px, 2.5px, 3px)}\n"), "a {\ \n b: 2.5px;\ \n}\n" ); } #[test] fn compatible_units() { assert_eq!( runner().ok("a {b: clamp(1px, 1in, 1cm)}\n"), "a {\ \n b: 1cm;\ \n}\n" ); } mod lower_bound { #[allow(unused)] use super::runner; #[test] fn far_below() { assert_eq!( runner().ok("a {b: clamp(1px, 0px, 3px)}\n"), "a {\ \n b: 1px;\ \n}\n" ); } #[test] fn fuzzy_equal() { assert_eq!( runner().ok("a {b: clamp(1px, 1.00000000001px, 3px)}\n"), "a {\ \n b: 1px;\ \n}\n" ); } } mod upper_bound { #[allow(unused)] use super::runner; #[test] fn far_above() { assert_eq!( runner().ok("a {b: clamp(1px, 4px, 3px)}\n"), "a {\ \n b: 3px;\ \n}\n" ); } #[test] fn fuzzy_equal() { assert_eq!( runner().ok("a {b: clamp(1px, 2.99999999999px, 3px)}\n"), "a {\ \n b: 3px;\ \n}\n" ); } } } rsass-0.29.0/rsass/tests/spec/values/calculation/cos.rs000066400000000000000000000113611474765622100231330ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/cos.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("cos") } #[test] fn case_insensitive() { assert_eq!( runner().ok("a {b: cOs(1deg)}\n"), "a {\ \n b: 0.9998476952;\ \n}\n" ); } #[test] fn deg() { assert_eq!( runner().ok("a {b: cos(1deg)}\n"), "a {\ \n b: 0.9998476952;\ \n}\n" ); } mod error { #[allow(unused)] use super::runner; #[test] #[ignore] // missing error fn sass_script() { assert_eq!( runner().err("a {b: cos(7 % 3)}\n"), "Error: This operation can\'t be used in a calculation.\ \n ,\ \n1 | a {b: cos(7 % 3)}\ \n | ^\ \n \'\ \n input.scss 1:13 root stylesheet", ); } mod syntax { #[allow(unused)] use super::runner; #[test] #[ignore] // wrong error fn invalid_arg() { assert_eq!( runner().err("a {b: cos($)}\n"), "Error: Expected identifier.\ \n ,\ \n1 | a {b: cos($)}\ \n | ^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } } #[test] fn too_few_args() { assert_eq!( runner().err("a {b: cos()}\n"), "Error: Missing argument.\ \n ,\ \n1 | a {b: cos()}\ \n | ^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn too_many_args() { assert_eq!( runner().err("a {b: cos(0, 0)}\n"), "Error: Only 1 argument allowed, but 2 were passed.\ \n ,\ \n1 | a {b: cos(0, 0)}\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] #[ignore] // wrong error fn test_type() { assert_eq!( runner().err("a {b: cos(\"0\")}\n"), "Error: This expression can\'t be used in a calculation.\ \n ,\ \n1 | a {b: cos(\"0\")}\ \n | ^^^\ \n \'\ \n input.scss 1:11 root stylesheet", ); } mod unit { #[allow(unused)] use super::runner; #[test] fn complex() { assert_eq!( runner().err( "a {b: cos(-7px / 4em)}\n" ), "Error: $number: Expected calc(-1.75px / 1em) to have an angle unit (deg, grad, rad, turn).\ \n ,\ \n1 | a {b: cos(-7px / 4em)}\ \n | ^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn known() { assert_eq!( runner().err( "a {b: cos(1px)}\n" ), "Error: $number: Expected 1px to have an angle unit (deg, grad, rad, turn).\ \n ,\ \n1 | a {b: cos(1px)}\ \n | ^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn unknown() { assert_eq!( runner().err( "a {b: cos(1%)}\n" ), "Error: $number: Expected 1% to have an angle unit (deg, grad, rad, turn).\ \n ,\ \n1 | a {b: cos(1%)}\ \n | ^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } } } #[test] fn grad() { assert_eq!( runner().ok("a {b: cos(1grad)}\n"), "a {\ \n b: 0.9998766325;\ \n}\n" ); } #[test] fn infinity() { assert_eq!( runner().ok("a {b: cos(infinity)}\n"), "a {\ \n b: calc(NaN);\ \n}\n" ); } #[test] fn negative_infinity() { assert_eq!( runner().ok("a {b: cos(-infinity)}\n"), "a {\ \n b: calc(NaN);\ \n}\n" ); } #[test] fn overridden() { assert_eq!( runner().ok("@function cos($arg) {@return $arg}\ \na {b: cos(1)}\n"), "a {\ \n b: 1;\ \n}\n" ); } #[test] fn rad() { assert_eq!( runner().ok("a {b: cos(1rad)}\n"), "a {\ \n b: 0.5403023059;\ \n}\n" ); } #[test] fn simplification() { assert_eq!( runner().ok("a {\ \n b: cos(3px - 1px + var(--c));\ \n}\n"), "a {\ \n b: cos(2px + var(--c));\ \n}\n" ); } #[test] fn turn() { assert_eq!( runner().ok("a {b: cos(1turn)}\n"), "a {\ \n b: 1;\ \n}\n" ); } #[test] fn zero() { assert_eq!( runner().ok("a {b: cos(0)}\n"), "a {\ \n b: 1;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/calculation/exp.rs000066400000000000000000000076551474765622100231560ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/exp.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("exp") } #[test] fn case_insensitive() { assert_eq!( runner().ok("a {b: ExP(5)}\n"), "a {\ \n b: 148.4131591026;\ \n}\n" ); } mod error { #[allow(unused)] use super::runner; #[test] #[ignore] // missing error fn sass_script() { assert_eq!( runner().err("a {b: exp(7 % 3)}\n"), "Error: This operation can\'t be used in a calculation.\ \n ,\ \n1 | a {b: exp(7 % 3)}\ \n | ^\ \n \'\ \n input.scss 1:13 root stylesheet", ); } mod syntax { #[allow(unused)] use super::runner; #[test] #[ignore] // wrong error fn invalid_arg() { assert_eq!( runner().err("a {b: exp($)}\n"), "Error: Expected identifier.\ \n ,\ \n1 | a {b: exp($)}\ \n | ^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } } #[test] fn too_few_args() { assert_eq!( runner().err("a {b: exp()}\n"), "Error: Missing argument.\ \n ,\ \n1 | a {b: exp()}\ \n | ^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn too_many_args() { assert_eq!( runner().err("a {b: exp(0, 0)}\n"), "Error: Only 1 argument allowed, but 2 were passed.\ \n ,\ \n1 | a {b: exp(0, 0)}\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] #[ignore] // wrong error fn test_type() { assert_eq!( runner().err("a {b: exp(\"0\")}\n"), "Error: This expression can\'t be used in a calculation.\ \n ,\ \n1 | a {b: exp(\"0\")}\ \n | ^^^\ \n \'\ \n input.scss 1:11 root stylesheet", ); } mod unit { #[allow(unused)] use super::runner; #[test] fn known() { assert_eq!( runner().err("a {b: exp(1px)}\n"), "Error: Expected 1px to have no units.\ \n ,\ \n1 | a {b: exp(1px)}\ \n | ^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } } mod units { #[allow(unused)] use super::runner; #[test] fn unknown() { assert_eq!( runner().err("a {b: exp(1%)}\n"), "Error: Expected 1% to have no units.\ \n ,\ \n1 | a {b: exp(1%)}\ \n | ^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } } } #[test] fn negative() { assert_eq!( runner().ok("a {b: exp(-10.5)}\n"), "a {\ \n b: 0.0000275364;\ \n}\n" ); } #[test] fn overridden() { assert_eq!( runner().ok("@function exp($arg) {@return $arg}\ \na {b: exp(1)}\n"), "a {\ \n b: 1;\ \n}\n" ); } #[test] fn positive() { assert_eq!( runner().ok("a {b: exp(5)}\n"), "a {\ \n b: 148.4131591026;\ \n}\n" ); } #[test] fn result_is_infinity() { assert_eq!( runner().ok("a {b: exp(1000.65)}\n"), "a {\ \n b: calc(infinity);\ \n}\n" ); } #[test] fn simplification() { assert_eq!( runner().ok("a {\ \n b: exp(1px + 2px - var(--c))\ \n}\n"), "a {\ \n b: exp(3px - var(--c));\ \n}\n" ); } #[test] fn zero() { assert_eq!( runner().ok("a {b: exp(0)}\n"), "a {\ \n b: 1;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/calculation/hypot.rs000066400000000000000000000162141474765622100235140ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/hypot.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("hypot") } #[test] fn case_insensitive() { assert_eq!( runner().ok("a {b: hYpOt(1, 2)}\n"), "a {\ \n b: 2.2360679775;\ \n}\n" ); } mod error { #[allow(unused)] use super::runner; #[test] #[ignore] // wrong error fn first_type() { assert_eq!( runner().err("a {b: hypot(\"0\", 1px, 1px)}\n"), "Error: This expression can\'t be used in a calculation.\ \n ,\ \n1 | a {b: hypot(\"0\", 1px, 1px)}\ \n | ^^^\ \n \'\ \n input.scss 1:13 root stylesheet", ); } #[test] #[ignore] // missing error fn sass_script() { assert_eq!( runner().err("a {b: hypot(7 % 3, 1)}\n"), "Error: This operation can\'t be used in a calculation.\ \n ,\ \n1 | a {b: hypot(7 % 3, 1)}\ \n | ^\ \n \'\ \n input.scss 1:15 root stylesheet", ); } #[test] #[ignore] // wrong error fn second_type() { assert_eq!( runner().err("a {b: hypot(1px, \"0\", 1px)}\n"), "Error: This expression can\'t be used in a calculation.\ \n ,\ \n1 | a {b: hypot(1px, \"0\", 1px)}\ \n | ^^^\ \n \'\ \n input.scss 1:18 root stylesheet", ); } mod syntax { #[allow(unused)] use super::runner; #[test] #[ignore] // wrong error fn invalid_arg() { assert_eq!( runner().err("a {b: hypot(12, $, 14)}\n"), "Error: Expected identifier.\ \n ,\ \n1 | a {b: hypot(12, $, 14)}\ \n | ^\ \n \'\ \n input.scss 1:18 root stylesheet", ); } } #[test] fn too_few_args() { assert_eq!( runner().err("a {b: hypot()}\n"), "Error: Missing argument.\ \n ,\ \n1 | a {b: hypot()}\ \n | ^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } mod units { #[allow(unused)] use super::runner; mod incompatible { #[allow(unused)] use super::runner; #[test] #[ignore] // missing error fn first_and_second() { assert_eq!( runner().err("a {b: hypot(1deg, 1px, 1turn)}\n"), "Error: 1deg and 1px are incompatible.\ \n ,\ \n1 | a {b: hypot(1deg, 1px, 1turn)}\ \n | ^^^^ 1deg\ \n | === 1px\ \n \'\ \n input.scss 1:13 root stylesheet", ); } #[test] #[ignore] // missing error fn first_and_third() { assert_eq!( runner().err("a {b: hypot(1deg, 1turn, 1px)}\n"), "Error: 1deg and 1px are incompatible.\ \n ,\ \n1 | a {b: hypot(1deg, 1turn, 1px)}\ \n | ^^^^ 1deg\ \n | === 1px\ \n \'\ \n input.scss 1:13 root stylesheet", ); } #[test] #[ignore] // missing error fn second_and_third() { assert_eq!( runner().err("a {b: hypot(1turn, 1deg, 1px)}\n"), "Error: 1turn and 1px are incompatible.\ \n ,\ \n1 | a {b: hypot(1turn, 1deg, 1px)}\ \n | ^^^^^ 1turn\ \n | === 1px\ \n \'\ \n input.scss 1:13 root stylesheet", ); } } #[test] #[ignore] // missing error fn real_and_unitless() { assert_eq!( runner().err("a {b: hypot(1px, 1)}\n"), "Error: 1px and 1 are incompatible.\ \n ,\ \n1 | a {b: hypot(1px, 1)}\ \n | ^^^ 1px\ \n | = 1\ \n \'\ \n input.scss 1:13 root stylesheet", ); } } #[test] #[ignore] // wrong error fn unsimplifiable() { assert_eq!( runner().err( "a {b: hypot(-7px / 4em)}\n" ), "Error: Number calc(-1.75px / 1em) isn\'t compatible with CSS calculations.\ \n ,\ \n1 | a {b: hypot(-7px / 4em)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:13 root stylesheet", ); } } mod infinity { #[allow(unused)] use super::runner; #[test] fn first() { assert_eq!( runner().ok("a {b: hypot(infinity, 1, 1)}\n"), "a {\ \n b: calc(infinity);\ \n}\n" ); } #[test] fn second() { assert_eq!( runner().ok("a {b: hypot(1, infinity, 1)}\n"), "a {\ \n b: calc(infinity);\ \n}\n" ); } } #[test] fn overridden() { assert_eq!( runner().ok("@function hypot($arg1, $arg2) {@return $arg1}\ \na {b: hypot(1, 2)}\n"), "a {\ \n b: 1;\ \n}\n" ); } #[test] fn simplification() { assert_eq!( runner().ok("a {\ \n b: hypot(1px + 2px - var(--c), -7px + 4em)\ \n}\n"), "a {\ \n b: hypot(3px - var(--c), -7px + 4em);\ \n}\n" ); } mod units { #[allow(unused)] use super::runner; #[test] fn compatible() { assert_eq!( runner().ok("a {b: hypot(13cm, 4mm, 5q, 6in, 7px)}\n"), "a {\ \n b: 20.0366545892cm;\ \n}\n" ); } #[test] fn fake() { assert_eq!( runner().ok("a {\ \n b: hypot(1foo, 2bar);\ \n}\n"), "a {\ \n b: hypot(1foo, 2bar);\ \n}\n" ); } #[test] fn none() { assert_eq!( runner().ok("a {b: hypot(3, 4, 5, 6, 7)}\n"), "a {\ \n b: 11.6189500386;\ \n}\n" ); } #[test] fn real_and_fake() { assert_eq!( runner().ok("a {\ \n b: hypot(1px, 2bar);\ \n}\n"), "a {\ \n b: hypot(1px, 2bar);\ \n}\n" ); } #[test] fn real_and_unknown() { assert_eq!( runner().ok("a {b: hypot(13cm, 4%)}\n"), "a {\ \n b: hypot(13cm, 4%);\ \n}\n" ); } #[test] fn same_fake() { assert_eq!( runner().ok("a {\ \n b: hypot(1foo, 2foo);\ \n}\n"), "a {\ \n b: 2.2360679775foo;\ \n}\n" ); } #[test] fn unknown() { assert_eq!( runner().ok("a {\ \n b: hypot(1%, 2%);\ \n}\n"), "a {\ \n b: hypot(1%, 2%);\ \n}\n" ); } } rsass-0.29.0/rsass/tests/spec/values/calculation/log.rs000066400000000000000000000144111474765622100231270ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/log.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("log") } mod base { #[allow(unused)] use super::runner; #[test] fn between_zero_and_one() { assert_eq!( runner().ok("a {b: log(2, 0.5)}\n"), "a {\ \n b: -1;\ \n}\n" ); } #[test] fn negative() { assert_eq!( runner().ok("a {b: log(2, -1)}\n"), "a {\ \n b: calc(NaN);\ \n}\n" ); } #[test] fn one() { assert_eq!( runner().ok("a {b: log(2, 1)}\n"), "a {\ \n b: calc(infinity);\ \n}\n" ); } #[test] fn positive() { assert_eq!( runner().ok("a {b: log(2, 10)}\n"), "a {\ \n b: 0.3010299957;\ \n}\n" ); } #[test] fn zero() { assert_eq!( runner().ok("a {b: log(2, 0)}\n"), "a {\ \n b: 0;\ \n}\n" ); } } #[test] fn case_insensitive() { assert_eq!( runner().ok("a {b: LoG(2)}\n"), "a {\ \n b: 0.6931471806;\ \n}\n" ); } mod error { #[allow(unused)] use super::runner; #[test] #[ignore] // wrong error fn base_type() { assert_eq!( runner().err("a {b: log(0, \"0\")}\n"), "Error: This expression can\'t be used in a calculation.\ \n ,\ \n1 | a {b: log(0, \"0\")}\ \n | ^^^\ \n \'\ \n input.scss 1:14 root stylesheet", ); } #[test] #[ignore] // wrong error fn number_type() { assert_eq!( runner().err("a {b: log(\"0\")}\n"), "Error: This expression can\'t be used in a calculation.\ \n ,\ \n1 | a {b: log(\"0\")}\ \n | ^^^\ \n \'\ \n input.scss 1:11 root stylesheet", ); } #[test] #[ignore] // missing error fn sass_script() { assert_eq!( runner().err("a {b: log(7 % 3)}\n"), "Error: This operation can\'t be used in a calculation.\ \n ,\ \n1 | a {b: log(7 % 3)}\ \n | ^\ \n \'\ \n input.scss 1:13 root stylesheet", ); } mod syntax { #[allow(unused)] use super::runner; #[test] #[ignore] // wrong error fn invalid_arg() { assert_eq!( runner().err("a {b: log($, 10)}\n"), "Error: Expected identifier.\ \n ,\ \n1 | a {b: log($, 10)}\ \n | ^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } } #[test] fn too_few_args() { assert_eq!( runner().err("a {b: log()}\n"), "Error: Missing argument.\ \n ,\ \n1 | a {b: log()}\ \n | ^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn too_many_args() { assert_eq!( runner().err("a {b: log(0, 0, 0)}\n"), "Error: Only 2 arguments allowed, but 3 were passed.\ \n ,\ \n1 | a {b: log(0, 0, 0)}\ \n | ^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } mod units { #[allow(unused)] use super::runner; #[test] fn complex_and_unknown() { assert_eq!( runner().err("a {b: log(1px*2px, 10%)}\n"), "Error: Expected calc(2px * 1px) to have no units.\ \n ,\ \n1 | a {b: log(1px*2px, 10%)}\ \n | ^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn known() { assert_eq!( runner().err("a {b: log(3px)}\n"), "Error: Expected 3px to have no units.\ \n ,\ \n1 | a {b: log(3px)}\ \n | ^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn known_incompatible() { assert_eq!( runner().err("a {b: log(1deg, 1px)}\n"), "Error: Expected 1deg to have no units.\ \n ,\ \n1 | a {b: log(1deg, 1px)}\ \n | ^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn unitless_and_real() { assert_eq!( runner().err("a {b: log(1, 1px)}\n"), "Error: Expected 1px to have no units.\ \n ,\ \n1 | a {b: log(1, 1px)}\ \n | ^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn unknown() { assert_eq!( runner().err("a {b: log(1%)}\n"), "Error: Expected 1% to have no units.\ \n ,\ \n1 | a {b: log(1%)}\ \n | ^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } } } #[test] fn infinity() { assert_eq!( runner().ok("a {b: log(infinity)}\n"), "a {\ \n b: calc(infinity);\ \n}\n" ); } #[test] fn negative() { assert_eq!( runner().ok("a {b: log(-1)}\n"), "a {\ \n b: calc(NaN);\ \n}\n" ); } #[test] fn overridden() { assert_eq!( runner().ok("@function log($arg) {@return $arg}\ \na {b: log(2)}\n"), "a {\ \n b: 2;\ \n}\n" ); } #[test] fn positive() { assert_eq!( runner().ok("a {b: log(2)}\n"), "a {\ \n b: 0.6931471806;\ \n}\n" ); } #[test] fn simplification() { assert_eq!( runner().ok("a {\ \n b: log(3px - 1px + var(--c), var(--e));\ \n}\n"), "a {\ \n b: log(2px + var(--c), var(--e));\ \n}\n" ); } #[test] fn zero() { assert_eq!( runner().ok("a {b: log(0)}\n"), "a {\ \n b: calc(-infinity);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/calculation/max.rs000066400000000000000000000216471474765622100231440ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/max.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("max") } #[test] fn case_insensitive() { assert_eq!( runner().ok("a {b: mAx(1px)}\n"), "a {\ \n b: 1px;\ \n}\n" ); } mod error { #[allow(unused)] use super::runner; #[test] #[ignore] // wrong error fn complex_unit() { assert_eq!( runner().err( "a {b: max(1px*1px, 2%*2%)}\n" ), "Error: Number calc(1px * 1px) isn\'t compatible with CSS calculations.\ \n ,\ \n1 | a {b: max(1px*1px, 2%*2%)}\ \n | ^^^^^^^\ \n \'\ \n input.scss 1:11 root stylesheet", ); } mod known_incompatible { #[allow(unused)] use super::runner; #[test] #[ignore] // wrong error fn first() { assert_eq!( runner().err("a {b: max(1s, 2px)}\n"), "Error: 1s and 2px are incompatible.\ \n ,\ \n1 | a {b: max(1s, 2px)}\ \n | ^^ 1s\ \n | === 2px\ \n \'\ \n input.scss 1:11 root stylesheet", ); } #[test] #[ignore] // wrong error fn second() { assert_eq!( runner().err("a {b: max(1px, 2s)}\n"), "Error: 1px and 2s are incompatible.\ \n ,\ \n1 | a {b: max(1px, 2s)}\ \n | ^^^ 1px\ \n | == 2s\ \n \'\ \n input.scss 1:11 root stylesheet", ); } #[test] #[ignore] // wrong error fn third() { assert_eq!( runner().err("a {b: max(1px, 2px, 3s)}\n"), "Error: 1px and 3s are incompatible.\ \n ,\ \n1 | a {b: max(1px, 2px, 3s)}\ \n | ^^^ 1px\ \n | == 3s\ \n \'\ \n input.scss 1:11 root stylesheet", ); } } #[test] #[ignore] // wrong error fn potentially_incompatible_before_unitless() { assert_eq!( runner().err("a {b: max(1c, 2d, 3)}\n"), "Error: 1c and 3 are incompatible.\ \n ,\ \n1 | a {b: max(1c, 2d, 3)}\ \n | ^^ 1c\ \n | = 3\ \n \'\ \n input.scss 1:11 root stylesheet", ); } mod syntax { #[allow(unused)] use super::runner; #[test] #[ignore] // wrong error fn invalid_arg() { assert_eq!( runner().err("a {b: max($)}\n"), "Error: Expected identifier.\ \n ,\ \n1 | a {b: max($)}\ \n | ^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] #[ignore] // wrong error fn no_args() { assert_eq!( runner().err("a {b: max()}\n"), "Error: Missing argument.\ \n ,\ \n1 | a {b: max()}\ \n | ^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } } mod unitless_and_real { #[allow(unused)] use super::runner; #[test] #[ignore] // missing error fn in_calc() { assert_eq!( runner().err("a {b: max(calc(1px + 2))}\n"), "Error: 1px and 2 are incompatible.\ \n ,\ \n1 | a {b: max(calc(1px + 2))}\ \n | ^^^^^^^\ \n \'\ \n input.scss 1:16 root stylesheet", ); } } } mod extra_whitespace { #[allow(unused)] use super::runner; #[test] fn min_in_max() { assert_eq!( runner().ok("// Regression test for sass/dart-sass#1444\ \na {b: max( min( 1px ) )}\n"), "a {\ \n b: 1px;\ \n}\n" ); } #[test] fn number() { assert_eq!( runner().ok("a {b: max( 1px )}\n"), "a {\ \n b: 1px;\ \n}\n" ); } } mod math { #[allow(unused)] use super::runner; #[test] fn slash_as_division() { assert_eq!( runner().ok("b { \ \n a: 2px / max(1.5);\ \n}\n"), "b {\ \n a: 1.3333333333px;\ \n}\n" ); } } #[test] fn overridden() { assert_eq!( runner().ok("@function max($arg1, $arg2) {@return $arg1}\ \na {b: max(1, 2)}\n"), "a {\ \n b: 1;\ \n}\n" ); } mod preserved { #[allow(unused)] use super::runner; mod math { #[allow(unused)] use super::runner; #[test] fn first() { assert_eq!( runner().ok("a {b: max(1% + 1px, 2px)}\n"), "a {\ \n b: max(1% + 1px, 2px);\ \n}\n" ); } #[test] fn second() { assert_eq!( runner().ok("a {b: max(1px, 1% + 2px)}\n"), "a {\ \n b: max(1px, 1% + 2px);\ \n}\n" ); } #[test] fn third() { assert_eq!( runner().ok("a {b: max(1px, 2px, 1% + 3px)}\n"), "a {\ \n b: max(1px, 2px, 1% + 3px);\ \n}\n" ); } } mod operation { #[allow(unused)] use super::runner; mod unitless_and_real { #[allow(unused)] use super::runner; #[test] fn in_calc() { assert_eq!( runner().ok("a {b: calc(max(1%, 2.5 + 0.9px))}\n"), "a {\ \n b: max(1%, 3.4px);\ \n}\n" ); } #[test] fn minus() { assert_eq!( runner().ok("a {b: max(1%, 2.5 - 0.9px)}\n"), "a {\ \n b: max(1%, 1.6px);\ \n}\n" ); } #[test] fn plus() { assert_eq!( runner().ok("a {b: max(1%, 2.5 + 0.9px)}\n"), "a {\ \n b: max(1%, 3.4px);\ \n}\n" ); } } } mod unit { #[allow(unused)] use super::runner; #[test] fn first() { assert_eq!( runner().ok("a {b: max(1%, 2px)}\n"), "a {\ \n b: max(1%, 2px);\ \n}\n" ); } #[test] fn second() { assert_eq!( runner().ok("a {b: max(1px, 2%)}\n"), "a {\ \n b: max(1px, 2%);\ \n}\n" ); } #[test] fn third() { assert_eq!( runner().ok("a {b: max(1px, 2px, 3%)}\n"), "a {\ \n b: max(1px, 2px, 3%);\ \n}\n" ); } } #[test] fn variable() { assert_eq!( runner().ok("$a: 1%;\ \nb {c: max($a, 1px)}\n"), "b {\ \n c: max(1%, 1px);\ \n}\n" ); } } mod simplified { #[allow(unused)] use super::runner; #[test] fn compatible_units() { assert_eq!( runner().ok("a {b: max(1px, 1in, 1cm)}\n"), "a {\ \n b: 1in;\ \n}\n" ); } #[test] fn first() { assert_eq!( runner().ok("a {b: max(1px, 0px)}\n"), "a {\ \n b: 1px;\ \n}\n" ); } #[test] fn only() { assert_eq!( runner().ok("a {b: max(1px)}\n"), "a {\ \n b: 1px;\ \n}\n" ); } mod operation { #[allow(unused)] use super::runner; #[test] fn unitless_and_real() { assert_eq!( runner().ok("a {b: max(1px, 2.5 + 0.9px)}\n"), "a {\ \n b: 3.4px;\ \n}\n" ); } } #[test] fn second() { assert_eq!( runner().ok("a {b: max(0.5px, 2px)}\n"), "a {\ \n b: 2px;\ \n}\n" ); } #[test] fn third() { assert_eq!( runner().ok("a {b: max(1px, 2.5px, 2.9px)}\n"), "a {\ \n b: 2.9px;\ \n}\n" ); } #[test] fn unitless_and_real() { assert_eq!( runner().ok("a {b: max(1px, 2.5, 0.9px)}\n"), "a {\ \n b: 2.5;\ \n}\n" ); } #[test] fn unitless_between_potentially_incompatible() { assert_eq!( runner().ok("a {b: max(1d, 2, 3e)}\n"), "a {\ \n b: 3e;\ \n}\n" ); } } rsass-0.29.0/rsass/tests/spec/values/calculation/min.rs000066400000000000000000000216501474765622100231340ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/min.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("min") } #[test] fn case_insensitive() { assert_eq!( runner().ok("a {b: MiN(1px)}\n"), "a {\ \n b: 1px;\ \n}\n" ); } mod error { #[allow(unused)] use super::runner; #[test] #[ignore] // wrong error fn complex_unit() { assert_eq!( runner().err( "a {b: min(1px*1px, 2%*2%)}\n" ), "Error: Number calc(1px * 1px) isn\'t compatible with CSS calculations.\ \n ,\ \n1 | a {b: min(1px*1px, 2%*2%)}\ \n | ^^^^^^^\ \n \'\ \n input.scss 1:11 root stylesheet", ); } mod known_incompatible { #[allow(unused)] use super::runner; #[test] #[ignore] // wrong error fn first() { assert_eq!( runner().err("a {b: min(1s, 2px)}\n"), "Error: 1s and 2px are incompatible.\ \n ,\ \n1 | a {b: min(1s, 2px)}\ \n | ^^ 1s\ \n | === 2px\ \n \'\ \n input.scss 1:11 root stylesheet", ); } #[test] #[ignore] // wrong error fn second() { assert_eq!( runner().err("a {b: min(1px, 2s)}\n"), "Error: 1px and 2s are incompatible.\ \n ,\ \n1 | a {b: min(1px, 2s)}\ \n | ^^^ 1px\ \n | == 2s\ \n \'\ \n input.scss 1:11 root stylesheet", ); } #[test] #[ignore] // wrong error fn third() { assert_eq!( runner().err("a {b: min(1px, 2px, 3s)}\n"), "Error: 1px and 3s are incompatible.\ \n ,\ \n1 | a {b: min(1px, 2px, 3s)}\ \n | ^^^ 1px\ \n | == 3s\ \n \'\ \n input.scss 1:11 root stylesheet", ); } } mod syntax { #[allow(unused)] use super::runner; #[test] #[ignore] // wrong error fn invalid_arg() { assert_eq!( runner().err("a {b: min($)}\n"), "Error: Expected identifier.\ \n ,\ \n1 | a {b: min($)}\ \n | ^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } #[test] #[ignore] // wrong error fn no_args() { assert_eq!( runner().err("a {b: min()}\n"), "Error: Missing argument.\ \n ,\ \n1 | a {b: min()}\ \n | ^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } } #[test] #[ignore] // wrong error fn unitless_after_potentially_incompatible() { assert_eq!( runner().err("a {b: min(1c, 2d, 3)}\n"), "Error: 1c and 3 are incompatible.\ \n ,\ \n1 | a {b: min(1c, 2d, 3)}\ \n | ^^ 1c\ \n | = 3\ \n \'\ \n input.scss 1:11 root stylesheet", ); } mod unitless_and_real { #[allow(unused)] use super::runner; #[test] #[ignore] // missing error fn in_calc() { assert_eq!( runner().err("a {b: min(calc(1px + 2))}\n"), "Error: 1px and 2 are incompatible.\ \n ,\ \n1 | a {b: min(calc(1px + 2))}\ \n | ^^^^^^^\ \n \'\ \n input.scss 1:16 root stylesheet", ); } } } mod extra_whitespace { #[allow(unused)] use super::runner; #[test] fn max_in_min() { assert_eq!( runner().ok("// Regression test for sass/dart-sass#1444\ \na {b: min( max( 1px ) )}\n"), "a {\ \n b: 1px;\ \n}\n" ); } #[test] fn number() { assert_eq!( runner().ok("a {b: min( 1px )}\n"), "a {\ \n b: 1px;\ \n}\n" ); } } mod math { #[allow(unused)] use super::runner; #[test] fn slash_as_division() { assert_eq!( runner().ok("b { \ \n a: 2px / min(1.5);\ \n}\n"), "b {\ \n a: 1.3333333333px;\ \n}\n" ); } } #[test] fn overridden() { assert_eq!( runner().ok("@function min($arg1, $arg2) {@return $arg1}\ \na {b: min(2, 1)}\n"), "a {\ \n b: 2;\ \n}\n" ); } mod preserved { #[allow(unused)] use super::runner; mod math { #[allow(unused)] use super::runner; #[test] fn first() { assert_eq!( runner().ok("a {b: min(1% + 1px, 2px)}\n"), "a {\ \n b: min(1% + 1px, 2px);\ \n}\n" ); } #[test] fn second() { assert_eq!( runner().ok("a {b: min(1px, 1% + 2px)}\n"), "a {\ \n b: min(1px, 1% + 2px);\ \n}\n" ); } #[test] fn third() { assert_eq!( runner().ok("a {b: min(1px, 2px, 1% + 3px)}\n"), "a {\ \n b: min(1px, 2px, 1% + 3px);\ \n}\n" ); } } mod operation { #[allow(unused)] use super::runner; mod unitless_and_real { #[allow(unused)] use super::runner; #[test] fn in_calc() { assert_eq!( runner().ok("a {b: calc(min(1%, 2.5 + 0.9px))}\n"), "a {\ \n b: min(1%, 3.4px);\ \n}\n" ); } #[test] fn minus() { assert_eq!( runner().ok("a {b: min(1%, 2.5 - 0.9px)}\n"), "a {\ \n b: min(1%, 1.6px);\ \n}\n" ); } #[test] fn plus() { assert_eq!( runner().ok("a {b: min(1%, 2.5 + 0.9px)}\n"), "a {\ \n b: min(1%, 3.4px);\ \n}\n" ); } } } mod unit { #[allow(unused)] use super::runner; #[test] fn first() { assert_eq!( runner().ok("a {b: min(1%, 2px)}\n"), "a {\ \n b: min(1%, 2px);\ \n}\n" ); } #[test] fn second() { assert_eq!( runner().ok("a {b: min(1px, 2%)}\n"), "a {\ \n b: min(1px, 2%);\ \n}\n" ); } #[test] fn third() { assert_eq!( runner().ok("a {b: min(1px, 2px, 3%)}\n"), "a {\ \n b: min(1px, 2px, 3%);\ \n}\n" ); } } #[test] fn variable() { assert_eq!( runner().ok("$a: 1%;\ \nb {c: min($a, 1px)}\n"), "b {\ \n c: min(1%, 1px);\ \n}\n" ); } } mod simplified { #[allow(unused)] use super::runner; #[test] fn compatible_units() { assert_eq!( runner().ok("a {b: min(1px, 1in, 1cm)}\n"), "a {\ \n b: 1px;\ \n}\n" ); } #[test] fn first() { assert_eq!( runner().ok("a {b: min(0px, 1px)}\n"), "a {\ \n b: 0px;\ \n}\n" ); } #[test] fn only() { assert_eq!( runner().ok("a {b: min(1px)}\n"), "a {\ \n b: 1px;\ \n}\n" ); } mod operation { #[allow(unused)] use super::runner; #[test] fn unitless_and_real() { assert_eq!( runner().ok("a {b: min(1px, 2.5 + 0.9px)}\n"), "a {\ \n b: 1px;\ \n}\n" ); } } #[test] fn second() { assert_eq!( runner().ok("a {b: min(1px, 0.5px)}\n"), "a {\ \n b: 0.5px;\ \n}\n" ); } #[test] fn third() { assert_eq!( runner().ok("a {b: min(1px, 2.5px, 0.9px)}\n"), "a {\ \n b: 0.9px;\ \n}\n" ); } #[test] fn unitless_and_real() { assert_eq!( runner().ok("a {b: min(1px, 2.5, 0.9px)}\n"), "a {\ \n b: 0.9px;\ \n}\n" ); } #[test] fn unitless_between_potentially_incompatible() { assert_eq!( runner().ok("a {b: min(3d, 2, 1e)}\n"), "a {\ \n b: 1e;\ \n}\n" ); } } rsass-0.29.0/rsass/tests/spec/values/calculation/mod.rs000066400000000000000000000006321474765622100231250ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("calculation") } mod abs; mod acos; mod asin; mod atan; mod atan2; mod calc; mod calc_size; mod clamp; mod cos; mod exp; mod hypot; mod log; mod max; mod min; mod test_mod; mod pow; mod rem; mod round; mod sign; mod sin; mod sqrt; mod tan; rsass-0.29.0/rsass/tests/spec/values/calculation/pow.rs000066400000000000000000000125301474765622100231530ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/pow.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("pow") } mod base { #[allow(unused)] use super::runner; #[test] fn negative() { assert_eq!( runner().ok("a {b: pow(-10, 10)}\n"), "a {\ \n b: 10000000000;\ \n}\n" ); } } #[test] fn case_insensitive() { assert_eq!( runner().ok("a {b: pOw(10, 10)}\n"), "a {\ \n b: 10000000000;\ \n}\n" ); } mod error { #[allow(unused)] use super::runner; #[test] #[ignore] // wrong error fn base_type() { assert_eq!( runner().err("a {b: pow(0, \"0\")}\n"), "Error: This expression can\'t be used in a calculation.\ \n ,\ \n1 | a {b: pow(0, \"0\")}\ \n | ^^^\ \n \'\ \n input.scss 1:14 root stylesheet", ); } #[test] #[ignore] // wrong error fn exponent_type() { assert_eq!( runner().err("a {b: pow(\"0\", 0)}\n"), "Error: This expression can\'t be used in a calculation.\ \n ,\ \n1 | a {b: pow(\"0\", 0)}\ \n | ^^^\ \n \'\ \n input.scss 1:11 root stylesheet", ); } #[test] #[ignore] // missing error fn sass_script() { assert_eq!( runner().err("a {b: pow(7 % 3, 1)}\n"), "Error: This operation can\'t be used in a calculation.\ \n ,\ \n1 | a {b: pow(7 % 3, 1)}\ \n | ^\ \n \'\ \n input.scss 1:13 root stylesheet", ); } mod syntax { #[allow(unused)] use super::runner; #[test] #[ignore] // wrong error fn invalid_arg() { assert_eq!( runner().err("a {b: pow(10, $)}\n"), "Error: Expected identifier.\ \n ,\ \n1 | a {b: pow(10, $)}\ \n | ^\ \n \'\ \n input.scss 1:16 root stylesheet", ); } } #[test] fn too_few_args() { assert_eq!( runner().err("a {b: pow(3)}\n"), "Error: 2 arguments required, but only 1 was passed.\ \n ,\ \n1 | a {b: pow(3)}\ \n | ^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn too_many_args() { assert_eq!( runner().err("a {b: pow(3, 2, 1)}\n"), "Error: Only 2 arguments allowed, but 3 were passed.\ \n ,\ \n1 | a {b: pow(3, 2, 1)}\ \n | ^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } mod units { #[allow(unused)] use super::runner; #[test] fn compatible() { assert_eq!( runner().err("a {b: pow(10px, 10px)}\n"), "Error: Expected 10px to have no units.\ \n ,\ \n1 | a {b: pow(10px, 10px)}\ \n | ^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn real_and_unitless() { assert_eq!( runner().err("a {b: pow(10px, 10)}\n"), "Error: Expected 10px to have no units.\ \n ,\ \n1 | a {b: pow(10px, 10)}\ \n | ^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn unknown_and_unitless() { assert_eq!( runner().err("a {b: pow(10%, 10)}\n"), "Error: Expected 10% to have no units.\ \n ,\ \n1 | a {b: pow(10%, 10)}\ \n | ^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } } } mod exponent { #[allow(unused)] use super::runner; #[test] fn negative() { assert_eq!( runner().ok("a {b: pow(10, -10)}\n"), "a {\ \n b: 0.0000000001;\ \n}\n" ); } } #[test] fn overridden() { assert_eq!( runner().ok("@function pow($arg) {@return $arg}\ \na {b: pow(1)}\n"), "a {\ \n b: 1;\ \n}\n" ); } #[test] fn positive() { assert_eq!( runner().ok("a {b: pow(10, 10)}\n"), "a {\ \n b: 10000000000;\ \n}\n" ); } #[test] fn simplification() { assert_eq!( runner().ok("a {b: pow(3px - 1px + var(--c), 4px + 10px)}\n"), "a {\ \n b: pow(2px + var(--c), 14px);\ \n}\n" ); } mod x_infinity { #[allow(unused)] use super::runner; #[test] fn positive() { assert_eq!( runner().ok("a {b: pow(10, infinity)}\n"), "a {\ \n b: calc(infinity);\ \n}\n" ); } } mod y_infinity { #[allow(unused)] use super::runner; #[test] fn positive() { assert_eq!( runner().ok("a {b: pow(infinity, 10)}\n"), "a {\ \n b: calc(infinity);\ \n}\n" ); } } #[test] fn zeros() { assert_eq!( runner().ok("a {b: pow(0, 0)}\n"), "a {\ \n b: 1;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/calculation/rem.rs000066400000000000000000000212121474765622100231260ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/rem.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("rem") } #[test] fn case_insensitive() { assert_eq!( runner().ok("a {b: ReM(7, 3)}\n"), "a {\ \n b: 1;\ \n}\n" ); } #[test] fn equals() { assert_eq!( runner().ok("a {b: rem(1, 1)}\n"), "a {\ \n b: 0;\ \n}\n" ); } mod error { #[allow(unused)] use super::runner; #[test] #[ignore] // wrong error fn dividend_type() { assert_eq!( runner().err("a {b: rem(\"0\", 0)}\n"), "Error: This expression can\'t be used in a calculation.\ \n ,\ \n1 | a {b: rem(\"0\", 0)}\ \n | ^^^\ \n \'\ \n input.scss 1:11 root stylesheet", ); } #[test] #[ignore] // wrong error fn modulus_type() { assert_eq!( runner().err("a {b: rem(0, \"0\")}\n"), "Error: This expression can\'t be used in a calculation.\ \n ,\ \n1 | a {b: rem(0, \"0\")}\ \n | ^^^\ \n \'\ \n input.scss 1:14 root stylesheet", ); } #[test] #[ignore] // missing error fn sass_script() { assert_eq!( runner().err("a {b: rem(7 % 3, 1)}\n"), "Error: This operation can\'t be used in a calculation.\ \n ,\ \n1 | a {b: rem(7 % 3, 1)}\ \n | ^\ \n \'\ \n input.scss 1:13 root stylesheet", ); } mod syntax { #[allow(unused)] use super::runner; #[test] #[ignore] // wrong error fn invalid_arg() { assert_eq!( runner().err("a {b: rem(10, $)}\n"), "Error: Expected identifier.\ \n ,\ \n1 | a {b: rem(10, $)}\ \n | ^\ \n \'\ \n input.scss 1:16 root stylesheet", ); } } #[test] fn too_few_args() { assert_eq!( runner().err("a {b: rem(3)}\n"), "Error: 2 arguments required, but only 1 was passed.\ \n ,\ \n1 | a {b: rem(3)}\ \n | ^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn too_many_args() { assert_eq!( runner().err("a {b: rem(3, 2, 1)}\n"), "Error: Only 2 arguments allowed, but 3 were passed.\ \n ,\ \n1 | a {b: rem(3, 2, 1)}\ \n | ^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } mod units { #[allow(unused)] use super::runner; #[test] #[ignore] // wrong error fn complex_and_unknown() { assert_eq!( runner().err( "a {b: rem(1px*2px, 10%)}\n" ), "Error: Number calc(2px * 1px) isn\'t compatible with CSS calculations.\ \n ,\ \n1 | a {b: rem(1px*2px, 10%)}\ \n | ^^^^^^^\ \n \'\ \n input.scss 1:11 root stylesheet", ); } #[test] #[ignore] // wrong error fn incompatible() { assert_eq!( runner().err("a {b: rem(16px, 5deg)}\n"), "Error: 16px and 5deg are incompatible.\ \n ,\ \n1 | a {b: rem(16px, 5deg)}\ \n | ^^^^ 16px\ \n | ==== 5deg\ \n \'\ \n input.scss 1:11 root stylesheet", ); } #[test] #[ignore] // wrong error fn real_and_unitless() { assert_eq!( runner().err("a {b: rem(16px, 5)}\n"), "Error: 16px and 5 are incompatible.\ \n ,\ \n1 | a {b: rem(16px, 5)}\ \n | ^^^^ 16px\ \n | = 5\ \n \'\ \n input.scss 1:11 root stylesheet", ); } } } #[test] fn negative() { assert_eq!( runner().ok("a {b: rem(-2, -5)}\n"), "a {\ \n b: -2;\ \n}\n" ); } #[test] fn negative_and_positive() { assert_eq!( runner().ok("a {b: rem(-2, 5)}\n"), "a {\ \n b: -2;\ \n}\n" ); } #[test] fn negative_and_positive_infinity() { assert_eq!( runner().ok("a {b: rem(-5, infinity)}\n"), "a {\ \n b: -5;\ \n}\n" ); } #[test] fn negative_zero() { assert_eq!( runner().ok("@use \"sass:math\";\ \na {b: math.div(1, rem(-7, 7))}\n"), "a {\ \n b: calc(-infinity);\ \n}\n" ); } #[test] fn negative_zero_and_positive_infinity() { assert_eq!( runner().ok("@use \"sass:math\";\ \na {b: math.div(1, rem(-0, infinity))}\n"), "a {\ \n b: calc(-infinity);\ \n}\n" ); } #[test] fn overridden() { assert_eq!( runner().ok("@function rem($arg) {@return $arg}\ \na {b: rem(1)}\n"), "a {\ \n b: 1;\ \n}\n" ); } #[test] fn positive_and_negative() { assert_eq!( runner().ok("a {b: rem(2, -5)}\n"), "a {\ \n b: 2;\ \n}\n" ); } #[test] fn positive_and_negative_infinity() { assert_eq!( runner().ok("a {b: rem(5, -infinity)}\n"), "a {\ \n b: 5;\ \n}\n" ); } #[test] fn positive_zero() { assert_eq!( runner().ok("@use \"sass:math\";\ \na {b: math.div(1, rem(7, 7))}\n"), "a {\ \n b: calc(infinity);\ \n}\n" ); } #[test] fn simplification() { assert_eq!( runner().ok("a {\ \n b: rem(3px - 1px + var(--c), -7px / 4em * 1em);\ \n}\n"), "a {\ \n b: rem(2px + var(--c), -1.75px);\ \n}\n" ); } mod units { #[allow(unused)] use super::runner; #[test] fn compatible() { assert_eq!( runner().ok("a {b: rem(5px, 3px)}\n"), "a {\ \n b: 2px;\ \n}\n" ); } #[test] fn fake() { assert_eq!( runner().ok("a {\ \n b: rem(1foo, 2bar);\ \n}\n"), "a {\ \n b: rem(1foo, 2bar);\ \n}\n" ); } #[test] fn none() { assert_eq!( runner().ok("a {b: rem(7, 3)}\n"), "a {\ \n b: 1;\ \n}\n" ); } #[test] fn real_and_fake() { assert_eq!( runner().ok("a {\ \n b: rem(1px, 2bar);\ \n}\n"), "a {\ \n b: rem(1px, 2bar);\ \n}\n" ); } #[test] fn real_and_unknown() { assert_eq!( runner().ok("a {b: rem(5px, 3%)}\n"), "a {\ \n b: rem(5px, 3%);\ \n}\n" ); } #[test] fn same_fake() { assert_eq!( runner().ok("a {\ \n b: rem(1foo, 2foo);\ \n}\n"), "a {\ \n b: 1foo;\ \n}\n" ); } #[test] fn unknown() { assert_eq!( runner().ok("a {\ \n b: rem(1%, 2%);\ \n}\n"), "a {\ \n b: 1%;\ \n}\n" ); } } mod x_infinity { #[allow(unused)] use super::runner; #[test] fn negative() { assert_eq!( runner().ok("a {b: rem(10, -infinity)}\n"), "a {\ \n b: 10;\ \n}\n" ); } #[test] fn positive() { assert_eq!( runner().ok("a {b: rem(-10, infinity)}\n"), "a {\ \n b: -10;\ \n}\n" ); } } #[test] fn x_zero() { assert_eq!( runner().ok("a {b: rem(0, 6)}\n"), "a {\ \n b: 0;\ \n}\n" ); } mod y_infinity { #[allow(unused)] use super::runner; #[test] fn positive() { assert_eq!( runner().ok("a {b: rem(infinity, 10)}\n"), "a {\ \n b: calc(NaN);\ \n}\n" ); } } #[test] fn y_zero() { assert_eq!( runner().ok("a {b: rem(6, 0)}\n"), "a {\ \n b: calc(NaN);\ \n}\n" ); } #[test] fn zero_and_negative_infinity() { assert_eq!( runner().ok("@use \"sass:math\";\ \na {b: math.div(1, rem(0, -infinity))}\n"), "a {\ \n b: calc(infinity);\ \n}\n" ); } #[test] fn zeros() { assert_eq!( runner().ok("a {b: rem(0, 0)}\n"), "a {\ \n b: calc(NaN);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/calculation/round/000077500000000000000000000000001474765622100231265ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/values/calculation/round/error.rs000066400000000000000000000205271474765622100246330ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/round/error.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("error") } mod one_argument { #[allow(unused)] use super::runner; mod sass_script { #[allow(unused)] use super::runner; #[test] #[ignore] // wrong error fn variable_named_argument() { assert_eq!( runner().err( "a {b: round($number: var(--c))}\n" ), "DEPRECATION WARNING [global-builtin]: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ \nUse math.round instead.\n\ \nMore info and automated migrator: https://sass-lang.com/d/import\n\ \n ,\ \n1 | a {b: round($number: var(--c))}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet\n\ \nError: $number: var(--c) is not a number.\ \n ,\ \n1 | a {b: round($number: var(--c))}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } } mod syntax { #[allow(unused)] use super::runner; #[test] #[ignore] // wrong error fn invalid_arg() { assert_eq!( runner().err("a {b: round($)}\n"), "Error: Expected identifier.\ \n ,\ \n1 | a {b: round($)}\ \n | ^\ \n \'\ \n input.scss 1:14 root stylesheet", ); } } #[test] #[ignore] // wrong error fn test_type() { assert_eq!( runner().err( "a {b: round(\"0\")}\n" ), "DEPRECATION WARNING [global-builtin]: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0.\ \nUse math.round instead.\n\ \nMore info and automated migrator: https://sass-lang.com/d/import\n\ \n ,\ \n1 | a {b: round(\"0\")}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet\n\ \nError: $number: \"0\" is not a number.\ \n ,\ \n1 | a {b: round(\"0\")}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } } mod three_argument { #[allow(unused)] use super::runner; #[test] #[ignore] // wrong error fn number_type() { assert_eq!( runner().err( "$wrong_input: \"0\";\ \na {b: round(nearest, $wrong_input, 0)}\n" ), "Error: Value \"0\" can\'t be used in a calculation.\ \n ,\ \n2 | a {b: round(nearest, $wrong_input, 0)}\ \n | ^^^^^^^^^^^^\ \n \'\ \n input.scss 2:22 root stylesheet", ); } #[test] #[ignore] // wrong error fn step_type() { assert_eq!( runner().err( "$wrong_input: \"0\";\ \na {b: round(nearest, 0, $wrong_input)}\n" ), "Error: Value \"0\" can\'t be used in a calculation.\ \n ,\ \n2 | a {b: round(nearest, 0, $wrong_input)}\ \n | ^^^^^^^^^^^^\ \n \'\ \n input.scss 2:25 root stylesheet", ); } mod strategy { #[allow(unused)] use super::runner; #[test] fn operation() { assert_eq!( runner().err( "a {\ \n e: round(10px + 2px, 8px, 9px);\ \n}" ), "Error: 12px must be either nearest, up, down or to-zero.\ \n ,\ \n2 | e: round(10px + 2px, 8px, 9px);\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:6 root stylesheet", ); } } #[test] #[ignore] // wrong error fn strategy_type() { assert_eq!( runner().err( "$wrong_input: \"nearest\";\ \na {b: round($wrong_input, 0, 0)}\n" ), "Error: Value \"nearest\" can\'t be used in a calculation.\ \n ,\ \n2 | a {b: round($wrong_input, 0, 0)}\ \n | ^^^^^^^^^^^^\ \n \'\ \n input.scss 2:13 root stylesheet", ); } } #[test] fn too_few_args() { assert_eq!( runner().err("a {b: round()}\n"), "Error: Missing argument.\ \n ,\ \n1 | a {b: round()}\ \n | ^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn too_many_args() { assert_eq!( runner().err("a {b: round(1, 2, 3, 4)}\n"), "Error: Only 3 arguments allowed, but 4 were passed.\ \n ,\ \n1 | a {b: round(1, 2, 3, 4)}\ \n | ^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } mod two_argument { #[allow(unused)] use super::runner; #[test] fn missing_step() { assert_eq!( runner().err("a {b: round(nearest, 5)}\n"), "Error: If strategy is not null, step is required.\ \n ,\ \n1 | a {b: round(nearest, 5)}\ \n | ^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] #[ignore] // missing error fn sass_script() { assert_eq!( runner().err("a {b: round(7 % 3, 1)}\n"), "Error: Only 1 argument allowed, but 2 were passed.\ \n ,--> input.scss\ \n1 | a {b: round(7 % 3, 1)}\ \n | ^^^^^^^^^^^^^^^ invocation\ \n \'\ \n ,--> sass:math\ \n1 | @function round($number) {\ \n | ============== declaration\ \n \'\ \n input.scss 1:7 root stylesheet", ); } mod units { #[allow(unused)] use super::runner; #[test] #[ignore] // wrong error fn complex_and_unknown() { assert_eq!( runner().err( "a {b: round(1px*2px, 10%)}\n" ), "Error: Number calc(2px * 1px) isn\'t compatible with CSS calculations.\ \n ,\ \n1 | a {b: round(1px*2px, 10%)}\ \n | ^^^^^^^\ \n \'\ \n input.scss 1:13 root stylesheet", ); } #[test] #[ignore] // wrong error fn known_incompatible() { assert_eq!( runner().err("a {b: round(10deg, 5px)}\n"), "Error: 10deg and 5px are incompatible.\ \n ,\ \n1 | a {b: round(10deg, 5px)}\ \n | ^^^^^ 10deg\ \n | === 5px\ \n \'\ \n input.scss 1:13 root stylesheet", ); } #[test] #[ignore] // wrong error fn real_and_unitless() { assert_eq!( runner().err("a {b: round(10px, 5)}\n"), "Error: 10px and 5 are incompatible.\ \n ,\ \n1 | a {b: round(10px, 5)}\ \n | ^^^^ 10px\ \n | = 5\ \n \'\ \n input.scss 1:13 root stylesheet", ); } } #[test] #[ignore] // wrong error fn x_type() { assert_eq!( runner().err("a {b: round(0, \"0\")}\n"), "Error: Only 1 argument allowed, but 2 were passed.\ \n ,--> input.scss\ \n1 | a {b: round(0, \"0\")}\ \n | ^^^^^^^^^^^^^ invocation\ \n \'\ \n ,--> sass:math\ \n1 | @function round($number) {\ \n | ============== declaration\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] #[ignore] // wrong error fn y_type() { assert_eq!( runner().err("a {b: round(\"0\", 0)}\n"), "Error: Only 1 argument allowed, but 2 were passed.\ \n ,--> input.scss\ \n1 | a {b: round(\"0\", 0)}\ \n | ^^^^^^^^^^^^^ invocation\ \n \'\ \n ,--> sass:math\ \n1 | @function round($number) {\ \n | ============== declaration\ \n \'\ \n input.scss 1:7 root stylesheet", ); } } rsass-0.29.0/rsass/tests/spec/values/calculation/round/mod.rs000066400000000000000000000003751474765622100242600ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/round" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("round") } mod error; mod one_argument; mod strategy; mod three_arguments; mod two_arguments; rsass-0.29.0/rsass/tests/spec/values/calculation/round/one_argument.rs000066400000000000000000000042331474765622100261610ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/round/one_argument.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("one_argument") } #[test] fn case_insensitive() { assert_eq!( runner().ok("a {b: rOuNd(1)}\n"), "a {\ \n b: 1;\ \n}\n" ); } mod math { #[allow(unused)] use super::runner; #[test] fn slash_as_division() { assert_eq!( runner().ok("b {\ \n a: 2px / round(1.5);\ \n}\n"), "b {\ \n a: 1px;\ \n}\n" ); } } #[test] fn negative() { assert_eq!( runner().ok("a {b: round(-5.6)}\n"), "a {\ \n b: -6;\ \n}\n" ); } #[test] fn overridden() { assert_eq!( runner().ok("@function round($arg) {@return $arg}\ \na {b: round(1.1)}\n"), "a {\ \n b: 1.1;\ \n}\n" ); } #[test] fn positive() { assert_eq!( runner().ok("a {b: round(1)}\n"), "a {\ \n b: 1;\ \n}\n" ); } mod preserved { #[allow(unused)] use super::runner; #[test] fn variable() { assert_eq!( runner().ok("a {\ \n b: round(var(--c))\ \n}\n"), "a {\ \n b: round(var(--c));\ \n}\n" ); } } #[test] fn preserves_single_unit() { assert_eq!( runner().ok("a {b: round(1 + 1px)}\n"), "a {\ \n b: 2px;\ \n}\n" ); } #[test] fn preserves_units() { assert_eq!( runner().ok("a {b: round(-7px / 4em) * 1em}\n"), "a {\ \n b: -2px;\ \n}\n" ); } #[test] fn sass_script() { assert_eq!( runner().ok("a {b: round($number: -3)}\n"), "a {\ \n b: -3;\ \n}\n" ); } #[test] fn unsimplifiable() { assert_eq!( runner().ok("a {b: round(1px + 2px - var(--c))}\n"), "a {\ \n b: round(3px - var(--c));\ \n}\n" ); } #[test] fn zero() { assert_eq!( runner().ok("a {b: round(0)}\n"), "a {\ \n b: 0;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/calculation/round/strategy/000077500000000000000000000000001474765622100247705ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/values/calculation/round/strategy/down.rs000066400000000000000000000076441474765622100263200ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/round/strategy/down.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("down") } #[test] fn infinity() { assert_eq!( runner().ok("a {b: round(down, infinity, infinity)}\n"), "a {\ \n b: calc(NaN);\ \n}\n" ); } mod lower_multiple { #[allow(unused)] use super::runner; #[test] fn number_is_bigger() { assert_eq!( runner().ok("a {b: round(down, 13px, 10px)}\n"), "a {\ \n b: 10px;\ \n}\n" ); } #[test] fn number_is_negative() { assert_eq!( runner().ok("a {b: round(down, -18px, 10px)}\n"), "a {\ \n b: -20px;\ \n}\n" ); } } #[test] fn negative() { assert_eq!( runner().ok("a {b: round(down, -101, -25)}\n"), "a {\ \n b: -125;\ \n}\n" ); } #[test] fn negative_and_infinity() { assert_eq!( runner().ok("@use \"sass:math\";\ \na {b: round(down, -10, infinity)}\n"), "a {\ \n b: calc(-infinity);\ \n}\n" ); } #[test] fn negative_step() { assert_eq!( runner().ok("a {b: round(down, 12, -7)}\n"), "a {\ \n b: 7;\ \n}\n" ); } mod negative_zero { #[allow(unused)] use super::runner; #[test] fn positive_infinity() { assert_eq!( runner().ok("@use \"sass:math\";\ \na {b: math.div(1, round(down, -1 * 0, infinity))}\n"), "a {\ \n b: calc(-infinity);\ \n}\n" ); } } #[test] fn number_is_multiple_of_step() { assert_eq!( runner().ok("a {b: round(down, 25px, 5px)}\n"), "a {\ \n b: 25px;\ \n}\n" ); } #[test] fn positive() { assert_eq!( runner().ok("a {b: round(down, 122px, 25px)}\n"), "a {\ \n b: 100px;\ \n}\n" ); } #[test] fn positive_and_infinity() { assert_eq!( runner().ok("@use \"sass:math\";\ \na {b: math.div(1, round(down, 10, infinity))}\n"), "a {\ \n b: calc(infinity);\ \n}\n" ); } mod positive_zero { #[allow(unused)] use super::runner; #[test] fn one() { assert_eq!( runner().ok("@use \"sass:math\";\ \na {b: math.div(1, round(down, 1, infinity))}\n"), "a {\ \n b: calc(infinity);\ \n}\n" ); } #[test] fn zero() { assert_eq!( runner().ok("@use \"sass:math\";\ \na {b: math.div(1, round(down, 0, infinity))}\n"), "a {\ \n b: calc(infinity);\ \n}\n" ); } } #[test] fn step_is_multiple_of_number() { assert_eq!( runner().ok("a {b: round(down, 5px, 25px)}\n"), "a {\ \n b: 0px;\ \n}\n" ); } #[test] fn step_is_zero() { assert_eq!( runner().ok("a {b: round(down, 10px, 0px)}\n"), "a {\ \n b: calc(NaN * 1px);\ \n}\n" ); } mod upper_multiple { #[allow(unused)] use super::runner; #[test] fn number_is_bigger() { assert_eq!( runner().ok("a {b: round(down, 23px, 10px)}\n"), "a {\ \n b: 20px;\ \n}\n" ); } #[test] fn number_is_half() { assert_eq!( runner().ok("a {b: round(down, 15px, 10px)}\n"), "a {\ \n b: 10px;\ \n}\n" ); } #[test] fn number_is_negative() { assert_eq!( runner().ok("a {b: round(down, -13px, 10px)}\n"), "a {\ \n b: -20px;\ \n}\n" ); } #[test] fn number_is_smaller() { assert_eq!( runner().ok("a {b: round(down, 18px, 10px)}\n"), "a {\ \n b: 10px;\ \n}\n" ); } } rsass-0.29.0/rsass/tests/spec/values/calculation/round/strategy/mod.rs000066400000000000000000000003411474765622100261130ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/round/strategy" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("strategy") } mod down; mod nearest; mod to_zero; mod up; rsass-0.29.0/rsass/tests/spec/values/calculation/round/strategy/nearest.rs000066400000000000000000000113601474765622100270000ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/round/strategy/nearest.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("nearest") } mod infinity { #[allow(unused)] use super::runner; #[test] fn negative() { assert_eq!( runner().ok("a {b: round(nearest, -infinity, -infinity)}\n"), "a {\ \n b: calc(NaN);\ \n}\n" ); } #[test] fn negative_and_positive() { assert_eq!( runner().ok("a {b: round(nearest, -infinity, infinity)}\n"), "a {\ \n b: calc(NaN);\ \n}\n" ); } #[test] fn positive_and_negative() { assert_eq!( runner().ok("a {b: round(nearest, infinity, -infinity)}\n"), "a {\ \n b: calc(NaN);\ \n}\n" ); } #[test] fn positive_and_positive() { assert_eq!( runner().ok("@use \"sass:math\";\ \na {b: round(nearest, infinity, infinity)}\n"), "a {\ \n b: calc(NaN);\ \n}\n" ); } } #[test] fn infinity_and_negative() { assert_eq!( runner().ok("a {b: round(nearest, infinity, -5)}\n"), "a {\ \n b: calc(infinity);\ \n}\n" ); } #[test] fn infinity_and_positive() { assert_eq!( runner().ok("a {b: round(nearest, infinity, 5)}\n"), "a {\ \n b: calc(infinity);\ \n}\n" ); } mod lower_multiple { #[allow(unused)] use super::runner; #[test] fn number_is_bigger() { assert_eq!( runner().ok("a {b: round(nearest, 13px, 10px)}\n"), "a {\ \n b: 10px;\ \n}\n" ); } #[test] fn number_is_negative() { assert_eq!( runner().ok("a {b: round(nearest, -18px, 10px)}\n"), "a {\ \n b: -20px;\ \n}\n" ); } } #[test] fn negative() { assert_eq!( runner().ok("a {b: round(nearest, -101, -25)}\n"), "a {\ \n b: -100;\ \n}\n" ); } #[test] fn negative_and_infinity() { assert_eq!( runner().ok("@use \"sass:math\";\ \na {b: math.div(1, round(nearest, -10, infinity))}\n"), "a {\ \n b: calc(-infinity);\ \n}\n" ); } #[test] fn negative_infinity_and_negative() { assert_eq!( runner().ok("a {b: round(nearest, -infinity, -5)}\n"), "a {\ \n b: calc(-infinity);\ \n}\n" ); } #[test] fn negative_infinity_and_positive() { assert_eq!( runner().ok("a {b: round(nearest, -infinity, 5)}\n"), "a {\ \n b: calc(-infinity);\ \n}\n" ); } #[test] fn number_is_multiple_of_step() { assert_eq!( runner().ok("a {b: round(nearest, 25px, 5px)}\n"), "a {\ \n b: 25px;\ \n}\n" ); } #[test] fn positive() { assert_eq!( runner().ok("a {b: round(nearest, 117px, 25px)}\n"), "a {\ \n b: 125px;\ \n}\n" ); } #[test] fn positive_and_infinity() { assert_eq!( runner().ok("@use \"sass:math\";\ \na {b: math.div(1, round(nearest, 10, infinity))}\n"), "a {\ \n b: calc(infinity);\ \n}\n" ); } #[test] fn simplification() { assert_eq!( runner().ok( "a {\ \n b: round(nearest, 3.8px - 1px + var(--test), 1.1px + 4px)}\n" ), "a {\ \n b: round(nearest, 2.8px + var(--test), 5.1px);\ \n}\n" ); } #[test] fn step_is_multiple_of_number() { assert_eq!( runner().ok("a {b: round(nearest, 5px, 25px)}\n"), "a {\ \n b: 0px;\ \n}\n" ); } #[test] fn step_is_zero() { assert_eq!( runner().ok("a {b: round(nearest, 10px, 0px)}\n"), "a {\ \n b: calc(NaN * 1px);\ \n}\n" ); } mod upper_multiple { #[allow(unused)] use super::runner; #[test] fn number_is_bigger() { assert_eq!( runner().ok("a {b: round(nearest, 23px, 10px)}\n"), "a {\ \n b: 20px;\ \n}\n" ); } #[test] fn number_is_half() { assert_eq!( runner().ok("a {b: round(nearest, 15px, 10px)}\n"), "a {\ \n b: 20px;\ \n}\n" ); } #[test] fn number_is_negative() { assert_eq!( runner().ok("a {b: round(nearest, -13px, 10px)}\n"), "a {\ \n b: -10px;\ \n}\n" ); } #[test] fn number_is_smaller() { assert_eq!( runner().ok("a {b: round(nearest, 18px, 10px)}\n"), "a {\ \n b: 20px;\ \n}\n" ); } } rsass-0.29.0/rsass/tests/spec/values/calculation/round/strategy/to_zero.rs000066400000000000000000000075761474765622100270360ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/round/strategy/to-zero.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("to-zero") } mod strategy { #[allow(unused)] use super::runner; mod to_zero { #[allow(unused)] use super::runner; mod lower_multiple { #[allow(unused)] use super::runner; #[test] fn number_is_bigger() { assert_eq!( runner().ok("a {b: round(to-zero, 13px, 10px)}\n"), "a {\ \n b: 10px;\ \n}\n" ); } #[test] fn number_is_negative() { assert_eq!( runner().ok("a {b: round(to-zero, -18px, 10px)}\n"), "a {\ \n b: -10px;\ \n}\n" ); } } #[test] fn negative() { assert_eq!( runner().ok("a {b: round(to-zero, -120px, -25px)}\n"), "a {\ \n b: -125px;\ \n}\n" ); } mod negative_zero { #[allow(unused)] use super::runner; #[test] fn negative_infinity() { assert_eq!( runner().ok("@use \"sass:math\";\ \na {b: math.div(1, round(to-zero, -5, -infinity))}\n"), "a {\ \n b: calc(-infinity);\ \n}\n" ); } #[test] fn positive_infinity() { assert_eq!( runner().ok("@use \"sass:math\";\ \na {b: math.div(1, round(to-zero, -5, infinity))}\n"), "a {\ \n b: calc(-infinity);\ \n}\n" ); } } #[test] fn positive() { assert_eq!( runner().ok("a {b: round(to-zero, 120px, 25px)}\n"), "a {\ \n b: 100px;\ \n}\n" ); } mod positive_zero { #[allow(unused)] use super::runner; #[test] fn negative_infinity() { assert_eq!( runner().ok("@use \"sass:math\";\ \na {b: math.div(1, round(to-zero, 5, -infinity))}\n"), "a {\ \n b: calc(infinity);\ \n}\n" ); } #[test] fn positive_infinity() { assert_eq!( runner().ok("@use \"sass:math\";\ \na {b: math.div(1, round(to-zero, 5, infinity))}\n"), "a {\ \n b: calc(infinity);\ \n}\n" ); } } mod upper_multiple { #[allow(unused)] use super::runner; #[test] fn number_is_bigger() { assert_eq!( runner().ok("a {b: round(to-zero, 23px, 10px)}\n"), "a {\ \n b: 20px;\ \n}\n" ); } #[test] fn number_is_half() { assert_eq!( runner().ok("a {b: round(to-zero, 15px, 10px)}\n"), "a {\ \n b: 10px;\ \n}\n" ); } #[test] fn number_is_negative() { assert_eq!( runner().ok("a {b: round(to-zero, -13px, 10px)}\n"), "a {\ \n b: -10px;\ \n}\n" ); } #[test] fn number_is_smaller() { assert_eq!( runner().ok("a {b: round(to-zero, 18px, 10px)}\n"), "a {\ \n b: 10px;\ \n}\n" ); } } } } rsass-0.29.0/rsass/tests/spec/values/calculation/round/strategy/up.rs000066400000000000000000000121111474765622100257560ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/round/strategy/up.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("up") } mod strategy { #[allow(unused)] use super::runner; mod up { #[allow(unused)] use super::runner; #[test] fn infinity() { assert_eq!( runner().ok("@use \"sass:math\";\ \na {b: round(up, infinity, infinity)}\n"), "a {\ \n b: calc(NaN);\ \n}\n" ); } mod lower_multiple { #[allow(unused)] use super::runner; #[test] fn number_is_bigger() { assert_eq!( runner().ok("a {b: round(up, 13px, 10px)}\n"), "a {\ \n b: 20px;\ \n}\n" ); } #[test] fn number_is_negative() { assert_eq!( runner().ok("a {b: round(up, -18px, 10px)}\n"), "a {\ \n b: -10px;\ \n}\n" ); } } #[test] fn negative() { assert_eq!( runner().ok("a {b: round(up, -101, -25)}\n"), "a {\ \n b: -100;\ \n}\n" ); } #[test] fn negative_and_infinity() { assert_eq!( runner().ok("@use \"sass:math\";\ \na {b: math.div(1, round(up, -10, infinity))}\n"), "a {\ \n b: calc(-infinity);\ \n}\n" ); } #[test] fn negative_step() { assert_eq!( runner().ok("a {b: round(up, 12px, -7px)}\n"), "a {\ \n b: 14px;\ \n}\n" ); } mod negative_zero { #[allow(unused)] use super::runner; #[test] fn positive_infinity() { assert_eq!( runner().ok("@use \"sass:math\";\ \na {b: math.div(1, round(up, -1 * 0, infinity))}\n"), "a {\ \n b: calc(-infinity);\ \n}\n" ); } } #[test] fn number_is_multiple_of_step() { assert_eq!( runner().ok("a {b: round(up, 25px, 5px)}\n"), "a {\ \n b: 25px;\ \n}\n" ); } #[test] fn positive() { assert_eq!( runner().ok("a {b: round(up, 101px, 25px)}\n"), "a {\ \n b: 125px;\ \n}\n" ); } #[test] fn positive_and_infinity() { assert_eq!( runner().ok("a {b: round(up, 10, infinity)}\n"), "a {\ \n b: calc(infinity);\ \n}\n" ); } mod positive_zero { #[allow(unused)] use super::runner; #[test] fn one() { assert_eq!( runner().ok("a {b: round(up, 1, infinity)}\n"), "a {\ \n b: calc(infinity);\ \n}\n" ); } #[test] fn zero() { assert_eq!( runner().ok("@use \"sass:math\";\ \na {b: math.div(1, round(up, 0, infinity))}\n"), "a {\ \n b: calc(infinity);\ \n}\n" ); } } #[test] fn step_is_multiple_of_number() { assert_eq!( runner().ok("a {b: round(up, 5px, 25px)}\n"), "a {\ \n b: 25px;\ \n}\n" ); } #[test] fn step_is_zero() { assert_eq!( runner().ok("a {b: round(up, 10px, 0px)}\n"), "a {\ \n b: calc(NaN * 1px);\ \n}\n" ); } mod upper_multiple { #[allow(unused)] use super::runner; #[test] fn number_is_bigger() { assert_eq!( runner().ok("a {b: round(up, 23px, 10px)}\n"), "a {\ \n b: 30px;\ \n}\n" ); } #[test] fn number_is_half() { assert_eq!( runner().ok("a {b: round(up, 15px, 10px)}\n"), "a {\ \n b: 20px;\ \n}\n" ); } #[test] fn number_is_negative() { assert_eq!( runner().ok("a {b: round(up, -13px, 10px)}\n"), "a {\ \n b: -10px;\ \n}\n" ); } #[test] fn number_is_smaller() { assert_eq!( runner().ok("a {b: round(up, 18px, 10px)}\n"), "a {\ \n b: 20px;\ \n}\n" ); } } } } rsass-0.29.0/rsass/tests/spec/values/calculation/round/three_arguments.rs000066400000000000000000000030121474765622100266640ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/round/three_arguments.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("three_arguments") } mod step { #[allow(unused)] use super::runner; #[test] fn unknown_variable() { assert_eq!( runner().ok("a {\ \n d: round(up, 8px, var(--c));\ \n}"), "a {\ \n d: round(up, 8px, var(--c));\ \n}\n" ); } } mod strategy { #[allow(unused)] use super::runner; #[test] fn interpolation() { assert_eq!( runner().ok("a {\ \n e: round(#{\"up\"}, 3px, 9px);\ \n}\n"), "a {\ \n e: 9px;\ \n}\n" ); } #[test] fn unknown_variable() { assert_eq!( runner().ok("a {\ \n e: round(var(--c), 8px, 9px);\ \n}"), "a {\ \n e: round(var(--c), 8px, 9px);\ \n}\n" ); } } mod units { #[allow(unused)] use super::runner; #[test] fn real_and_unknown() { assert_eq!( runner().ok("a {b: round(nearest, 1px, 10%)}\n"), "a {\ \n b: round(nearest, 1px, 10%);\ \n}\n" ); } #[test] fn unknown() { assert_eq!( runner().ok("a {\ \n b: round(nearest, 1%, 2%);\ \n}\n"), "a {\ \n b: 2%;\ \n}\n" ); } } rsass-0.29.0/rsass/tests/spec/values/calculation/round/two_arguments.rs000066400000000000000000000165411474765622100264010ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/round/two_arguments.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("two_arguments") } #[test] fn case_insensitive() { assert_eq!( runner().ok("a {b: RoUnD(117, 25)}\n"), "a {\ \n b: 125;\ \n}\n" ); } #[test] fn equals() { assert_eq!( runner().ok("a {b: round(10px, 10px)}\n"), "a {\ \n b: 10px;\ \n}\n" ); } mod lower_multiple { #[allow(unused)] use super::runner; #[test] fn number_is_bigger() { assert_eq!( runner().ok("a {b: round(13px, 10px)}\n"), "a {\ \n b: 10px;\ \n}\n" ); } #[test] fn number_is_negative() { assert_eq!( runner().ok("a {b: round(-18px, 10px)}\n"), "a {\ \n b: -20px;\ \n}\n" ); } } mod math { #[allow(unused)] use super::runner; #[test] fn unknown_units() { assert_eq!( runner().ok("a {\ \n b: round(1px + 0%, 1px + 0%);\ \n}\n"), "a {\ \n b: round(1px + 0%, 1px + 0%);\ \n}\n" ); } } #[test] fn nan() { assert_eq!( runner().ok("a {b: round(NaN, NaN)}\n"), "a {\ \n b: calc(NaN);\ \n}\n" ); } mod negative_step { #[allow(unused)] use super::runner; mod lower_multiple { #[allow(unused)] use super::runner; #[test] fn number_is_bigger() { assert_eq!( runner().ok("a {b: round(13px, -10px)}\n"), "a {\ \n b: 10px;\ \n}\n" ); } #[test] fn number_is_negative() { assert_eq!( runner().ok("a {b: round(-18px, -10px)}\n"), "a {\ \n b: -20px;\ \n}\n" ); } } mod upper_multiple { #[allow(unused)] use super::runner; #[test] fn number_is_bigger() { assert_eq!( runner().ok("a {b: round(23px, -10px)}\n"), "a {\ \n b: 20px;\ \n}\n" ); } #[test] fn number_is_half() { assert_eq!( runner().ok("a {b: round(15px, -10px)}\n"), "a {\ \n b: 20px;\ \n}\n" ); } #[test] fn number_is_negative() { assert_eq!( runner().ok("a {b: round(-13px, -10px)}\n"), "a {\ \n b: -10px;\ \n}\n" ); } #[test] fn number_is_smaller() { assert_eq!( runner().ok("a {b: round(18px, -10px)}\n"), "a {\ \n b: 20px;\ \n}\n" ); } } } mod negative_zero { #[allow(unused)] use super::runner; #[test] fn negative_infinity() { assert_eq!( runner().ok("@use \"sass:math\";\ \na {b: math.div(1, round(-5, -infinity))}\n"), "a {\ \n b: calc(-infinity);\ \n}\n" ); } #[test] fn positive_infinity() { assert_eq!( runner().ok("@use \"sass:math\";\ \na {b: math.div(1, round(-5, infinity))}\n"), "a {\ \n b: calc(-infinity);\ \n}\n" ); } } #[test] fn overridden() { assert_eq!( runner().ok("@function round($arg1, $arg2) {@return $arg1}\ \na {b: round(1, 2)}\n"), "a {\ \n b: 1;\ \n}\n" ); } mod positive_zero { #[allow(unused)] use super::runner; #[test] fn negative_infinity() { assert_eq!( runner().ok("@use \"sass:math\";\ \na {b: math.div(1, round(5, -infinity))}\n"), "a {\ \n b: calc(infinity);\ \n}\n" ); } #[test] fn positive_infinity() { assert_eq!( runner().ok("@use \"sass:math\";\ \na {b: math.div(1, round(5, infinity))}\n"), "a {\ \n b: calc(infinity);\ \n}\n" ); } } mod preserved { #[allow(unused)] use super::runner; #[test] fn interpolation() { assert_eq!( runner().ok("a {\ \n e: round(#{\"5.5px, 1px\"});\ \n}\n"), "a {\ \n e: round(5.5px, 1px);\ \n}\n" ); } } #[test] fn simplification() { assert_eq!( runner().ok("a {b: round(3.4px + 10%, 1px + 4px)}\n"), "a {\ \n b: round(3.4px + 10%, 5px);\ \n}\n" ); } #[test] fn step_is_zero() { assert_eq!( runner().ok("a {b: round(5px, 0px)}\n"), "a {\ \n b: calc(NaN * 1px);\ \n}\n" ); } mod units { #[allow(unused)] use super::runner; #[test] fn compatible() { assert_eq!( runner().ok("a {b: round(117cm, 25mm)}\n"), "a {\ \n b: 117.5cm;\ \n}\n" ); } #[test] fn fake() { assert_eq!( runner().ok("a {\ \n b: round(1foo, 2bar);\ \n}\n"), "a {\ \n b: round(1foo, 2bar);\ \n}\n" ); } #[test] fn none() { assert_eq!( runner().ok("a {b: round(117, 25)}\n"), "a {\ \n b: 125;\ \n}\n" ); } #[test] fn real_and_fake() { assert_eq!( runner().ok("a {\ \n b: round(1px, 2bar);\ \n}\n"), "a {\ \n b: round(1px, 2bar);\ \n}\n" ); } #[test] fn real_and_unknown() { assert_eq!( runner().ok("a {b: round(1px, 10%)}\n"), "a {\ \n b: round(1px, 10%);\ \n}\n" ); } #[test] fn same_fake() { assert_eq!( runner().ok("a {\ \n b: round(1foo, 2foo);\ \n}\n"), "a {\ \n b: 2foo;\ \n}\n" ); } #[test] fn unknown() { assert_eq!( runner().ok("a {\ \n b: round(1%, 2%);\ \n}\n"), "a {\ \n b: 2%;\ \n}\n" ); } } #[test] fn unknown_variable() { assert_eq!( runner().ok("a {\ \n c: round(up, var(--c));\ \n}\n"), "a {\ \n c: round(up, var(--c));\ \n}\n" ); } mod upper_multiple { #[allow(unused)] use super::runner; #[test] fn number_is_bigger() { assert_eq!( runner().ok("a {b: round(23px, 10px)}\n"), "a {\ \n b: 20px;\ \n}\n" ); } #[test] fn number_is_half() { assert_eq!( runner().ok("a {b: round(15px, 10px)}\n"), "a {\ \n b: 20px;\ \n}\n" ); } #[test] fn number_is_negative() { assert_eq!( runner().ok("a {b: round(-13px, 10px)}\n"), "a {\ \n b: -10px;\ \n}\n" ); } #[test] fn number_is_smaller() { assert_eq!( runner().ok("a {b: round(18px, 10px)}\n"), "a {\ \n b: 20px;\ \n}\n" ); } } rsass-0.29.0/rsass/tests/spec/values/calculation/sign.rs000066400000000000000000000072501474765622100233110ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/sign.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("sign") } #[test] fn case_insensitive() { assert_eq!( runner().ok("a {b: sIgN(3)}\n"), "a {\ \n b: 1;\ \n}\n" ); } mod error { #[allow(unused)] use super::runner; #[test] #[ignore] // missing error fn sass_script() { assert_eq!( runner().err("a {b: sign(7 % 3)}\n"), "Error: This operation can\'t be used in a calculation.\ \n ,\ \n1 | a {b: sign(7 % 3)}\ \n | ^\ \n \'\ \n input.scss 1:14 root stylesheet", ); } mod syntax { #[allow(unused)] use super::runner; #[test] #[ignore] // wrong error fn invalid_arg() { assert_eq!( runner().err("a {b: sign($)}\n"), "Error: Expected identifier.\ \n ,\ \n1 | a {b: sign($)}\ \n | ^\ \n \'\ \n input.scss 1:13 root stylesheet", ); } } #[test] fn too_few_args() { assert_eq!( runner().err("a {b: sign()}\n"), "Error: Missing argument.\ \n ,\ \n1 | a {b: sign()}\ \n | ^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn too_many_args() { assert_eq!( runner().err("a {b: sign(0, 0)}\n"), "Error: Only 1 argument allowed, but 2 were passed.\ \n ,\ \n1 | a {b: sign(0, 0)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] #[ignore] // wrong error fn test_type() { assert_eq!( runner().err("a {b: sign(\"0\")}\n"), "Error: This expression can\'t be used in a calculation.\ \n ,\ \n1 | a {b: sign(\"0\")}\ \n | ^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } } #[test] fn nan() { assert_eq!( runner().ok("a {b: sign(NaN)}\n"), "a {\ \n b: calc(NaN);\ \n}\n" ); } #[test] fn negative() { assert_eq!( runner().ok("a {b: sign(-5.6)}\n"), "a {\ \n b: -1;\ \n}\n" ); } #[test] fn negative_zero() { assert_eq!( runner().ok("@use \"sass:math\";\ \na {b: math.div(1, sign(-0.0))}\n"), "a {\ \n b: calc(-infinity);\ \n}\n" ); } #[test] fn overridden() { assert_eq!( runner().ok("@function sign($arg) {@return $arg}\ \na {b: sign(2)}\n"), "a {\ \n b: 2;\ \n}\n" ); } #[test] fn positive() { assert_eq!( runner().ok("a {b: sign(3)}\n"), "a {\ \n b: 1;\ \n}\n" ); } #[test] fn preserves_units() { assert_eq!( runner().ok("a {b: sign(-7px / 4em) * 1em}\n"), "a {\ \n b: -1px;\ \n}\n" ); } #[test] fn simplification() { assert_eq!( runner().ok("a {\ \n b: sign(1px + 2px - var(--c))\ \n}\n"), "a {\ \n b: sign(3px - var(--c));\ \n}\n" ); } #[test] fn zero() { assert_eq!( runner().ok("@use \"sass:math\";\ \na {b: math.div(1, sign(0))}\n"), "a {\ \n b: calc(infinity);\ \n}\n" ); } #[test] fn zero_fuzzy() { assert_eq!( runner().ok("a {b: sign(0.000000000001)}\n"), "a {\ \n b: 1;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/calculation/sin.rs000066400000000000000000000116161474765622100231430ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/sin.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("sin") } #[test] fn case_insensitive() { assert_eq!( runner().ok("a {b: SiN(1deg)}\n"), "a {\ \n b: 0.0174524064;\ \n}\n" ); } #[test] fn deg() { assert_eq!( runner().ok("a {b: sin(1deg)}\n"), "a {\ \n b: 0.0174524064;\ \n}\n" ); } mod error { #[allow(unused)] use super::runner; #[test] #[ignore] // missing error fn sass_script() { assert_eq!( runner().err("a {b: sin(7 % 3)}\n"), "Error: This operation can\'t be used in a calculation.\ \n ,\ \n1 | a {b: sin(7 % 3)}\ \n | ^\ \n \'\ \n input.scss 1:13 root stylesheet", ); } mod syntax { #[allow(unused)] use super::runner; #[test] #[ignore] // wrong error fn invalid_arg() { assert_eq!( runner().err("a {b: sin($)}\n"), "Error: Expected identifier.\ \n ,\ \n1 | a {b: sin($)}\ \n | ^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } } #[test] fn too_few_args() { assert_eq!( runner().err("a {b: sin()}\n"), "Error: Missing argument.\ \n ,\ \n1 | a {b: sin()}\ \n | ^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn too_many_args() { assert_eq!( runner().err("a {b: sin(0, 0)}\n"), "Error: Only 1 argument allowed, but 2 were passed.\ \n ,\ \n1 | a {b: sin(0, 0)}\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] #[ignore] // wrong error fn test_type() { assert_eq!( runner().err("a {b: sin(\"0\")}\n"), "Error: This expression can\'t be used in a calculation.\ \n ,\ \n1 | a {b: sin(\"0\")}\ \n | ^^^\ \n \'\ \n input.scss 1:11 root stylesheet", ); } mod units { #[allow(unused)] use super::runner; #[test] fn complex() { assert_eq!( runner().err( "a {b: sin(-7px / 4em)}\n" ), "Error: $number: Expected calc(-1.75px / 1em) to have an angle unit (deg, grad, rad, turn).\ \n ,\ \n1 | a {b: sin(-7px / 4em)}\ \n | ^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn known() { assert_eq!( runner().err( "a {b: sin(1px)}\n" ), "Error: $number: Expected 1px to have an angle unit (deg, grad, rad, turn).\ \n ,\ \n1 | a {b: sin(1px)}\ \n | ^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn unknown() { assert_eq!( runner().err( "a {b: sin(1%)}\n" ), "Error: $number: Expected 1% to have an angle unit (deg, grad, rad, turn).\ \n ,\ \n1 | a {b: sin(1%)}\ \n | ^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } } } #[test] fn grad() { assert_eq!( runner().ok("a {b: sin(1grad)}\n"), "a {\ \n b: 0.0157073173;\ \n}\n" ); } #[test] fn infinity() { assert_eq!( runner().ok("a {b: sin(infinity)}\n"), "a {\ \n b: calc(NaN);\ \n}\n" ); } #[test] fn negative_infinity() { assert_eq!( runner().ok("a {b: sin(-infinity)}\n"), "a {\ \n b: calc(NaN);\ \n}\n" ); } #[test] fn negative_one() { assert_eq!( runner().ok("a {b: sin(-1)}\n"), "a {\ \n b: -0.8414709848;\ \n}\n" ); } #[test] fn overridden() { assert_eq!( runner().ok("@function sin($arg) {@return $arg}\ \na {b: sin(1)}\n"), "a {\ \n b: 1;\ \n}\n" ); } #[test] fn rad() { assert_eq!( runner().ok("a {b: sin(1rad)}\n"), "a {\ \n b: 0.8414709848;\ \n}\n" ); } #[test] fn simplification() { assert_eq!( runner().ok("a {\ \n b: sin(3px - 1px + var(--c));\ \n}\n"), "a {\ \n b: sin(2px + var(--c));\ \n}\n" ); } #[test] fn turn() { assert_eq!( runner().ok("a {b: sin(1turn)}\n"), "a {\ \n b: 0;\ \n}\n" ); } #[test] fn zero() { assert_eq!( runner().ok("a {b: sin(0)}\n"), "a {\ \n b: 0;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/calculation/sqrt.rs000066400000000000000000000075061474765622100233460ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/sqrt.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("sqrt") } #[test] fn case_insensitive() { assert_eq!( runner().ok("a {b: sQrT(2)}\n"), "a {\ \n b: 1.4142135624;\ \n}\n" ); } mod error { #[allow(unused)] use super::runner; #[test] #[ignore] // missing error fn sass_script() { assert_eq!( runner().err("a {b: sqrt(7 % 3)}\n"), "Error: This operation can\'t be used in a calculation.\ \n ,\ \n1 | a {b: sqrt(7 % 3)}\ \n | ^\ \n \'\ \n input.scss 1:14 root stylesheet", ); } mod syntax { #[allow(unused)] use super::runner; #[test] #[ignore] // wrong error fn invalid_arg() { assert_eq!( runner().err("a {b: sqrt($)}\n"), "Error: Expected identifier.\ \n ,\ \n1 | a {b: sqrt($)}\ \n | ^\ \n \'\ \n input.scss 1:13 root stylesheet", ); } #[test] fn too_few_args() { assert_eq!( runner().err("a {b: sqrt()}\n"), "Error: Missing argument.\ \n ,\ \n1 | a {b: sqrt()}\ \n | ^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } } #[test] fn too_many_args() { assert_eq!( runner().err("a {b: sqrt(3, 4)}\n"), "Error: Only 1 argument allowed, but 2 were passed.\ \n ,\ \n1 | a {b: sqrt(3, 4)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] #[ignore] // wrong error fn test_type() { assert_eq!( runner().err("a {b: sqrt(\"0\")}\n"), "Error: This expression can\'t be used in a calculation.\ \n ,\ \n1 | a {b: sqrt(\"0\")}\ \n | ^^^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } mod units { #[allow(unused)] use super::runner; #[test] fn real() { assert_eq!( runner().err("a {b: sqrt(16px)}\n"), "Error: Expected 16px to have no units.\ \n ,\ \n1 | a {b: sqrt(16px)}\ \n | ^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn unknown() { assert_eq!( runner().err("a {b: sqrt(1%)}\n"), "Error: Expected 1% to have no units.\ \n ,\ \n1 | a {b: sqrt(1%)}\ \n | ^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } } } #[test] fn negative() { assert_eq!( runner().ok("a {b: sqrt(-9)}\n"), "a {\ \n b: calc(NaN);\ \n}\n" ); } #[test] fn overridden() { assert_eq!( runner().ok("@function sqrt($arg) {@return $arg}\ \na {b: sqrt(2)}\n"), "a {\ \n b: 2;\ \n}\n" ); } #[test] fn simplification() { assert_eq!( runner().ok("a {\ \n b: sqrt(1px + 2px - var(--c))\ \n}\n"), "a {\ \n b: sqrt(3px - var(--c));\ \n}\n" ); } mod units { #[allow(unused)] use super::runner; #[test] fn unitless() { assert_eq!( runner().ok("a {b: sqrt(2)}\n"), "a {\ \n b: 1.4142135624;\ \n}\n" ); } } #[test] fn zero() { assert_eq!( runner().ok("a {b: sqrt(0)}\n"), "a {\ \n b: 0;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/calculation/tan.rs000066400000000000000000000116161474765622100231340ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/tan.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("tan") } #[test] fn case_insensitive() { assert_eq!( runner().ok("a {b: tAn(1deg)}\n"), "a {\ \n b: 0.0174550649;\ \n}\n" ); } #[test] fn deg() { assert_eq!( runner().ok("a {b: tan(1deg)}\n"), "a {\ \n b: 0.0174550649;\ \n}\n" ); } mod error { #[allow(unused)] use super::runner; #[test] #[ignore] // missing error fn sass_script() { assert_eq!( runner().err("a {b: tan(7 % 3)}\n"), "Error: This operation can\'t be used in a calculation.\ \n ,\ \n1 | a {b: tan(7 % 3)}\ \n | ^\ \n \'\ \n input.scss 1:13 root stylesheet", ); } mod syntax { #[allow(unused)] use super::runner; #[test] #[ignore] // wrong error fn invalid_arg() { assert_eq!( runner().err("a {b: tan($)}\n"), "Error: Expected identifier.\ \n ,\ \n1 | a {b: tan($)}\ \n | ^\ \n \'\ \n input.scss 1:12 root stylesheet", ); } } #[test] fn too_few_args() { assert_eq!( runner().err("a {b: tan()}\n"), "Error: Missing argument.\ \n ,\ \n1 | a {b: tan()}\ \n | ^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn too_many_args() { assert_eq!( runner().err("a {b: tan(0, 0)}\n"), "Error: Only 1 argument allowed, but 2 were passed.\ \n ,\ \n1 | a {b: tan(0, 0)}\ \n | ^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] #[ignore] // wrong error fn test_type() { assert_eq!( runner().err("a {b: tan(\"0\")}\n"), "Error: This expression can\'t be used in a calculation.\ \n ,\ \n1 | a {b: tan(\"0\")}\ \n | ^^^\ \n \'\ \n input.scss 1:11 root stylesheet", ); } mod units { #[allow(unused)] use super::runner; #[test] fn complex() { assert_eq!( runner().err( "a {b: tan(-7px / 4em)}\n" ), "Error: $number: Expected calc(-1.75px / 1em) to have an angle unit (deg, grad, rad, turn).\ \n ,\ \n1 | a {b: tan(-7px / 4em)}\ \n | ^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn known() { assert_eq!( runner().err( "a {b: tan(1px)}\n" ), "Error: $number: Expected 1px to have an angle unit (deg, grad, rad, turn).\ \n ,\ \n1 | a {b: tan(1px)}\ \n | ^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn unknown() { assert_eq!( runner().err( "a {b: tan(1%)}\n" ), "Error: $number: Expected 1% to have an angle unit (deg, grad, rad, turn).\ \n ,\ \n1 | a {b: tan(1%)}\ \n | ^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } } } #[test] fn grad() { assert_eq!( runner().ok("a {b: tan(1grad)}\n"), "a {\ \n b: 0.0157092553;\ \n}\n" ); } #[test] fn infinity() { assert_eq!( runner().ok("a {b: tan(infinity)}\n"), "a {\ \n b: calc(NaN);\ \n}\n" ); } #[test] fn negative_infinity() { assert_eq!( runner().ok("a {b: tan(-infinity)}\n"), "a {\ \n b: calc(NaN);\ \n}\n" ); } #[test] fn negative_one() { assert_eq!( runner().ok("a {b: tan(-1)}\n"), "a {\ \n b: -1.5574077247;\ \n}\n" ); } #[test] fn overridden() { assert_eq!( runner().ok("@function tan($arg) {@return $arg}\ \na {b: tan(1)}\n"), "a {\ \n b: 1;\ \n}\n" ); } #[test] fn rad() { assert_eq!( runner().ok("a {b: tan(1rad)}\n"), "a {\ \n b: 1.5574077247;\ \n}\n" ); } #[test] fn simplification() { assert_eq!( runner().ok("a {\ \n b: tan(3px - 1px + var(--c));\ \n}\n"), "a {\ \n b: tan(2px + var(--c));\ \n}\n" ); } #[test] fn turn() { assert_eq!( runner().ok("a {b: tan(1turn)}\n"), "a {\ \n b: 0;\ \n}\n" ); } #[test] fn zero() { assert_eq!( runner().ok("a {b: tan(0)}\n"), "a {\ \n b: 0;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/calculation/test_mod.rs000066400000000000000000000213411474765622100241640ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/calculation/mod.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("mod") } #[test] fn case_insensitive() { assert_eq!( runner().ok("a {b: MoD(7, 3)}\n"), "a {\ \n b: 1;\ \n}\n" ); } #[test] fn equals() { assert_eq!( runner().ok("a {b: mod(1, 1)}\n"), "a {\ \n b: 0;\ \n}\n" ); } mod error { #[allow(unused)] use super::runner; #[test] #[ignore] // wrong error fn dividend_type() { assert_eq!( runner().err("a {b: mod(\"0\", 0)}\n"), "Error: This expression can\'t be used in a calculation.\ \n ,\ \n1 | a {b: mod(\"0\", 0)}\ \n | ^^^\ \n \'\ \n input.scss 1:11 root stylesheet", ); } #[test] #[ignore] // wrong error fn modulus_type() { assert_eq!( runner().err("a {b: mod(0, \"0\")}\n"), "Error: This expression can\'t be used in a calculation.\ \n ,\ \n1 | a {b: mod(0, \"0\")}\ \n | ^^^\ \n \'\ \n input.scss 1:14 root stylesheet", ); } #[test] #[ignore] // missing error fn sass_script() { assert_eq!( runner().err("a {b: mod(7 % 3, 1)}\n"), "Error: This operation can\'t be used in a calculation.\ \n ,\ \n1 | a {b: mod(7 % 3, 1)}\ \n | ^\ \n \'\ \n input.scss 1:13 root stylesheet", ); } mod syntax { #[allow(unused)] use super::runner; #[test] #[ignore] // wrong error fn invalid_arg() { assert_eq!( runner().err("a {b: mod(10, $)}\n"), "Error: Expected identifier.\ \n ,\ \n1 | a {b: mod(10, $)}\ \n | ^\ \n \'\ \n input.scss 1:16 root stylesheet", ); } } #[test] fn too_few_args() { assert_eq!( runner().err("a {b: mod(3)}\n"), "Error: 2 arguments required, but only 1 was passed.\ \n ,\ \n1 | a {b: mod(3)}\ \n | ^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } #[test] fn too_many_args() { assert_eq!( runner().err("a {b: mod(3, 2, 1)}\n"), "Error: Only 2 arguments allowed, but 3 were passed.\ \n ,\ \n1 | a {b: mod(3, 2, 1)}\ \n | ^^^^^^^^^^^^\ \n \'\ \n input.scss 1:7 root stylesheet", ); } mod units { #[allow(unused)] use super::runner; #[test] #[ignore] // wrong error fn complex_and_unknown() { assert_eq!( runner().err( "a {b: mod(1px*2px, 10%)}\n" ), "Error: Number calc(2px * 1px) isn\'t compatible with CSS calculations.\ \n ,\ \n1 | a {b: mod(1px*2px, 10%)}\ \n | ^^^^^^^\ \n \'\ \n input.scss 1:11 root stylesheet", ); } #[test] #[ignore] // wrong error fn incompatible() { assert_eq!( runner().err("a {b: mod(16px, 5deg)}\n"), "Error: 16px and 5deg are incompatible.\ \n ,\ \n1 | a {b: mod(16px, 5deg)}\ \n | ^^^^ 16px\ \n | ==== 5deg\ \n \'\ \n input.scss 1:11 root stylesheet", ); } #[test] #[ignore] // wrong error fn real_and_unitless() { assert_eq!( runner().err("a {b: mod(16px, 5)}\n"), "Error: 16px and 5 are incompatible.\ \n ,\ \n1 | a {b: mod(16px, 5)}\ \n | ^^^^ 16px\ \n | = 5\ \n \'\ \n input.scss 1:11 root stylesheet", ); } } } mod nan { #[allow(unused)] use super::runner; #[test] fn negative_and_positive_infinity() { assert_eq!( runner().ok("a {b: mod(-5, infinity)}\n"), "a {\ \n b: calc(NaN);\ \n}\n" ); } #[test] fn negative_zero_and_positive_infinity() { assert_eq!( runner().ok("a {b: mod(-0, infinity)}\n"), "a {\ \n b: calc(NaN);\ \n}\n" ); } #[test] fn positive_and_negative_infinity() { assert_eq!( runner().ok("a {b: mod(5, -infinity)}\n"), "a {\ \n b: calc(NaN);\ \n}\n" ); } #[test] fn zero_and_negative_infinity() { assert_eq!( runner().ok("a {b: mod(0, -infinity)}\n"), "a {\ \n b: calc(NaN);\ \n}\n" ); } } #[test] fn negative() { assert_eq!( runner().ok("a {b: mod(-2, -5)}\n"), "a {\ \n b: -2;\ \n}\n" ); } #[test] fn negative_and_positive() { assert_eq!( runner().ok("a {b: mod(-2, 5)}\n"), "a {\ \n b: 3;\ \n}\n" ); } #[test] fn negative_zero() { assert_eq!( runner().ok("@use \"sass:math\";\ \na {b: math.div(1, mod(-7, 7))}\n"), "a {\ \n b: calc(infinity);\ \n}\n" ); } #[test] fn overridden() { assert_eq!( runner().ok("@function mod($arg) {@return $arg}\ \na {b: mod(1)}\n"), "a {\ \n b: 1;\ \n}\n" ); } #[test] fn positive_and_negative() { assert_eq!( runner().ok("a {b: mod(2, -5)}\n"), "a {\ \n b: -3;\ \n}\n" ); } #[test] fn positive_zero() { assert_eq!( runner().ok("@use \"sass:math\";\ \na {b: math.div(1, mod(7, 7))}\n"), "a {\ \n b: calc(infinity);\ \n}\n" ); } #[test] fn simplification() { assert_eq!( runner().ok("a {\ \n b: mod(3px - 1px + var(--c), -7px / 4em * 1em);\ \n}\n"), "a {\ \n b: mod(2px + var(--c), -1.75px);\ \n}\n" ); } mod units { #[allow(unused)] use super::runner; #[test] fn compatible() { assert_eq!( runner().ok("a {b: mod(5px, 3px)}\n"), "a {\ \n b: 2px;\ \n}\n" ); } #[test] fn fake() { assert_eq!( runner().ok("a {\ \n b: mod(1foo, 2bar);\ \n}\n"), "a {\ \n b: mod(1foo, 2bar);\ \n}\n" ); } #[test] fn none() { assert_eq!( runner().ok("a {b: mod(7, 3)}\n"), "a {\ \n b: 1;\ \n}\n" ); } #[test] fn real_and_fake() { assert_eq!( runner().ok("a {\ \n b: mod(1px, 2bar);\ \n}\n"), "a {\ \n b: mod(1px, 2bar);\ \n}\n" ); } #[test] fn real_and_unknown() { assert_eq!( runner().ok("a {b: mod(5px, 3%)}\n"), "a {\ \n b: mod(5px, 3%);\ \n}\n" ); } #[test] fn same_fake() { assert_eq!( runner().ok("a {\ \n b: mod(1foo, 2foo);\ \n}\n"), "a {\ \n b: 1foo;\ \n}\n" ); } #[test] fn unknown() { assert_eq!( runner().ok("a {\ \n b: mod(1%, 2%);\ \n}\n"), "a {\ \n b: 1%;\ \n}\n" ); } } mod x_infinity { #[allow(unused)] use super::runner; #[test] fn negative() { assert_eq!( runner().ok("a {b: mod(10, -infinity)}\n"), "a {\ \n b: calc(NaN);\ \n}\n" ); } #[test] fn positive() { assert_eq!( runner().ok("a {b: mod(-10, infinity)}\n"), "a {\ \n b: calc(NaN);\ \n}\n" ); } } #[test] fn x_zero() { assert_eq!( runner().ok("a {b: mod(0, 6)}\n"), "a {\ \n b: 0;\ \n}\n" ); } mod y_infinity { #[allow(unused)] use super::runner; #[test] fn positive() { assert_eq!( runner().ok("a {b: mod(infinity, 10)}\n"), "a {\ \n b: calc(NaN);\ \n}\n" ); } } #[test] fn y_zero() { assert_eq!( runner().ok("a {b: mod(6, 0)}\n"), "a {\ \n b: calc(NaN);\ \n}\n" ); } #[test] fn zeros() { assert_eq!( runner().ok("a {b: mod(0, 0)}\n"), "a {\ \n b: calc(NaN);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/colors/000077500000000000000000000000001474765622100210025ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/values/colors/alpha_hex/000077500000000000000000000000001474765622100227335ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/values/colors/alpha_hex/initial_digit.rs000066400000000000000000000026251474765622100261170ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/colors/alpha_hex/initial_digit.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("initial_digit").set_precision(10) } #[test] fn test() { let runner = runner().set_precision(10); assert_eq!( runner.ok("@use \"sass:color\";\ \na {\ \n four-digit: #0123;\ \n eight-digit: #98765432;\n\ \n // Verify that the color channels are set correctly.\ \n four-digit-red: color.red(#0123);\ \n four-digit-green: color.green(#0123);\ \n four-digit-blue: color.blue(#0123);\ \n four-digit-alpha: color.alpha(#0123);\n\ \n eight-digit-red: color.red(#98765432);\ \n eight-digit-green: color.green(#98765432);\ \n eight-digit-blue: color.blue(#98765432);\ \n eight-digit-alpha: color.alpha(#98765432);\ \n}\n"), "a {\ \n four-digit: rgba(0, 17, 34, 0.2);\ \n eight-digit: rgba(152, 118, 84, 0.1960784314);\ \n four-digit-red: 0;\ \n four-digit-green: 17;\ \n four-digit-blue: 34;\ \n four-digit-alpha: 0.2;\ \n eight-digit-red: 152;\ \n eight-digit-green: 118;\ \n eight-digit-blue: 84;\ \n eight-digit-alpha: 0.1960784314;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/colors/alpha_hex/initial_letter.rs000066400000000000000000000026631474765622100263200ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/colors/alpha_hex/initial_letter.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("initial_letter").set_precision(10) } #[test] fn test() { let runner = runner().set_precision(10); assert_eq!( runner.ok("@use \"sass:color\";\ \na {\ \n four-digit: #AbCd;\ \n eight-digit: #aBcDeF12;\n\ \n // Verify that the color channels are set correctly.\ \n four-digit-red: color.red(#abcd);\ \n four-digit-green: color.green(#abcd);\ \n four-digit-blue: color.blue(#abcd);\ \n four-digit-alpha: color.alpha(#abcd);\n\ \n eight-digit-red: color.red(#ABCDEF12);\ \n eight-digit-green: color.green(#ABCDEF12);\ \n eight-digit-blue: color.blue(#ABCDEF12);\ \n eight-digit-alpha: color.alpha(#ABCDEF12);\ \n}\n"), "a {\ \n four-digit: rgba(170, 187, 204, 0.8666666667);\ \n eight-digit: rgba(171, 205, 239, 0.0705882353);\ \n four-digit-red: 170;\ \n four-digit-green: 187;\ \n four-digit-blue: 204;\ \n four-digit-alpha: 0.8666666667;\ \n eight-digit-red: 171;\ \n eight-digit-green: 205;\ \n eight-digit-blue: 239;\ \n eight-digit-alpha: 0.0705882353;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/colors/alpha_hex/mod.rs000066400000000000000000000003431474765622100240600ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/colors/alpha_hex" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("alpha_hex").set_precision(10) } mod initial_digit; mod initial_letter; rsass-0.29.0/rsass/tests/spec/values/colors/equality.rs000066400000000000000000000207321474765622100232110ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/colors/equality.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("equality") } mod test_false { #[allow(unused)] use super::runner; #[test] fn different_space() { assert_eq!( runner() .ok("a {b: color(srgb 0 0 0) == color(srgb-linear 0 0 0)}\n"), "a {\ \n b: false;\ \n}\n" ); } #[test] fn different_type() { assert_eq!( runner().ok("@use \"sass:string\";\n\ \na {b: red == string.unquote(\"red\")}\n"), "a {\ \n b: false;\ \n}\n" ); } mod legacy { #[allow(unused)] use super::runner; #[test] fn different_space() { assert_eq!( runner().ok("a {b: red == hsl(0, 0%, 50%)}\n"), "a {\ \n b: false;\ \n}\n" ); } mod same_space { #[allow(unused)] use super::runner; mod hsl { #[allow(unused)] use super::runner; #[test] fn no_none() { assert_eq!( runner().ok( "a {b: hsl(50deg 50% 80%) == hsl(51deg 50% 80%)}\n" ), "a {\ \n b: false;\ \n}\n" ); } #[test] #[ignore] // unexepected error fn one_none() { assert_eq!( runner() .ok("a {b: hsl(0 0% 80%) == hsl(none 0% 80%)}\n"), "a {\ \n b: false;\ \n}\n" ); } } mod hwb { #[allow(unused)] use super::runner; #[test] fn no_none() { assert_eq!( runner().ok( "a {b: hwb(50deg 20% 30%) == hwb(51deg 20% 30%)}\n" ), "a {\ \n b: false;\ \n}\n" ); } #[test] #[ignore] // unexepected error fn one_none() { assert_eq!( runner() .ok("a {b: hwb(0 0% 0%) == hwb(none 0% 0%)}\n"), "a {\ \n b: false;\ \n}\n" ); } } mod rgb { #[allow(unused)] use super::runner; #[test] fn no_none() { assert_eq!( runner().ok("a {b: red == blue}\n"), "a {\ \n b: false;\ \n}\n" ); } #[test] #[ignore] // unexepected error fn one_none() { assert_eq!( runner().ok( "a {b: rgb(0 100 200) == rgb(none 100 200)}\n" ), "a {\ \n b: false;\ \n}\n" ); } } } } mod same_space { #[allow(unused)] use super::runner; #[test] fn different_alpha() { assert_eq!( runner().ok( "a {b: lab(50% 100 -100) == lab(50% 100 -100 / 0.9)}\n" ), "a {\ \n b: false;\ \n}\n" ); } #[test] fn no_none() { assert_eq!( runner().ok( "a {b: color(prophoto-rgb 0.1 0.2 0.3) == color(prophoto-rgb 0.1 0.2 0.4)}\n" ), "a {\ \n b: false;\ \n}\n" ); } #[test] fn one_none() { assert_eq!( runner().ok("a {b: oklch(50% 0% none) == oklch(50% 0% 0)}\n"), "a {\ \n b: false;\ \n}\n" ); } } } mod test_true { #[allow(unused)] use super::runner; #[test] fn alpha() { assert_eq!( runner().ok( "a {b: color(prophoto-rgb 0.3 0.4 0.5 / 0.6) == color(prophoto-rgb 0.3 0.4 0.5 / 0.6)}\n" ), "a {\ \n b: true;\ \n}\n" ); } mod legacy { #[allow(unused)] use super::runner; mod different_space { #[allow(unused)] use super::runner; #[test] fn no_none() { assert_eq!( runner().ok( "a {b: purple == hsl(300, 100%, 25.098039215686%)}\n" ), "a {\ \n b: true;\ \n}\n" ); } #[test] #[ignore] // unexepected error fn none() { assert_eq!( runner() .ok("a {b: gray == hsl(none 0% 50.196078431373%)}\n"), "a {\ \n b: true;\ \n}\n" ); } } mod same_space { #[allow(unused)] use super::runner; mod hsl { #[allow(unused)] use super::runner; #[test] fn no_none() { assert_eq!( runner().ok( "a {b: hsl(250, 80%, 20%) == hsl(250deg, 80%, 20%)}\n" ), "a {\ \n b: true;\ \n}\n" ); } #[test] #[ignore] // unexepected error fn none() { assert_eq!( runner().ok( "a {b: hsl(none 80% 20%) == hsl(none 80% 20%)}\n" ), "a {\ \n b: true;\ \n}\n" ); } #[test] fn wrapped_hue() { assert_eq!( runner().ok( "a {b: hsl(180, 80%, 20%) == hsl(540, 80%, 20%)}\n" ), "a {\ \n b: true;\ \n}\n" ); } } mod hwb { #[allow(unused)] use super::runner; #[test] fn no_none() { assert_eq!( runner().ok( "a {b: hwb(250 30% 20%) == hwb(250deg 30% 20%)}\n" ), "a {\ \n b: true;\ \n}\n" ); } #[test] #[ignore] // unexepected error fn none() { assert_eq!( runner().ok( "a {b: hwb(none 30% 20%) == hwb(none 30% 20%)}\n" ), "a {\ \n b: true;\ \n}\n" ); } } mod rgb { #[allow(unused)] use super::runner; #[test] fn no_none() { assert_eq!( runner().ok("a {b: #abcdef == #abcdef}\n"), "a {\ \n b: true;\ \n}\n" ); } #[test] #[ignore] // unexepected error fn none() { assert_eq!( runner().ok( "a {b: rgb(50 none 120) == rgb(50 none 120)}\n" ), "a {\ \n b: true;\ \n}\n" ); } } } } #[test] fn no_alpha_or_none() { assert_eq!( runner().ok("a {b: lab(66% 50 -100) == lab(66% 50 -100)}\n"), "a {\ \n b: true;\ \n}\n" ); } #[test] fn none() { assert_eq!( runner().ok("a {b: lch(100% 0% none) == lch(100% 0% none)}\n"), "a {\ \n b: true;\ \n}\n" ); } #[test] #[ignore] // wrong result fn within_epsilon() { assert_eq!( runner().ok( "a {\ \n b: oklab(\ \n 50.0000000000001 29.9999999999999 -20.0000000000001 / 0.999999999999\ \n ) == oklab(50 30 -20);\ \n}\n" ), "a {\ \n b: true;\ \n}\n" ); } } rsass-0.29.0/rsass/tests/spec/values/colors/mod.rs000066400000000000000000000002721474765622100221300ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/colors" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("colors") } mod alpha_hex; mod equality; rsass-0.29.0/rsass/tests/spec/values/identifiers/000077500000000000000000000000001474765622100220065ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/values/identifiers/escape/000077500000000000000000000000001474765622100232465ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/values/identifiers/escape/mod.rs000066400000000000000000000003041474765622100243700ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/identifiers/escape" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("escape") } mod normalize; mod script; rsass-0.29.0/rsass/tests/spec/values/identifiers/escape/normalize.rs000066400000000000000000000054421474765622100256210ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/identifiers/escape/normalize.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("normalize") } #[test] fn test() { assert_eq!( runner().ok( ".normalize {\ \n // TODO: remove unnecessary parentheses when we\'re no longer testing against\ \n // Ruby Sass.\ \n name-start-char: (ax \\61x \\61 x \\061x \\0061x \\00061x);\ \n name-start-char-non-hex: (\\xx);\ \n name-start-char-non-ascii: (☃x \\☃x \\2603x);\ \n name-char-in-middle: (a\\2dx a\\-x);\ \n name-char-at-start: (\\2dx \\-x);\ \n digit-in-middle: (a\\31x a\\31 x);\ \n digit-at-start: (\\31x \\31 x);\ \n non-printable: (\\0x \\1x \\2x \\3x \\4x \\5x \\6x \\7x \\8x \\Bx \\Ex \\Fx \\10x \\11x \\12x\ \n \\13x \\14x \\15x \\16x \\17x \\18x \\19x \\1Ax \\1Bx \\1Cx \\1Dx \\1Ex \\1Fx \\7Fx);\ \n newline: (\\ax \\cx \\dx);\ \n tab: (\\\tx \\9x);\n\ \n // The beginning of an interpolated identifier should escape name-start chars,\ \n // but inner sections should not.\ \n name-char-interpolation-beginning: \\-#{foo};\ \n name-char-interpolation-middle: #{foo}\\-#{bar};\ \n name-char-interpolation-end: #{foo}\\-;\n\ \n // Regression test for sass/ruby-sass#94\ \n raw-escaped-tab: \\\t;\ \n}\n\ \n// Regression test for sass/ruby-sass#96\ \n@media screen\\9 {\ \n x {y: z}\ \n}\n\ \nselector\\9 {\ \n x: y;\ \n}\n" ), "@charset \"UTF-8\";\ \n.normalize {\ \n name-start-char: ax ax ax ax ax ax;\ \n name-start-char-non-hex: xx;\ \n name-start-char-non-ascii: ☃x ☃x ☃x;\ \n name-char-in-middle: a-x a-x;\ \n name-char-at-start: \\-x \\-x;\ \n digit-in-middle: a1x a1x;\ \n digit-at-start: \\31 x \\31 x;\ \n non-printable: \\0 x \\1 x \\2 x \\3 x \\4 x \\5 x \\6 x \\7 x \\8 x \\b x \\e x \\f x \\10 x \\11 x \\12 x \\13 x \\14 x \\15 x \\16 x \\17 x \\18 x \\19 x \\1a x \\1b x \\1c x \\1d x \\1e x \\1f x \\7f x;\ \n newline: \\a x \\c x \\d x;\ \n tab: \\9 x \\9 x;\ \n name-char-interpolation-beginning: \\-foo;\ \n name-char-interpolation-middle: foo-bar;\ \n name-char-interpolation-end: foo-;\ \n raw-escaped-tab: \\9 ;\ \n}\ \n@media screen\\9 {\ \n x {\ \n y: z;\ \n }\ \n}\ \nselector\\9 {\ \n x: y;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/identifiers/escape/script.rs000066400000000000000000000024421474765622100251220ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/identifiers/escape/script.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("script") } #[test] fn test() { assert_eq!( runner().ok( "@use \"sass:string\";\ \n// SassScript functions operate on the normalized form of the identifier.\ \n.script {\ \n unescaped-str-length: string.length(ax) string.length(\\61x) string.length(\\00061 x);\ \n escaped-str-length: string.length(\\1Ax) string.length(\\0001A x);\n\ \n unescaped-slice: string.slice(xaz, 2, 2) string.slice(x\\61z, 2, 2) string.slice(x\\00061 z, 2, 2);\ \n escaped-slice: string.slice(x\\1Az, 2, 5) string.slice(x\\0001A z, 2, 5);\n\ \n unescaped-quote: string.quote(ax) string.quote(\\61x) string.quote(\\00061 x);\ \n escaped-quote: string.quote(\\1Ax) string.quote(\\0001A x);\ \n}\n" ), ".script {\ \n unescaped-str-length: 2 2 2;\ \n escaped-str-length: 5 5;\ \n unescaped-slice: a a a;\ \n escaped-slice: \\1a \\1a ;\ \n unescaped-quote: \"ax\" \"ax\" \"ax\";\ \n escaped-quote: \"\\\\1a x\" \"\\\\1a x\";\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/identifiers/mod.rs000066400000000000000000000003001474765622100231240ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/identifiers" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("identifiers") } mod escape; mod test_if; rsass-0.29.0/rsass/tests/spec/values/identifiers/test_if.rs000066400000000000000000000005441474765622100240140ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/identifiers/if.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("if") } #[test] fn test() { assert_eq!( runner().ok("// Regression test for sass/dart-sass#1405.\ \na {b: if}\n"), "a {\ \n b: if;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/ids.rs000066400000000000000000000025621474765622100206330ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/ids.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("ids") } #[test] fn test() { assert_eq!( runner().ok( "// The CSS nav-up property and its siblings allow ID tokens in their values, so\ \n// Sass parses any tokens that start with a \"#\" followed by an identifier as an\ \n// ID if it can\'t be parsed as a color.\ \na {\ \n // These IDs are the wrong number of letters to be a hex color.\ \n two-letters: #ab;\ \n five-letters: #abcde;\ \n seven-letters: #abcdefa;\ \n nine-letters: #abcdefabc;\n\ \n // These IDs contain letters outside the hexadecimal gamut.\ \n three-letters-not-hex: #axc;\ \n four-letters-not-hex: #axcd;\ \n six-letters-not-hex: #abcxde;\ \n eight-letters-not-hex: #abcxdefa;\ \n}\n" ), "a {\ \n two-letters: #ab;\ \n five-letters: #abcde;\ \n seven-letters: #abcdefa;\ \n nine-letters: #abcdefabc;\ \n three-letters-not-hex: #axc;\ \n four-letters-not-hex: #axcd;\ \n six-letters-not-hex: #abcxde;\ \n eight-letters-not-hex: #abcxdefa;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/lists/000077500000000000000000000000001474765622100206375ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/values/lists/brackets.rs000066400000000000000000000034421474765622100230060ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/lists/brackets.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("brackets") } #[test] fn empty() { assert_eq!( runner().ok("a {b: []}\n"), "a {\ \n b: [];\ \n}\n" ); } #[test] fn multiple() { assert_eq!( runner().ok("a {b: [c d]}\n"), "a {\ \n b: [c d];\ \n}\n" ); } mod nested { #[allow(unused)] use super::runner; #[test] fn empty() { assert_eq!( runner().ok("a {b: [[]]}\n"), "a {\ \n b: [[]];\ \n}\n" ); } #[test] fn multiple() { assert_eq!( runner().ok("a {b: [[c] [d]]}\n"), "a {\ \n b: [[c] [d]];\ \n}\n" ); } #[test] fn single() { assert_eq!( runner().ok("a {b: [[c]]}\n"), "a {\ \n b: [[c]];\ \n}\n" ); } mod unbracketed { #[allow(unused)] use super::runner; #[test] fn empty() { assert_eq!( runner().ok("a {b: [()]}\n"), "a {\ \n b: [];\ \n}\n" ); } #[test] fn multiple() { assert_eq!( runner().ok("a {b: [(c,) (d e)]}\n"), "a {\ \n b: [c d e];\ \n}\n" ); } #[test] fn single() { assert_eq!( runner().ok("a {b: [(c,)]}\n"), "a {\ \n b: [c];\ \n}\n" ); } } } #[test] fn single() { assert_eq!( runner().ok("a {b: [c]}\n"), "a {\ \n b: [c];\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/lists/equality.rs000066400000000000000000000021361474765622100230440ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/lists/equality.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("equality") } #[test] fn test() { assert_eq!( runner().ok("a {\ \n @if [foo bar]==[foo bar] {\ \n t1: t;\ \n } @else {\ \n f1: f;\ \n }\n\ \n @if [foo bar]==[foo, bar] {\ \n t2: t;\ \n } @else {\ \n f2: f;\ \n }\n\ \n @if [foo bar]==(foo bar) {\ \n t3: t;\ \n } @else {\ \n f3: f;\ \n }\n\ \n @if [] == [] {\ \n t4: t;\ \n } @else {\ \n f4: f;\ \n }\n\ \n @if [] == () {\ \n t5: t;\ \n } @else {\ \n f5: f;\ \n }\ \n}\n"), "a {\ \n t1: t;\ \n f2: f;\ \n f3: f;\ \n t4: t;\ \n f5: f;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/lists/mod.rs000066400000000000000000000003161474765622100217640ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/lists" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("lists") } mod brackets; mod equality; mod sass; mod slash; rsass-0.29.0/rsass/tests/spec/values/lists/sass.rs000066400000000000000000000006601474765622100221600ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/lists/sass.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("sass") } mod error { #[allow(unused)] use super::runner; mod no_parens { #[allow(unused)] use super::runner; } mod paren { #[allow(unused)] use super::runner; } } mod inline { #[allow(unused)] use super::runner; } rsass-0.29.0/rsass/tests/spec/values/lists/slash.rs000066400000000000000000000056571474765622100223340ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/lists/slash.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("slash") } mod functions { #[allow(unused)] use super::runner; #[test] fn length() { assert_eq!( runner().ok("@use \"sass:list\";\ \na {b: list.length(list.slash(c, d, e, f, g))}\n"), "a {\ \n b: 5;\ \n}\n" ); } #[test] fn nth() { assert_eq!( runner().ok("@use \"sass:list\";\ \na {b: list.nth(list.slash(c, d, e, f, g), 3)}\n"), "a {\ \n b: e;\ \n}\n" ); } } mod output { #[allow(unused)] use super::runner; #[test] fn bracketed_slash() { assert_eq!( runner().ok( "@use \"sass:list\";\ \n// CSS doesn\'t use slash-separated bracketed lists, but Sass supports them in\ \n// case one day that changes.\ \na {b: list.join(c d, e f, $separator: slash, $bracketed: true)}\n" ), "a {\ \n b: [c / d / e / f];\ \n}\n" ); } mod nested { #[allow(unused)] use super::runner; mod comma_in { #[allow(unused)] use super::runner; #[test] fn slash() { assert_eq!( runner().ok("@use \"sass:list\";\ \na {b: list.slash((c, d), (e, f))}\n"), "a {\ \n b: c, d / e, f;\ \n}\n" ); } } mod test_in { #[allow(unused)] use super::runner; #[test] fn comma() { assert_eq!( runner().ok("@use \"sass:list\";\ \na {b: list.slash(c, d), list.slash(e, f)}\n"), "a {\ \n b: c / d, e / f;\ \n}\n" ); } #[test] fn slash() { assert_eq!( runner().ok("@use \"sass:list\";\ \na {b: list.slash(list.slash(c, d), list.slash(e, f))}\n"), "a {\ \n b: c / d / e / f;\ \n}\n" ); } #[test] fn space() { assert_eq!( runner().ok("@use \"sass:list\";\ \na {b: list.slash(c, d) list.slash(e, f)}\n"), "a {\ \n b: c / d e / f;\ \n}\n" ); } } mod outside { #[allow(unused)] use super::runner; #[test] fn space() { assert_eq!( runner().ok("@use \"sass:list\";\ \na {b: list.slash(c d, e f)}\n"), "a {\ \n b: c d / e f;\ \n}\n" ); } } } } rsass-0.29.0/rsass/tests/spec/values/maps/000077500000000000000000000000001474765622100204415ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/values/maps/duplicate_keys.rs000066400000000000000000000013571474765622100240220ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/maps/duplicate-keys.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("duplicate-keys") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "$map: (\ \n alpha: 1,\ \n beta: 2,\ \n gamma: 3,\ \n delta: (\ \n eta: 5,\ \n eta: 6,\ \n ),\ \n);\n" ), "Error: Duplicate key.\ \n ,\ \n6 | eta: 5,\ \n | === first key\ \n7 | eta: 6,\ \n | ^^^ second key\ \n \'\ \n input.scss 7:5 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/values/maps/errors.rs000066400000000000000000000010071474765622100223210ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/maps/errors.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("errors") } #[test] fn test() { assert_eq!( runner().err( "$map: ( foo: bar );\ \ntest { baz: $map; }\n" ), "Error: (foo: bar) isn\'t a valid CSS value.\ \n ,\ \n2 | test { baz: $map; }\ \n | ^^^^\ \n \'\ \n input.scss 2:13 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/values/maps/invalid_key.rs000066400000000000000000000010621474765622100233040ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/maps/invalid-key.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("invalid-key") } #[test] #[ignore] // wrong error fn test() { assert_eq!( runner().err( "@use \"sass:meta\";\n\ \n$id: meta.inspect((a,b:c)...)\n" ), "Error: expected \")\".\ \n ,\ \n3 | $id: meta.inspect((a,b:c)...)\ \n | ^\ \n \'\ \n input.scss 3:23 root stylesheet", ); } rsass-0.29.0/rsass/tests/spec/values/maps/key_equality.rs000066400000000000000000000023311474765622100235130ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/maps/key_equality.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("key_equality") } mod infinity { #[allow(unused)] use super::runner; #[test] fn negative() { assert_eq!( runner().ok( "@use \"sass:map\";\ \n@use \"sass:math\";\ \n@use \"sass:meta\";\n\ \na {b: meta.inspect(map.get(((math.div(-1, 0)): b), math.div(-1, 0)))}\n" ), "a {\ \n b: b;\ \n}\n" ); } #[test] fn positive() { assert_eq!( runner().ok( "@use \"sass:map\";\ \n@use \"sass:math\";\ \n@use \"sass:meta\";\n\ \na {b: meta.inspect(map.get(((math.div(1, 0)): b), math.div(1, 0)))}\n" ), "a {\ \n b: b;\ \n}\n" ); } } #[test] fn nan() { assert_eq!( runner().ok( "@use \"sass:map\";\ \n@use \"sass:math\";\ \n@use \"sass:meta\";\n\ \na {b: meta.inspect(map.get((math.div(0, 0): b), math.div(0, 0)))}\n" ), "a {\ \n b: null;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/maps/length.rs000066400000000000000000000006701474765622100222730ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/maps/length.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("length") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:list\";\ \n$map: (aaa: 100, bbb: 200, ccc: 300);\n\ \na {\ \n b: list.length($map);\ \n}\n"), "a {\ \n b: 3;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/maps/map_values.rs000066400000000000000000000007661474765622100231540ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/maps/map-values.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("map-values") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:map\";\ \ndiv {\ \n foo: map.values((foo: 1, bar: 2));\ \n foo: map.values((foo: 1, bar: 2, baz: 2));\ \n}\n"), "div {\ \n foo: 1, 2;\ \n foo: 1, 2, 2;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/maps/mod.rs000066400000000000000000000003741474765622100215720ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/maps" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("maps") } mod duplicate_keys; mod errors; mod invalid_key; mod key_equality; mod length; mod map_values; rsass-0.29.0/rsass/tests/spec/values/mixins.rs000066400000000000000000000057471474765622100213730ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/mixins.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("mixins") } mod error { #[allow(unused)] use super::runner; #[test] #[ignore] // wrong error fn addition() { assert_eq!( runner().err( "@use \"sass:meta\";\ \n@mixin a() {}\ \n@mixin b() {}\ \na {b: meta.get-mixin(a) + meta.get-mixin(b)}\n" ), "Error: get-mixin(\"a\") isn\'t a valid CSS value.\ \n ,\ \n4 | a {b: meta.get-mixin(a) + meta.get-mixin(b)}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 4:7 root stylesheet", ); } #[test] #[ignore] // wrong error fn division() { assert_eq!( runner().err( "@use \"sass:meta\";\ \n@mixin a() {}\ \n@mixin b() {}\ \na {b: meta.get-mixin(a) / meta.get-mixin(b)}\n" ), "Error: get-mixin(\"a\") isn\'t a valid CSS value.\ \n ,\ \n4 | a {b: meta.get-mixin(a) / meta.get-mixin(b)}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 4:7 root stylesheet", ); } #[test] #[ignore] // wrong error fn modulo() { assert_eq!( runner().err( "@use \"sass:meta\";\ \n@mixin a() {}\ \n@mixin b() {}\ \na {b: meta.get-mixin(a) % meta.get-mixin(b)}\n" ), "Error: Undefined operation \"get-mixin(\"a\") % get-mixin(\"b\")\".\ \n ,\ \n4 | a {b: meta.get-mixin(a) % meta.get-mixin(b)}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 4:7 root stylesheet", ); } #[test] #[ignore] // wrong error fn multiplication() { assert_eq!( runner().err( "@use \"sass:meta\";\ \n@mixin a() {}\ \n@mixin b() {}\ \na {b: meta.get-mixin(a) * meta.get-mixin(b)}\n" ), "Error: Undefined operation \"get-mixin(\"a\") * get-mixin(\"b\")\".\ \n ,\ \n4 | a {b: meta.get-mixin(a) * meta.get-mixin(b)}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 4:7 root stylesheet", ); } #[test] #[ignore] // wrong error fn subtraction() { assert_eq!( runner().err( "@use \"sass:meta\";\ \n@mixin a() {}\ \n@mixin b() {}\ \na {b: meta.get-mixin(a) - meta.get-mixin(b)}\n" ), "Error: get-mixin(\"a\") isn\'t a valid CSS value.\ \n ,\ \n4 | a {b: meta.get-mixin(a) - meta.get-mixin(b)}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 4:7 root stylesheet", ); } } rsass-0.29.0/rsass/tests/spec/values/mod.rs000066400000000000000000000004171474765622100206300ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("values") } mod calculation; mod colors; mod identifiers; mod ids; mod lists; mod maps; mod mixins; mod numbers; mod strings; rsass-0.29.0/rsass/tests/spec/values/numbers/000077500000000000000000000000001474765622100211545ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/values/numbers/bounds.rs000066400000000000000000000177601474765622100230270ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/numbers/bounds.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("bounds") } mod int { #[allow(unused)] use super::runner; mod above_max { #[allow(unused)] use super::runner; #[test] fn slightly() { assert_eq!( runner().ok( "a {b: 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001}\n" ), "a {\ \n b: 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;\ \n}\n" ); } #[test] fn very() { assert_eq!( runner().ok( "a {\ \n b: 999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999;\ \n}\n" ), "a {\ \n b: calc(infinity);\ \n}\n" ); } } mod below_min { #[allow(unused)] use super::runner; #[test] fn slightly() { assert_eq!( runner().ok( "a {b: -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001}\n" ), "a {\ \n b: -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;\ \n}\n" ); } #[test] fn very() { assert_eq!( runner().ok( "a {\ \n b: -999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999;\ \n}\n" ), "a {\ \n b: calc(-infinity);\ \n}\n" ); } } #[test] fn max_value() { assert_eq!( runner().ok( "a {b: 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000}\n" ), "a {\ \n b: 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;\ \n}\n" ); } #[test] fn min_value() { assert_eq!( runner().ok( "a {b: -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000}\n" ), "a {\ \n b: -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;\ \n}\n" ); } mod safe { #[allow(unused)] use super::runner; #[test] fn above_max() { assert_eq!( runner().ok("a {\ \n b: 9007199254740993;\ \n}\n"), "a {\ \n b: 9007199254740992;\ \n}\n" ); } #[test] fn below_min() { assert_eq!( runner().ok("a {b: -9007199254740993}\n"), "a {\ \n b: -9007199254740992;\ \n}\n" ); } #[test] fn max() { assert_eq!( runner().ok("a {b: 9007199254740991}\n"), "a {\ \n b: 9007199254740991;\ \n}\n" ); } #[test] fn min() { assert_eq!( runner().ok("a {\ \n b: -9007199254740991;\ \n}\n"), "a {\ \n b: -9007199254740991;\ \n}\n" ); } } } mod precision_limit { #[allow(unused)] use super::runner; mod at { #[allow(unused)] use super::runner; #[test] fn after_decimal() { assert_eq!( runner().ok( "// binary 0.10000000000000000000000000000000000000000000000000001\ \n// 0.5 + 2^-53\ \n// Multiplied by 2^53 so Sass\'s serialization doesn\'t remove the precision\ \n@use \'sass:math\';\ \na {b: 0.5000000000000001 * math.pow(2, 53)}\n" ), "a {\ \n b: 4503599627370497;\ \n}\n" ); } #[test] fn balanced() { assert_eq!( runner().ok( "// binary 10000000000000000000000000.000000000000000000000000001\ \n// 2^26 + 2^-26\ \na {b: 67108864.00000001}\n" ), "a {\ \n b: 67108864.00000001;\ \n}\n" ); } #[test] fn no_decimal() { assert_eq!( runner().ok( "// binary 10000000000000000000000000000000000000000000000000001\ \n// 2^52 + 1\ \na {b: 4503599627370497}\n" ), "a {\ \n b: 4503599627370497;\ \n}\n" ); } } mod over { #[allow(unused)] use super::runner; #[test] fn after_decimal() { assert_eq!( runner().ok( "// 0b0.100000000000000000000000000000000000000000000000000001\ \n// 0.5 + 2^-54\ \n// Multiplied by 2^53 so Sass\'s serialization doesn\'t remove the precision\ \n@use \'sass:math\';\ \na {b: 0.50000000000000005 * math.pow(2, 54)}\n" ), "a {\ \n b: 9007199254740992;\ \n}\n" ); } #[test] fn balanced() { assert_eq!( runner().ok( "// 0b10000000000000000000000000.0000000000000000000000000001\ \n// 2^26 + 2^-27\ \na {b: 67108864.000000007}\n" ), "a {\ \n b: 67108864;\ \n}\n" ); } #[test] fn no_decimal() { assert_eq!( runner().ok( "// binary 100000000000000000000000000000000000000000000000000001\ \n// 2^53 + 1\ \na {b: 9007199254740993}\n" ), "a {\ \n b: 9007199254740992;\ \n}\n" ); } } } rsass-0.29.0/rsass/tests/spec/values/numbers/degenerate.rs000066400000000000000000000141741474765622100236340ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/numbers/degenerate.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("degenerate") } mod error { #[allow(unused)] use super::runner; mod infinity { #[allow(unused)] use super::runner; #[test] fn denominator_unit() { assert_eq!( runner().err( "@use \'sass:math\';\ \na {b: math.div(1, 0px)}\n" ), "Error: calc(infinity / 1px) isn\'t a valid CSS value.\ \n ,\ \n2 | a {b: math.div(1, 0px)}\ \n | ^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:7 root stylesheet", ); } #[test] fn multiple_numerator_units() { assert_eq!( runner().err( "@use \'sass:math\';\ \na {b: math.div(1px * 1em, 0)}\n" ), "Error: calc(infinity * 1px * 1em) isn\'t a valid CSS value.\ \n ,\ \n2 | a {b: math.div(1px * 1em, 0)}\ \n | ^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:7 root stylesheet", ); } #[test] fn numerator_and_denominator_unit() { assert_eq!( runner().err( "@use \'sass:math\';\ \na {b: math.div(1px, 0em)}\n" ), "Error: calc(infinity * 1px / 1em) isn\'t a valid CSS value.\ \n ,\ \n2 | a {b: math.div(1px, 0em)}\ \n | ^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:7 root stylesheet", ); } } mod minus_infinity { #[allow(unused)] use super::runner; #[test] fn denominator_unit() { assert_eq!( runner().err( "@use \'sass:math\';\ \na {b: math.div(-1, 0px)}\n" ), "Error: calc(-infinity / 1px) isn\'t a valid CSS value.\ \n ,\ \n2 | a {b: math.div(-1, 0px)}\ \n | ^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:7 root stylesheet", ); } #[test] fn multiple_numerator_units() { assert_eq!( runner().err( "@use \'sass:math\';\ \na {b: math.div(-1px * 1em, 0)}\n" ), "Error: calc(-infinity * 1px * 1em) isn\'t a valid CSS value.\ \n ,\ \n2 | a {b: math.div(-1px * 1em, 0)}\ \n | ^^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:7 root stylesheet", ); } #[test] fn numerator_and_denominator_unit() { assert_eq!( runner().err( "@use \'sass:math\';\ \na {b: math.div(-1px, 0em)}\n" ), "Error: calc(-infinity * 1px / 1em) isn\'t a valid CSS value.\ \n ,\ \n2 | a {b: math.div(-1px, 0em)}\ \n | ^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:7 root stylesheet", ); } } mod nan { #[allow(unused)] use super::runner; #[test] fn denominator_unit() { assert_eq!( runner().err( "@use \'sass:math\';\ \na {b: math.div(0, 0px)}\n" ), "Error: calc(NaN / 1px) isn\'t a valid CSS value.\ \n ,\ \n2 | a {b: math.div(0, 0px)}\ \n | ^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:7 root stylesheet", ); } #[test] fn multiple_numerator_units() { assert_eq!( runner().err( "@use \'sass:math\';\ \na {b: math.div(0px * 0em, 0)}\n" ), "Error: calc(NaN * 1px * 1em) isn\'t a valid CSS value.\ \n ,\ \n2 | a {b: math.div(0px * 0em, 0)}\ \n | ^^^^^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:7 root stylesheet", ); } #[test] fn numerator_and_denominator_unit() { assert_eq!( runner().err( "@use \'sass:math\';\ \na {b: math.div(0px, 0em)}\n" ), "Error: calc(NaN * 1px / 1em) isn\'t a valid CSS value.\ \n ,\ \n2 | a {b: math.div(0px, 0em)}\ \n | ^^^^^^^^^^^^^^^^^^\ \n \'\ \n input.scss 2:7 root stylesheet", ); } } } mod infinity { #[allow(unused)] use super::runner; #[test] fn single_unit() { assert_eq!( runner().ok("@use \'sass:math\';\ \na {b: math.div(1px, 0)}\n"), "a {\ \n b: calc(infinity * 1px);\ \n}\n" ); } #[test] fn unitless() { assert_eq!( runner().ok("@use \'sass:math\';\ \na {b: math.div(1, 0)}\n"), "a {\ \n b: calc(infinity);\ \n}\n" ); } } mod minus_infinity { #[allow(unused)] use super::runner; #[test] fn single_unit() { assert_eq!( runner().ok("@use \'sass:math\';\ \na {b: math.div(-1px, 0)}\n"), "a {\ \n b: calc(-infinity * 1px);\ \n}\n" ); } #[test] fn unitless() { assert_eq!( runner().ok("@use \'sass:math\';\ \na {b: math.div(-1, 0)}\n"), "a {\ \n b: calc(-infinity);\ \n}\n" ); } } mod nan { #[allow(unused)] use super::runner; #[test] fn single_unit() { assert_eq!( runner().ok("@use \'sass:math\';\ \na {b: math.div(0px, 0)}\n"), "a {\ \n b: calc(NaN * 1px);\ \n}\n" ); } #[test] fn unitless() { assert_eq!( runner().ok("@use \'sass:math\';\ \na {b: math.div(0, 0)}\n"), "a {\ \n b: calc(NaN);\ \n}\n" ); } } rsass-0.29.0/rsass/tests/spec/values/numbers/divide/000077500000000000000000000000001474765622100224205ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/values/numbers/divide/mod.rs000066400000000000000000000003121474765622100235410ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/numbers/divide" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("divide") } mod slash_free; mod slash_separated; rsass-0.29.0/rsass/tests/spec/values/numbers/divide/slash_free/000077500000000000000000000000001474765622100245335ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/values/numbers/divide/slash_free/argument.rs000066400000000000000000000061471474765622100267330ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/numbers/divide/slash_free/argument.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("argument") } mod function { #[allow(unused)] use super::runner; #[test] fn built_in() { assert_eq!( runner().ok("@use \"sass:list\";\ \nc {d: list.join(1/2, 3/4)}\n"), "c {\ \n d: 0.5 0.75;\ \n}\n" ); } #[test] fn named() { assert_eq!( runner().ok("@use \"sass:list\";\ \nc {d: list.join($list1: 1/2, $list2: 3/4)}\n"), "c {\ \n d: 0.5 0.75;\ \n}\n" ); } mod rest { #[allow(unused)] use super::runner; #[test] fn kwargs() { assert_eq!( runner().ok("@use \"sass:list\";\ \nc {d: list.join(1/2..., (\"list2\": 3/4)...)}\n"), "c {\ \n d: 0.5 0.75;\ \n}\n" ); } #[test] fn list() { assert_eq!( runner().ok("@use \"sass:list\";\ \nc {d: list.join(1/2 3/4...)}\n"), "c {\ \n d: 0.5 0.75;\ \n}\n" ); } #[test] fn map() { assert_eq!( runner().ok("@use \"sass:list\";\ \nc {d: list.join((\"list1\": 1/2, \"list2\": 3/4)...)}\n"), "c {\ \n d: 0.5 0.75;\ \n}\n" ); } #[test] fn single() { assert_eq!( runner().ok("@use \"sass:list\";\ \nc {d: list.join(1/2, 3/4...)}\n"), "c {\ \n d: 0.5 0.75;\ \n}\n" ); } } #[test] fn user_defined() { assert_eq!( runner().ok("@function a($b) {@return 1 $b 2}\n\ \nc {d: a(1/2)}\n"), "c {\ \n d: 1 0.5 2;\ \n}\n" ); } } mod test_macro { #[allow(unused)] use super::runner; #[test] fn named() { assert_eq!( runner().ok("c {d: if(true, $if-true: 1/2, $if-false: null)}\n"), "c {\ \n d: 0.5;\ \n}\n" ); } #[test] fn positional() { assert_eq!( runner().ok("c {d: if(true, 1/2, null)}\n"), "c {\ \n d: 0.5;\ \n}\n" ); } #[test] fn rest() { assert_eq!( runner().ok("c {d: if(true, 1/2 null...)}\n"), "c {\ \n d: 0.5;\ \n}\n" ); } } mod mixin { #[allow(unused)] use super::runner; #[test] fn default() { assert_eq!( runner().ok("@mixin a($b: 1/2) {c {d: $b}}\n\ \n@include a;\n"), "c {\ \n d: 0.5;\ \n}\n" ); } #[test] fn user_defined() { assert_eq!( runner().ok("@mixin a($b) {c {d: $b}}\n\ \n@include a(1/2);\n"), "c {\ \n d: 0.5;\ \n}\n" ); } } rsass-0.29.0/rsass/tests/spec/values/numbers/divide/slash_free/mod.rs000066400000000000000000000003561474765622100256640ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/numbers/divide/slash_free" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("slash_free") } mod argument; mod test_return; mod value; mod variable; rsass-0.29.0/rsass/tests/spec/values/numbers/divide/slash_free/test_return.rs000066400000000000000000000010651474765622100274610ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/numbers/divide/slash_free/return.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("return") } #[test] fn built_in() { assert_eq!( runner().ok("@use \"sass:list\";\ \na {b: list.nth(3 1/2 4, 2)}\n"), "a {\ \n b: 0.5;\ \n}\n" ); } #[test] fn user_defined() { assert_eq!( runner().ok("@function a() {@return 1/2}\n\ \nb {c: a()}\n"), "b {\ \n c: 0.5;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/numbers/divide/slash_free/value.rs000066400000000000000000000026331474765622100262210ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/numbers/divide/slash_free/value.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("value") } #[test] fn inner_math() { assert_eq!( runner().ok("a {b: 1*1/2}\n"), "a {\ \n b: 0.5;\ \n}\n" ); } mod outer_math { #[allow(unused)] use super::runner; #[test] fn left() { assert_eq!( runner().ok("a {b: 1+1/2}\n"), "a {\ \n b: 1.5;\ \n}\n" ); } #[test] fn right() { assert_eq!( runner().ok("a {b: 1/2+1}\n"), "a {\ \n b: 1.5;\ \n}\n" ); } } mod parentheses { #[allow(unused)] use super::runner; #[test] fn all() { assert_eq!( runner().ok("a {b: (1/2)}\n"), "a {\ \n b: 0.5;\ \n}\n" ); } #[test] fn left() { assert_eq!( runner().ok("a {b: (1)/2}\n"), "a {\ \n b: 0.5;\ \n}\n" ); } #[test] fn right() { assert_eq!( runner().ok("a {b: 1/(2)}\n"), "a {\ \n b: 0.5;\ \n}\n" ); } } #[test] fn parentheses_in_list() { assert_eq!( runner().ok("a {b: 3 (1/2) 4}\n"), "a {\ \n b: 3 0.5 4;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/numbers/divide/slash_free/variable.rs000066400000000000000000000021551474765622100266710ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/numbers/divide/slash_free/variable.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner() .with_cwd("variable") .mock_file( "forward_with/_midstream.scss", "@forward \"upstream\" with ($a: 1/2);\n", ) .mock_file( "forward_with/_upstream.scss", "$a: null !default;\nb {c: $a}\n", ) .mock_file("use_with/_other.scss", "$a: null !default;\nb {c: $a}\n") } #[test] fn forward_with() { let runner = runner().with_cwd("forward_with"); assert_eq!( runner.ok("@use \"midstream\";\n"), "b {\ \n c: 0.5;\ \n}\n" ); } #[test] fn local() { let runner = runner().with_cwd("local"); assert_eq!( runner.ok("$a: 1/2;\ \nb {c: $a}\n"), "b {\ \n c: 0.5;\ \n}\n" ); } #[test] fn use_with() { let runner = runner().with_cwd("use_with"); assert_eq!( runner.ok("@use \"other\" with ($a: 1/2);\n"), "b {\ \n c: 0.5;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/numbers/divide/slash_separated.rs000066400000000000000000000055651474765622100261430ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/numbers/divide/slash_separated.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("slash_separated") } mod list { #[allow(unused)] use super::runner; mod argument { #[allow(unused)] use super::runner; mod function { #[allow(unused)] use super::runner; #[test] fn built_in() { assert_eq!( runner().ok("@use \"sass:list\";\ \nc {d: list.join(1 2/3 4, ())}\n"), "c {\ \n d: 1 2/3 4;\ \n}\n" ); } #[test] fn user_defined() { assert_eq!( runner().ok("@function a($b) {@return $b}\n\ \nc {d: a(1 2/3 4)}\n"), "c {\ \n d: 1 2/3 4;\ \n}\n" ); } } #[test] fn mixin() { assert_eq!( runner().ok("@mixin a($b) {c {d: $b}}\n\ \n@include a(1 2/3 4);\n"), "c {\ \n d: 1 2/3 4;\ \n}\n" ); } } #[test] fn bracketed() { assert_eq!( runner().ok("a {b: [1 2/3 4]}\n"), "a {\ \n b: [1 2/3 4];\ \n}\n" ); } #[test] fn comma() { assert_eq!( runner().ok("a {b: 1, 2/3, 4}\n"), "a {\ \n b: 1, 2/3, 4;\ \n}\n" ); } #[test] fn declaration() { assert_eq!( runner().ok("a {b: 1 2/3 4}\n"), "a {\ \n b: 1 2/3 4;\ \n}\n" ); } #[test] fn interpolation() { assert_eq!( runner().ok("a {b: #{1 2/3 4}}\n"), "a {\ \n b: 1 2/3 4;\ \n}\n" ); } #[test] fn parenthesized() { assert_eq!( runner().ok("a {b: (1 2/3 4)}\n"), "a {\ \n b: 1 2/3 4;\ \n}\n" ); } #[test] fn test_return() { assert_eq!( runner().ok("@function a() {@return 1 2/3 4}\n\ \nb {c: a()}\n"), "b {\ \n c: 1 2/3 4;\ \n}\n" ); } } mod value { #[allow(unused)] use super::runner; #[test] fn declaration() { assert_eq!( runner().ok("a {b: 1/2}\n"), "a {\ \n b: 1/2;\ \n}\n" ); } #[test] fn interpolation() { assert_eq!( runner().ok("a {b: #{1/2}}\n"), "a {\ \n b: 1/2;\ \n}\n" ); } #[test] fn multiple() { assert_eq!( runner().ok("a {b: 1/2/3/4/5}\n"), "a {\ \n b: 1/2/3/4/5;\ \n}\n" ); } } rsass-0.29.0/rsass/tests/spec/values/numbers/error.rs000066400000000000000000000033711474765622100226570ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/numbers/error.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("error") } mod trailing_dot { #[allow(unused)] use super::runner; #[test] #[ignore] // missing error fn digit() { assert_eq!( runner().err("a {b: 1.}\n"), "Error: Expected digit.\ \n ,\ \n1 | a {b: 1.}\ \n | ^\ \n \'\ \n input.scss 1:9 root stylesheet", ); } #[test] #[ignore] // missing error fn minus() { assert_eq!( runner().err("a {b: -.}\n"), "Error: Expected digit.\ \n ,\ \n1 | a {b: -.}\ \n | ^\ \n \'\ \n input.scss 1:9 root stylesheet", ); } #[test] #[ignore] // missing error fn minus_digit() { assert_eq!( runner().err("a {b: -1.}\n"), "Error: Expected digit.\ \n ,\ \n1 | a {b: -1.}\ \n | ^\ \n \'\ \n input.scss 1:10 root stylesheet", ); } #[test] #[ignore] // missing error fn plus() { assert_eq!( runner().err("a {b: +.}\n"), "Error: Expected digit.\ \n ,\ \n1 | a {b: +.}\ \n | ^\ \n \'\ \n input.scss 1:9 root stylesheet", ); } #[test] #[ignore] // missing error fn plus_digit() { assert_eq!( runner().err("a {b: +1.}\n"), "Error: Expected digit.\ \n ,\ \n1 | a {b: +1.}\ \n | ^\ \n \'\ \n input.scss 1:10 root stylesheet", ); } } rsass-0.29.0/rsass/tests/spec/values/numbers/mod.rs000066400000000000000000000004161474765622100223020ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/numbers" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("numbers") } mod bounds; mod degenerate; mod divide; mod error; mod modulo; mod precision; mod units; mod very_large; rsass-0.29.0/rsass/tests/spec/values/numbers/modulo/000077500000000000000000000000001474765622100224535ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/values/numbers/modulo/floats.rs000066400000000000000000000035251474765622100243160ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/numbers/modulo/floats.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("floats") } mod larger { #[allow(unused)] use super::runner; #[test] fn negative_negative() { assert_eq!( runner().ok("a {\ \n b: -6.3 % -2.4;\ \n}\n"), "a {\ \n b: -1.5;\ \n}\n" ); } #[test] fn negative_positive() { assert_eq!( runner().ok("a {\ \n b: -6.3 % 2.4;\ \n}\n"), "a {\ \n b: 0.9;\ \n}\n" ); } #[test] fn positive_negative() { assert_eq!( runner().ok("a {\ \n b: 6.3 % -2.4;\ \n}"), "a {\ \n b: -0.9;\ \n}\n" ); } #[test] fn positive_positive() { assert_eq!( runner().ok("a {\ \n b: 6.3 % 2.4;\ \n}\n"), "a {\ \n b: 1.5;\ \n}\n" ); } } #[test] fn negative_negative() { assert_eq!( runner().ok("a {\ \n b: -1.2 % -4.7;\ \n}\n"), "a {\ \n b: -1.2;\ \n}\n" ); } #[test] fn negative_positive() { assert_eq!( runner().ok("a {\ \n b: -1.2 % 4.7;\ \n}\n"), "a {\ \n b: 3.5;\ \n}\n" ); } #[test] fn positive_negative() { assert_eq!( runner().ok("a {\ \n b: 1.2 % -4.7;\ \n}\n"), "a {\ \n b: -3.5;\ \n}\n" ); } #[test] fn positive_positive() { assert_eq!( runner().ok("a {\ \n b: 1.2 % 4.7;\ \n}\n"), "a {\ \n b: 1.2;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/numbers/modulo/ints.rs000066400000000000000000000034371474765622100240050ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/numbers/modulo/ints.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("ints") } mod larger { #[allow(unused)] use super::runner; #[test] fn negative_negative() { assert_eq!( runner().ok("a {\ \n b: -7 % -5;\ \n}\n"), "a {\ \n b: -2;\ \n}\n" ); } #[test] fn negative_positive() { assert_eq!( runner().ok("a {\ \n b: -7 % 5;\ \n}\n"), "a {\ \n b: 3;\ \n}\n" ); } #[test] fn positive_negative() { assert_eq!( runner().ok("a {\ \n b: 6 % -5;\ \n}"), "a {\ \n b: -4;\ \n}\n" ); } #[test] fn positive_positive() { assert_eq!( runner().ok("a {\ \n b: 6 % 5;\ \n}\n"), "a {\ \n b: 1;\ \n}\n" ); } } #[test] fn negative_negative() { assert_eq!( runner().ok("a {\ \n b: -1 % -4;\ \n}\n"), "a {\ \n b: -1;\ \n}\n" ); } #[test] fn negative_positive() { assert_eq!( runner().ok("a {\ \n b: -1 % 4;\ \n}\n"), "a {\ \n b: 3;\ \n}\n" ); } #[test] fn positive_negative() { assert_eq!( runner().ok("a {\ \n b: 1 % -4;\ \n}"), "a {\ \n b: -3;\ \n}\n" ); } #[test] fn positive_positive() { assert_eq!( runner().ok("a {\ \n b: 1 % 4;\ \n}\n"), "a {\ \n b: 1;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/numbers/modulo/mod.rs000066400000000000000000000003071474765622100236000ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/numbers/modulo" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("modulo") } mod floats; mod ints; mod zeros; rsass-0.29.0/rsass/tests/spec/values/numbers/modulo/zeros.rs000066400000000000000000000022011474765622100241560ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/numbers/modulo/zeros.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("zeros") } #[test] fn negative_negative() { assert_eq!( runner().ok("a {\ \n b: -0 % -1;\ \n}\n"), "a {\ \n b: 0;\ \n}\n" ); } #[test] fn negative_positive() { assert_eq!( runner().ok("a {\ \n b: -0 % 1;\ \n}\n"), "a {\ \n b: 0;\ \n}\n" ); } #[test] fn positive_negative() { assert_eq!( runner().ok("a {\ \n b: +0 % -1;\ \n}"), "a {\ \n b: 0;\ \n}\n" ); } #[test] fn positive_positive() { assert_eq!( runner().ok("a {\ \n b: +0 % +1;\ \n}\n"), "a {\ \n b: 0;\ \n}\n" ); } #[test] fn zero_divider() { assert_eq!( runner().ok("@use \"sass:meta\";\n\ \na {\ \n b: meta.inspect(1 % 0);\ \n}\n"), "a {\ \n b: calc(NaN);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/numbers/precision.rs000066400000000000000000000224511474765622100235210ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/numbers/precision.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("precision") } mod very_close_to_int { #[allow(unused)] use super::runner; mod negative { #[allow(unused)] use super::runner; mod above { #[allow(unused)] use super::runner; #[test] fn at_boundary() { assert_eq!( runner().ok("@use \'sass:math\';\ \na {b: -10 + math.pow(10, -11)}\n"), "a {\ \n b: -10;\ \n}\n" ); } #[test] fn bigger_than_boundary() { assert_eq!( runner().ok("@use \'sass:math\';\ \na {b: -10 + math.pow(10, -10)}\n"), "a {\ \n b: -9.9999999999;\ \n}\n" ); } #[test] fn slightly_bigger_than_boundary() { assert_eq!( runner().ok("@use \'sass:math\';\ \na {b: -10 + 2 * math.pow(10, -11)}\n"), "a {\ \n b: -10;\ \n}\n" ); } #[test] fn slightly_smaller_than_boundary() { assert_eq!( runner().ok("@use \'sass:math\';\ \na {b: -10 + 0.5 * math.pow(10, -11)}\n"), "a {\ \n b: -10;\ \n}\n" ); } #[test] fn smaller_than_boundary() { assert_eq!( runner().ok("@use \'sass:math\';\ \na {b: -10 + math.pow(10, -12)}\n"), "a {\ \n b: -10;\ \n}\n" ); } } mod below { #[allow(unused)] use super::runner; #[test] fn at_boundary() { assert_eq!( runner().ok("@use \'sass:math\';\ \na {b: -10 - math.pow(10, -11)}\n"), "a {\ \n b: -10;\ \n}\n" ); } #[test] fn bigger_than_boundary() { assert_eq!( runner().ok("@use \'sass:math\';\ \na {b: -10 - math.pow(10, -10)}\n"), "a {\ \n b: -10.0000000001;\ \n}\n" ); } #[test] fn slightly_bigger_than_boundary() { assert_eq!( runner().ok("@use \'sass:math\';\ \na {b: -10 - 2 * math.pow(10, -11)}\n"), "a {\ \n b: -10;\ \n}\n" ); } #[test] fn slightly_smaller_than_boundary() { assert_eq!( runner().ok("@use \'sass:math\';\ \na {b: -10 - 0.5 * math.pow(10, -11)}\n"), "a {\ \n b: -10;\ \n}\n" ); } #[test] fn smaller_than_boundary() { assert_eq!( runner().ok("@use \'sass:math\';\ \na {b: -10 - math.pow(10, -12)}\n"), "a {\ \n b: -10;\ \n}\n" ); } } } mod positive { #[allow(unused)] use super::runner; mod above { #[allow(unused)] use super::runner; #[test] fn at_boundary() { assert_eq!( runner().ok("@use \'sass:math\';\ \na {b: 10 + math.pow(10, -11)}\n"), "a {\ \n b: 10;\ \n}\n" ); } #[test] fn bigger_than_boundary() { assert_eq!( runner().ok("@use \'sass:math\';\ \na {b: 10 + math.pow(10, -10)}\n"), "a {\ \n b: 10.0000000001;\ \n}\n" ); } #[test] fn slightly_bigger_than_boundary() { assert_eq!( runner().ok("@use \'sass:math\';\ \na {b: 10 + 2 * math.pow(10, -11)}\n"), "a {\ \n b: 10;\ \n}\n" ); } #[test] fn slightly_smaller_than_boundary() { assert_eq!( runner().ok("@use \'sass:math\';\ \na {b: 10 + 0.5 * math.pow(10, -11)}\n"), "a {\ \n b: 10;\ \n}\n" ); } #[test] fn smaller_than_boundary() { assert_eq!( runner().ok("@use \'sass:math\';\ \na {b: 10 + math.pow(10, -12)}\n"), "a {\ \n b: 10;\ \n}\n" ); } } mod below { #[allow(unused)] use super::runner; #[test] fn at_boundary() { assert_eq!( runner().ok("@use \'sass:math\';\ \na {b: 10 - math.pow(10, -11)}\n"), "a {\ \n b: 10;\ \n}\n" ); } #[test] fn bigger_than_boundary() { assert_eq!( runner().ok("@use \'sass:math\';\ \na {b: 10 - math.pow(10, -10)}\n"), "a {\ \n b: 9.9999999999;\ \n}\n" ); } #[test] fn slightly_bigger_than_boundary() { assert_eq!( runner().ok("@use \'sass:math\';\ \na {b: 10 - 2 * math.pow(10, -11)}\n"), "a {\ \n b: 10;\ \n}\n" ); } #[test] fn slightly_smaller_than_boundary() { assert_eq!( runner().ok("@use \'sass:math\';\ \na {b: 10 - 0.5 * math.pow(10, -11)}\n"), "a {\ \n b: 10;\ \n}\n" ); } #[test] fn smaller_than_boundary() { assert_eq!( runner().ok("@use \'sass:math\';\ \na {b: 10 - math.pow(10, -12)}\n"), "a {\ \n b: 10;\ \n}\n" ); } } } } mod very_small { #[allow(unused)] use super::runner; mod negative { #[allow(unused)] use super::runner; #[test] fn at_boundary() { assert_eq!( runner().ok("@use \'sass:math\';\ \na {b: -(math.pow(10, -11))}\n"), "a {\ \n b: 0;\ \n}\n" ); } #[test] fn bigger_than_boundary() { assert_eq!( runner().ok("@use \'sass:math\';\ \na {b: -(math.pow(10, -10))}\n"), "a {\ \n b: -0.0000000001;\ \n}\n" ); } #[test] fn slightly_bigger_than_boundary() { assert_eq!( runner().ok("@use \'sass:math\';\ \na {b: -2 * math.pow(10, -11)}\n"), "a {\ \n b: 0;\ \n}\n" ); } #[test] fn slightly_smaller_than_boundary() { assert_eq!( runner().ok("@use \'sass:math\';\ \na {b: -0.5 * math.pow(10, -11)}\n"), "a {\ \n b: 0;\ \n}\n" ); } #[test] fn smaller_than_boundary() { assert_eq!( runner().ok("@use \'sass:math\';\ \na {b: -(math.pow(10, -12))}\n"), "a {\ \n b: 0;\ \n}\n" ); } } mod positive { #[allow(unused)] use super::runner; #[test] fn at_boundary() { assert_eq!( runner().ok("@use \'sass:math\';\ \na {b: math.pow(10, -11)}\n"), "a {\ \n b: 0;\ \n}\n" ); } #[test] fn bigger_than_boundary() { assert_eq!( runner().ok("@use \'sass:math\';\ \na {b: math.pow(10, -10)}\n"), "a {\ \n b: 0.0000000001;\ \n}\n" ); } #[test] fn slightly_bigger_than_boundary() { assert_eq!( runner().ok("@use \'sass:math\';\ \na {b: 2 * math.pow(10, -11)}\n"), "a {\ \n b: 0;\ \n}\n" ); } #[test] fn slightly_smaller_than_boundary() { assert_eq!( runner().ok("@use \'sass:math\';\ \na {b: 0.5 * math.pow(10, -11)}\n"), "a {\ \n b: 0;\ \n}\n" ); } #[test] fn smaller_than_boundary() { assert_eq!( runner().ok("@use \'sass:math\';\ \na {b: 0.5 * math.pow(10, -12)}\n"), "a {\ \n b: 0;\ \n}\n" ); } } } rsass-0.29.0/rsass/tests/spec/values/numbers/units/000077500000000000000000000000001474765622100223165ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/values/numbers/units/mod.rs000066400000000000000000000002601474765622100234410ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/numbers/units" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("units") } mod multiple; rsass-0.29.0/rsass/tests/spec/values/numbers/units/multiple/000077500000000000000000000000001474765622100241515ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/values/numbers/units/multiple/divide_by_multiple_denominators.rs000066400000000000000000000007441474765622100331570ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/numbers/units/multiple/divide_by_multiple_denominators.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("divide_by_multiple_denominators") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:meta\";\ \na {\ \n b: meta.inspect(1 / (1 / 1px / 1rad));\ \n}\n"), "a {\ \n b: calc(1px * 1rad);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/numbers/units/multiple/divide_by_multiple_numerators.rs000066400000000000000000000007401474765622100326500ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/numbers/units/multiple/divide_by_multiple_numerators.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("divide_by_multiple_numerators") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:meta\";\ \na {\ \n b: meta.inspect(1 / (1px * 1rad));\ \n}\n"), "a {\ \n b: calc(1 / 1px / 1rad);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/numbers/units/multiple/division_cancels_both.rs000066400000000000000000000010021474765622100310400ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/numbers/units/multiple/division_cancels_both.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("division_cancels_both") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:meta\";\ \n$number: 1px * 1rad / 1ms / 1Hz;\ \na {\ \n b: meta.inspect($number / (1px / 1ms));\ \n}\n"), "a {\ \n b: calc(1rad / 1Hz);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/numbers/units/multiple/division_cancels_compatible.rs000066400000000000000000000010271474765622100322320ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/numbers/units/multiple/division_cancels_compatible.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("division_cancels_compatible") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:meta\";\ \n$number: 1px * 1rad / 1ms / 1Hz;\ \na {\ \n b: meta.inspect($number / 1in);\ \n}\n"), "a {\ \n b: calc(0.0104166667rad / 1ms / 1Hz);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/numbers/units/multiple/division_cancels_denominator.rs000066400000000000000000000010241474765622100324270ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/numbers/units/multiple/division_cancels_denominator.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("division_cancels_denominator") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:meta\";\ \n$number: 1px * 1rad / 1ms / 1Hz;\ \na {\ \n b: meta.inspect($number / (1 / 1ms));\ \n}\n"), "a {\ \n b: calc(1px * 1rad / 1Hz);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/numbers/units/multiple/division_cancels_denominator_twice.rs000066400000000000000000000010401474765622100336200ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/numbers/units/multiple/division_cancels_denominator_twice.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("division_cancels_denominator_twice") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:meta\";\ \n$number: 1px * 1rad / 1ms / 1Hz;\ \na {\ \n b: meta.inspect($number / (1 / 1ms / 1Hz));\ \n}\n"), "a {\ \n b: calc(1px * 1rad);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/numbers/units/multiple/division_cancels_numerator.rs000066400000000000000000000010121474765622100321210ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/numbers/units/multiple/division_cancels_numerator.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("division_cancels_numerator") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:meta\";\ \n$number: 1px * 1rad / 1ms / 1Hz;\ \na {\ \n b: meta.inspect($number / 1px);\ \n}\n"), "a {\ \n b: calc(1rad / 1ms / 1Hz);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/numbers/units/multiple/division_cancels_numerator_twice.rs000066400000000000000000000010341474765622100333200ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/numbers/units/multiple/division_cancels_numerator_twice.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("division_cancels_numerator_twice") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:meta\";\ \n$number: 1px * 1rad / 1ms / 1Hz;\ \na {\ \n b: meta.inspect($number / (1px * 1rad));\ \n}\n"), "a {\ \n b: calc(1 / 1ms / 1Hz);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/numbers/units/multiple/division_cancels_unknown.rs000066400000000000000000000011261474765622100316120ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/numbers/units/multiple/division_cancels_unknown.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("division_cancels_unknown") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:meta\";\ \n// Units cancel even if they\'re totally unknown to Sass.\ \n$number: 1foo * 1bar / 1baz / 1qux;\ \na {\ \n b: meta.inspect($number / 1foo);\ \n}\n"), "a {\ \n b: calc(1bar / 1baz / 1qux);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/numbers/units/multiple/mod.rs000066400000000000000000000014711474765622100253010ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/numbers/units/multiple" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("multiple") } mod divide_by_multiple_denominators; mod divide_by_multiple_numerators; mod division_cancels_both; mod division_cancels_compatible; mod division_cancels_denominator; mod division_cancels_denominator_twice; mod division_cancels_numerator; mod division_cancels_numerator_twice; mod division_cancels_unknown; mod multiple_denominators; mod multiple_numerators; mod multiplication_cancels_both; mod multiplication_cancels_compatible; mod multiplication_cancels_denominator; mod multiplication_cancels_denominator_twice; mod multiplication_cancels_numerator; mod multiplication_cancels_numerator_twice; mod multiplication_cancels_unknown; rsass-0.29.0/rsass/tests/spec/values/numbers/units/multiple/multiple_denominators.rs000066400000000000000000000007201474765622100311330ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/numbers/units/multiple/multiple_denominators.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("multiple_denominators") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:meta\";\ \na {\ \n b: meta.inspect((1 / 1px / 1rad));\ \n}\n"), "a {\ \n b: calc(1 / 1px / 1rad);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/numbers/units/multiple/multiple_numerators.rs000066400000000000000000000007021474765622100306300ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/numbers/units/multiple/multiple_numerators.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("multiple_numerators") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:meta\";\ \na {\ \n b: meta.inspect(1px * 1rad);\ \n}\n"), "a {\ \n b: calc(1px * 1rad);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/numbers/units/multiple/multiplication_cancels_both.rs000066400000000000000000000010161474765622100322560ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/numbers/units/multiple/multiplication_cancels_both.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("multiplication_cancels_both") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:meta\";\ \n$number: 1px * 1rad / 1ms / 1Hz;\ \na {\ \n b: meta.inspect($number * (1ms / 1px));\ \n}\n"), "a {\ \n b: calc(1rad / 1Hz);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/numbers/units/multiple/multiplication_cancels_compatible.rs000066400000000000000000000010321474765622100334370ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/numbers/units/multiple/multiplication_cancels_compatible.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("multiplication_cancels_compatible") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:meta\";\ \n$number: 1px * 1rad / 1ms / 1Hz;\ \na {\ \n b: meta.inspect($number * 1s);\ \n}\n"), "a {\ \n b: calc(1000px * 1rad / 1Hz);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/numbers/units/multiple/multiplication_cancels_denominator.rs000066400000000000000000000010321474765622100336370ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/numbers/units/multiple/multiplication_cancels_denominator.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("multiplication_cancels_denominator") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:meta\";\ \n$number: 1px * 1rad / 1ms / 1Hz;\ \na {\ \n b: meta.inspect($number * 1ms);\ \n}\n"), "a {\ \n b: calc(1px * 1rad / 1Hz);\ \n}\n" ); } multiplication_cancels_denominator_twice.rs000066400000000000000000000010501474765622100347530ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/values/numbers/units/multiple//! Tests auto-converted from "sass-spec/spec/values/numbers/units/multiple/multiplication_cancels_denominator_twice.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("multiplication_cancels_denominator_twice") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:meta\";\ \n$number: 1px * 1rad / 1ms / 1Hz;\ \na {\ \n b: meta.inspect($number * (1ms * 1Hz));\ \n}\n"), "a {\ \n b: calc(1px * 1rad);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/numbers/units/multiple/multiplication_cancels_numerator.rs000066400000000000000000000010341474765622100333360ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/numbers/units/multiple/multiplication_cancels_numerator.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("multiplication_cancels_numerator") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:meta\";\ \n$number: 1px * 1rad / 1ms / 1Hz;\ \na {\ \n b: meta.inspect($number * (1 / 1px));\ \n}\n"), "a {\ \n b: calc(1rad / 1ms / 1Hz);\ \n}\n" ); } multiplication_cancels_numerator_twice.rs000066400000000000000000000010541474765622100344540ustar00rootroot00000000000000rsass-0.29.0/rsass/tests/spec/values/numbers/units/multiple//! Tests auto-converted from "sass-spec/spec/values/numbers/units/multiple/multiplication_cancels_numerator_twice.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("multiplication_cancels_numerator_twice") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:meta\";\ \n$number: 1px * 1rad / 1ms / 1Hz;\ \na {\ \n b: meta.inspect($number * (1 / 1px / 1rad));\ \n}\n"), "a {\ \n b: calc(1 / 1ms / 1Hz);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/numbers/units/multiple/multiplication_cancels_unknown.rs000066400000000000000000000011421474765622100330210ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/numbers/units/multiple/multiplication_cancels_unknown.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("multiplication_cancels_unknown") } #[test] fn test() { assert_eq!( runner().ok("@use \"sass:meta\";\ \n// Units cancel even if they\'re totally unknown to Sass.\ \n$number: 1foo * 1bar / 1baz / 1qux;\ \na {\ \n b: meta.inspect($number * 1baz);\ \n}\n"), "a {\ \n b: calc(1foo * 1bar / 1qux);\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/numbers/very_large.rs000066400000000000000000000011461474765622100236630ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/numbers/very_large.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("very_large") } #[test] fn negative() { assert_eq!( runner().ok("@use \'sass:math\';\ \na {b: -(math.pow(10.0, 30))}\n"), "a {\ \n b: -1000000000000000000000000000000;\ \n}\n" ); } #[test] fn positive() { assert_eq!( runner().ok("@use \'sass:math\';\ \na {b: math.pow(10.0, 30)}\n"), "a {\ \n b: 1000000000000000000000000000000;\ \n}\n" ); } rsass-0.29.0/rsass/tests/spec/values/strings.rs000066400000000000000000000037161474765622100215470ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/values/strings.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("strings") } mod new_line { #[allow(unused)] use super::runner; mod sass { #[allow(unused)] use super::runner; } mod scss { #[allow(unused)] use super::runner; #[test] fn cr() { assert_eq!( runner().err( "@mixin a($b) { b: $b }\ \na {\ \n b: \'line1\ \n line2\';\ \n}\n" ), "Error: Expected \'.\ \n ,\ \n3 | b: \'line1\ \n | ^\ \n \'\ \n input.scss 3:12 root stylesheet", ); } #[test] fn escaped() { assert_eq!( runner().ok("a {\ \n b: \'line1 \\\ \n line2\';\ \n}\n"), "a {\ \n b: \"line1 line2\";\ \n}\n" ); } #[test] fn ff() { assert_eq!( runner().err( "@mixin a($b) { b: $b }\ \na {\ \n b: \'line1\u{c}line2\';\n\n" ), "Error: Expected \'.\ \n ,\ \n3 | b: \'line1\u{c}line2\';\ \n | ^\ \n \'\ \n input.scss 3:12 root stylesheet", ); } #[test] fn raw() { assert_eq!( runner().err( "@mixin a($b) { b: $b }\ \na {\ \n b: \'line1\ \n line2\';\ \n}\n" ), "Error: Expected \'.\ \n ,\ \n3 | b: \'line1\ \n | ^\ \n \'\ \n input.scss 3:12 root stylesheet", ); } } } rsass-0.29.0/rsass/tests/spec/variables.rs000066400000000000000000000045231474765622100205240ustar00rootroot00000000000000//! Tests auto-converted from "sass-spec/spec/variables.hrx" #[allow(unused)] fn runner() -> crate::TestRunner { super::runner().with_cwd("variables") } mod comment { #[allow(unused)] use super::runner; mod after_colon { #[allow(unused)] use super::runner; #[test] fn loud() { assert_eq!(runner().ok("$a: /**/ b\n"), ""); } #[test] fn silent() { assert_eq!( runner().ok("$a: //\ \n b\n"), "" ); } } mod after_value { #[allow(unused)] use super::runner; #[test] fn loud() { assert_eq!(runner().ok("$a: b /**/\n"), ""); } #[test] fn silent() { assert_eq!(runner().ok("$a: b //\n"), ""); } } mod before_colon { #[allow(unused)] use super::runner; #[test] #[ignore] // unexepected error fn loud() { assert_eq!(runner().ok("$a /**/: b\n"), ""); } #[test] fn silent() { assert_eq!( runner().ok("$a //\ \n : b\n"), "" ); } } } mod double_flag { #[allow(unused)] use super::runner; #[test] fn default() { assert_eq!( runner().ok("$a: b !default !default;\n\ \nc {d: $a}\n"), "c {\ \n d: b;\ \n}\n" ); } #[test] fn global() { assert_eq!( runner().ok("$a: b;\ \nc {\ \n $a: d !global !global;\ \n e: $a\ \n}\n"), "c {\ \n e: d;\ \n}\n" ); } } mod semi_global { #[allow(unused)] use super::runner; mod in_local { #[allow(unused)] use super::runner; #[test] fn double_nested() { assert_eq!( runner().ok("// Regression test for sass/dart-sass#1250\ \n$a: global;\ \nb {\ \n @if true {\ \n @if true {\ \n $a: local;\ \n }\ \n }\ \n}\n\ \nc {d: $a}\n"), "c {\ \n d: global;\ \n}\n" ); } } } rsass-0.29.0/rustfmt.toml000066400000000000000000000000461474765622100153540ustar00rootroot00000000000000max_width = 78 newline_style = "Unix" rsass-0.29.0/spectest/000077500000000000000000000000001474765622100146055ustar00rootroot00000000000000rsass-0.29.0/spectest/Cargo.toml000066400000000000000000000005261474765622100165400ustar00rootroot00000000000000[package] name = "spectest" version = "0.29.0" authors = ["Rasmus Kaj "] description = "Converts sass-spec to rust tests." edition = "2021" rust-version = "1.65.0" [dependencies] rsass = { path = "../rsass", version = "0.29.0" } deunicode = "1.0" hrx-get = "0.2.0" lazy-regex = "3.0.0" lazy_static = "1.0" yaml-rust = "0.4" rsass-0.29.0/spectest/README.md000066400000000000000000000002471474765622100160670ustar00rootroot00000000000000# rsass spectest This is a utility for updating tests in `rsass` from the `sass-spec` repository. Normally called from the `check_spec` script in the rsass monorepo. rsass-0.29.0/spectest/src/000077500000000000000000000000001474765622100153745ustar00rootroot00000000000000rsass-0.29.0/spectest/src/main.rs000066400000000000000000000436431474765622100167000ustar00rootroot00000000000000use deunicode::deunicode; use hrx_get::Archive; use lazy_regex::regex_is_match; use std::env::set_current_dir; use std::ffi::OsStr; use std::fs::{create_dir, read_to_string, DirEntry, File}; use std::io::{self, Write}; use std::path::{Path, PathBuf}; use std::process::Command; mod options; use options::Options; mod testfixture; use testfixture::TestFixture; mod testrunner; use testrunner::{runner, TestRunner}; mod writestr; fn main() -> Result<(), Error> { let base = PathBuf::from("..").join("sass-spec"); set_current_dir("rsass")?; handle_suite( &base, "spec", &[ "directives/extend", // `@extend` is not supported at all "libsass-todo-issues/issue_221260.hrx", // stack overflow "libsass-todo-issues/issue_221262.hrx", // stack overflow "libsass-todo-issues/issue_221264.hrx", // stack overflow "libsass-todo-issues/issue_221292.hrx", // stack overflow "libsass/unicode-bom/utf-16-big", // rsass only handles utf8 "libsass/unicode-bom/utf-16-little", // rsass only handles utf8 "non_conformant/scss/huge.hrx", // stack overflow in debug mode "non_conformant/scss/multiline-var.hrx", // duplicate rust name ], )?; Ok(()) } fn handle_suite( base: &Path, suite: &str, ignored: &[&str], ) -> Result<(), Error> { eprintln!("Handle suite {:?}", suite); let suitedir = base.join(suite); let rssuitedir = PathBuf::from("tests").join(fn_name(suite)); let _may_exist = create_dir(&rssuitedir); let mut rs = create(&rssuitedir.join("main.rs"))?; writeln!( rs, "//! Tests auto-converted from {:?}\ \n//! version {}\ \n//! See for source material.\\n", suitedir.strip_prefix("..")?, String::from_utf8( Command::new("git") .args(["log", "-1", "--format=%h, %ai."]) .current_dir(base) .output()? .stdout )?.trim(), )?; if !ignored.is_empty() { writeln!( rs, "//! The following tests are excluded from conversion:\ \n//! {:?}", ignored, )?; } rs.write_all( b"mod testrunner;\nuse testrunner::{runner, TestRunner};\n\n", )?; { let mut tr = create(&rssuitedir.join("testrunner.rs"))?; tr.write_all(include_bytes!("testrunner.rs"))?; } handle_entries(&mut rs, base, &suitedir, &rssuitedir, None, ignored) .map_err(|e| Error(format!("Failed to handle suite {suite:?}: {e}"))) } fn handle_entries( rs: &mut dyn Write, root: &Path, suitedir: &Path, rssuitedir: &Path, precision: Option, ignored: &[&str], ) -> Result<(), Error> { let mut entries: Vec = suitedir.read_dir()?.collect::>()?; entries.sort_by_key(|e| e.file_name()); for entry in entries { if ignored.iter().any(|&i| entry.file_name() == i) { ignore(rs, &entry.file_name(), "not expected to work yet")?; } else if entry.file_type()?.is_file() && entry.file_name().to_string_lossy().ends_with(".hrx") { let name = fn_name_os(&entry.file_name()); writeln!(rs, "\nmod {};", name)?; let mut rs = create(&rssuitedir.join(format!("{name}.rs")))?; writeln!( rs, "//! Tests auto-converted from {:?}\n", suitedir.strip_prefix("..")?.join(entry.file_name()), )?; spec_hrx_to_test(&mut rs, &entry.path(), precision).map_err( |e| { Error(format!( "Failed to handle {:?}: {}", entry.path(), e )) }, )?; } else if entry.file_type()?.is_dir() { if entry.path().join("error").is_file() { ignore( rs, &entry.file_name(), "tests with expected error not implemented yet", )?; } else { eprintln!( "Should handle {}", entry.path().strip_prefix(root)?.display() ); let input = entry.path().join("input.scss"); if input.exists() { spec_dir_to_test( rs, suitedir, &entry.file_name(), precision, ) .map_err(|e| { Error(format!( "Failed to handle {:?}: {}", entry.file_name(), e, )) })?; } else { let options = load_options(&entry.path())?; if let Some(ref reason) = options.should_skip { ignore(rs, &entry.file_name(), reason)?; } else { let name = fn_name_os(&entry.file_name()); writeln!(rs, "\nmod {};", name)?; let rssuitedir = rssuitedir.join(name); let _may_exist = create_dir(&rssuitedir); let mut rs = create(&rssuitedir.join("mod.rs"))?; writeln!( rs, "//! Tests auto-converted from {:?}\n", suitedir .strip_prefix("..")? .join(entry.file_name()), )?; writeln!( rs, "#[allow(unused)]\ \nfn runner() -> crate::TestRunner {{\ \n super::runner()", )?; writeln!( rs, " .with_cwd({:?})", entry.file_name() )?; if let Some(p) = options.precision { writeln!(rs, " .set_precision({})\n", p)?; } writeln!(rs, "\n}}\n")?; let precision = options.precision.or(precision); let tt = format!( "{}/", entry.file_name().to_string_lossy(), ); let ignored: Vec<&str> = ignored .iter() .filter_map(|p| p.strip_prefix(&tt)) .collect(); handle_entries( &mut rs, root, &entry.path(), &rssuitedir, precision, &ignored, )?; } } } } } Ok(()) } fn ignore( rs: &mut dyn Write, name: &T, reason: &str, ) -> Result<(), io::Error> { eprintln!("Ignoring {:?}, {}.", name, reason); writeln!(rs, "\n// Ignoring {:?}, {}.", name, reason) } fn spec_dir_to_test( rs: &mut dyn Write, suite: &Path, test: &OsStr, precision: Option, ) -> Result<(), Error> { let specdir = suite.join(test); let fixture = load_test_fixture_dir(&specdir, precision)?; writeln!(rs, "\n// From {:?}", specdir.strip_prefix("..")?)?; let runner = if let Some(stem) = suite.file_stem() { runner().with_cwd(stem.to_str().unwrap()) } else { runner() }; fixture.write_test(rs, runner) } fn spec_hrx_to_test( rs: &mut dyn Write, suite: &Path, precision: Option, ) -> Result<(), Error> { let archive = Archive::load(suite) .map_err(|e| Error(format!("Failed to load hrx: {e}")))?; eprintln!("Handle {}", suite.display()); rs.write_all( b"#[allow(unused)]\ \nfn runner() -> crate::TestRunner {\ \n super::runner()\n", )?; let mut runner = if let Some(stem) = suite.file_stem() { writeln!(rs, " .with_cwd({:?})", stem)?; let base = suite .strip_prefix("../sass-spec/spec")? .parent() .unwrap() .join(stem); runner().with_cwd(base.to_str().unwrap()) } else { runner() }; for (name, content) in archive.entries() { if ![ "README.md", "input.scss", "input.sass", "output.css", "output-libsass.css", "output-dart-sass.css", "error", "error-libsass", "error-dart-sass", "warning", "warning-libsass", "warning-dart-sass", "options.yml", ] .iter() .any(|n| name.ends_with(n)) { writeln!(rs, " .mock_file({:?}, {:#?})", name, content)?; runner = runner.mock_file(name, content); } } for (name, content) in archive.entries() { if let Some(base) = name.strip_suffix("input.scss") { if references_input(content) || archive.entries().any(|(path, content)| { path.starts_with(base) && references_input(content) }) { writeln!( rs, " .mock_file({:?}, {:#?})", name, content )?; runner = runner.mock_file(name, content); } } } if let Some(p) = precision { writeln!(rs, " .set_precision({})", p)?; } rs.write_all(b"}\n\n")?; handle_hrx_part(rs, suite, &archive, "", precision, runner) } fn references_input(content: &str) -> bool { regex_is_match!("['\"]input['\"]", content) } fn handle_hrx_part( rs: &mut dyn Write, suite: &Path, archive: &Archive, prefix: &str, precision: Option, runner: TestRunner, ) -> Result<(), Error> { use std::collections::BTreeSet; let tests = archive .names() .iter() .flat_map(|s| { s.strip_prefix(prefix) .and_then(|s| s.find('/').map(|p| &s[..p + 1])) }) .collect::>(); let name = if prefix.is_empty() { None } else { let t = prefix.trim_end_matches('/'); let t = if let Some(p) = t.rfind('/') { &t[p + 1..] } else { t }; Some(t) }; let mut options = archive .get(&format!("{prefix}options.yml")) .map(Options::parse) .transpose()? .unwrap_or_default(); options.precision = options.precision.or(precision); if archive.get(&format!("{prefix}input.scss")).is_some() { let fixture = load_test_fixture_hrx( name.map(str::to_owned), archive, prefix, options, )?; fixture.write_test(rs, runner) } else if let Some(ref reason) = options.should_skip { ignore(rs, &suite.file_name(), reason).map_err(|e| e.into()) } else { if !tests.is_empty() { if let Some(ref name) = name { writeln!(rs, "mod {} {{", fn_name(name))?; if options.precision.is_some() || runner.has_files() { write!( rs, " #[allow(unused)]\ \n fn runner() -> crate::TestRunner {{\ \n super::runner().with_cwd({:?})", name )?; if let Some(p) = options.precision { write!(rs, ".set_precision({})", p)?; } writeln!(rs, "\n}}\n")?; } else { rs.write_all( b"#[allow(unused)]\nuse super::runner;\n\n", )?; } } for name in tests { handle_hrx_part( rs, suite, archive, &format!("{prefix}{name}"), options.precision, runner.clone().with_cwd(name), )?; } if name.is_some() { writeln!(rs, "}}")?; } } Ok(()) } } fn fn_name_os(name: &OsStr) -> String { fn_name(&name.to_string_lossy()) } fn fn_name(name: &str) -> String { use lazy_static::lazy_static; lazy_static! { static ref RUST_WORDS: WordSet<20> = WordSet::new([ "as", "else", "false", "final", "for", "if", "in", "loop", "macro", "match", "mod", "override", "return", "static", "super", "true", "type", "use", "where", "while", ]); }; let t = deunicode(name) .to_lowercase() .replace(".hrx", "") .replace(['/', '-', '.'], "_"); if t.chars().next().unwrap_or('0').is_numeric() { format!("t{t}") } else if RUST_WORDS.contains(&t) { format!("test_{t}") } else { t } } struct WordSet { words: [&'static str; N], } impl WordSet { fn new(words: [&'static str; N]) -> Self { assert!(is_sorted(&words)); Self { words } } fn contains(&self, word: &str) -> bool { self.words.binary_search(&word).is_ok() } } fn is_sorted(data: &[&str]) -> bool { data.windows(2).all(|w| w[0] < w[1]) } fn load_test_fixture_dir( specdir: &Path, precision: Option, ) -> Result { static INPUT_FILENAME: &str = "input.scss"; static EXPECTED_OUTPUT_FILENAMES: &[&str] = &["output-dart-sass.css", "output.css"]; static EXPECTED_ERROR_FILENAMES: &[&str] = &["error-dart-sass", "error"]; let name = specdir.file_name().map(|s| s.to_string_lossy().to_string()); let mut options = load_options(specdir)?; options.precision = options.precision.or(precision); let input = content(&specdir.join(INPUT_FILENAME))?; for filename in EXPECTED_ERROR_FILENAMES { let path = specdir.join(filename); if path.exists() { return Ok(TestFixture::new_err( name, input, &content(&path)?, options, )); } } for filename in EXPECTED_OUTPUT_FILENAMES { let path = specdir.join(filename); if path.exists() { return Ok(TestFixture::new_ok( name, input, &content(&path)?, options, )); } } Err(Error(format!( "No expected CSS / error found for {}", specdir.file_name().unwrap_or_default().to_str().unwrap() ))) } fn load_test_fixture_hrx( name: Option, archive: &Archive, prefix: &str, options: Options, ) -> Result { static INPUT_FILENAME: &str = "input.scss"; static EXPECTED_OUTPUT_FILENAMES: &[&str] = &["output-dart-sass.css", "output.css"]; if let Some(input) = archive.get(&format!("{prefix}{INPUT_FILENAME}")) { if let Some(error) = archive.get(&format!("{prefix}error-dart-sass")) { return Ok(TestFixture::new_err( name, input.to_string(), error, options, )); } for filename in EXPECTED_OUTPUT_FILENAMES { if let Some(output) = archive.get(&format!("{prefix}{filename}")) { return Ok(TestFixture::new_ok( name, input.to_string(), output, options, )); } } if let Some(error) = archive.get(&format!("{prefix}error")) { return Ok(TestFixture::new_err( name, input.to_string(), error, options, )); } return Err(Error(format!( "No expected CSS / error found for {prefix:?}" ))); } Err(Error(format!("No input found for {prefix:?}"))) } /// Load options from options.yml. fn load_options(path: &Path) -> Result { let yml = path.join("options.yml"); if yml.exists() { Options::parse(&content(&yml)?) } else { Ok(Options { precision: None, should_skip: None, }) } } fn create(path: &Path) -> Result { File::create(path).map_err(|err| Error(format!("{path:?}: {err}"))) } fn content(path: &Path) -> Result { read_to_string(path).map_err(|err| Error(format!("{path:?}: {err}"))) } #[derive(Debug)] pub struct Error(String); impl From for Error { fn from(e: io::Error) -> Self { Error(format!("io error: {e}")) } } impl From for Error { fn from(e: std::string::FromUtf8Error) -> Self { Error(format!("utf8 error: {e}")) } } impl From for Error { fn from(e: yaml_rust::ScanError) -> Self { Error(format!("utf8 error: {e}")) } } impl From for Error { fn from(e: std::num::ParseFloatError) -> Self { Error(format!("utf8 error: {e}")) } } impl From for Error { fn from(e: std::path::StripPrefixError) -> Self { Error(e.to_string()) } } impl From for Error { fn from(e: std::num::TryFromIntError) -> Self { Error(e.to_string()) } } use std::fmt; impl fmt::Display for Error { fn fmt(&self, out: &mut fmt::Formatter) -> fmt::Result { self.0.fmt(out) } } rsass-0.29.0/spectest/src/options.rs000066400000000000000000000021031474765622100174310ustar00rootroot00000000000000use super::Error; use yaml_rust::YamlLoader; #[derive(Default)] pub struct Options { pub precision: Option, /// None for tests that should work, or Some(reason to skip). pub should_skip: Option, } impl Options { pub fn parse(options: &str) -> Result { match &YamlLoader::load_from_str(options)?[..] { [] => Err(Error(format!("Found zero-doc options {:?}", options))), [options] => { //eprintln!("Found options: {:?}", options); Ok(Options { precision: options[":precision"] .as_i64() .map(TryInto::try_into) .transpose()?, // Target version no longer used by sass-spec, // and no other reasons to skip implemented here. should_skip: None, }) } multiple => Err(Error(format!( "Found multiple-doc options {:?}", multiple ))), } } } rsass-0.29.0/spectest/src/testfixture.rs000066400000000000000000000112241474765622100203300ustar00rootroot00000000000000use super::options::Options; use super::writestr::WriteStr; use super::{fn_name, ignore, Error, TestRunner}; use lazy_regex::regex_replace_all; use std::io::Write; pub struct TestFixture { name: Option, input: String, expectation: TestExpectation, options: Options, } enum TestExpectation { ExpectedCSS(String), ExpectedError(String), } use TestExpectation::{ExpectedCSS, ExpectedError}; impl TestFixture { pub fn new_ok( name: Option, input: String, expected_css: &str, options: Options, ) -> Self { TestFixture { name, input, expectation: ExpectedCSS(normalize_output_css(expected_css)), options, } } pub fn new_err( name: Option, input: String, error: &str, options: Options, ) -> Self { TestFixture { name, input, expectation: ExpectedError(error.trim().replace("\r\n", "\n")), options, } } pub fn write_test( &self, rs: &mut dyn Write, runner: TestRunner, ) -> Result<(), Error> { if let Some(ref reason) = self.options.should_skip { ignore(rs, &self.name, reason)?; return Ok(()); } let has_files = runner.has_files(); rs.write_all(b"#[test]\n")?; if let Some(reason) = self.is_failure(runner) { writeln!(rs, "#[ignore] // {}", reason)?; } let fname = self.name.as_deref().map(fn_name); writeln!(rs, "fn {}() {{", fname.as_deref().unwrap_or("test"))?; let runner = if self.options.precision.is_some() || (has_files && self.name.is_some()) { rs.write_all(b" let runner = runner()")?; if let Some(p) = self.options.precision { write!(rs, ".set_precision({});", p)?; } if has_files { if let Some(name) = &self.name { write!(rs, ".with_cwd({:?})", name)?; } } rs.write_all(b";\n")?; "runner" } else { "runner()" }; match self.expectation { ExpectedError(ref err) => { writeln!( rs, " assert_eq!(\ \n {}.err(\ \n {}\ \n ),\ \n {},\ \n );", runner, WriteStr(&self.input, 13), WriteStr(err, 9), )?; } ExpectedCSS(ref expected) => { writeln!( rs, " assert_eq!(\ \n {}.ok(\ \n {}\ \n ),\ \n {}\ \n );", runner, WriteStr(&self.input, 13), WriteStr(expected, 9), )?; } } rs.write_all(b"}\n")?; Ok(()) } /// Execute the test here and now, return None for success or Some reason to fail. fn is_failure(&self, runner: TestRunner) -> Option<&'static str> { let runner = if let Some(precision) = self.options.precision { runner.set_precision(precision) } else { runner }; match (&self.expectation, runner.run(&self.input)) { (ExpectedError(_), Ok(_)) => Some("missing error"), (ExpectedError(ref expected), Err(ref actual)) => { // TODO: some flexibility in comparision? if expected == actual { None } else { Some("wrong error") } } (ExpectedCSS(ref expected), Ok(ref actual)) => { if expected == actual { None } else { Some("wrong result") } } (ExpectedCSS(_), Err(_)) => Some("unexepected error"), } } } fn normalize_output_css(css: &str) -> String { // Normalizes the whitespace in the given CSS to make it easier to compare. Based on: // https://github.com/sass/sass-spec/blob/0f59164aabb3273645fda068d0fb1b879aa3f1dc/lib/sass_spec/util.rb#L5-L7 // NOTE: This is done on input and expected output. // The actual result is normalized in a simler way in the rsass function in generated tests. regex_replace_all!("(?:\r?\n)+", css, |_| "\n").to_string() } rsass-0.29.0/spectest/src/testrunner.rs000066400000000000000000000077061474765622100201650ustar00rootroot00000000000000use rsass::input::{ Context, FsLoader, LoadError, Loader, SourceFile, SourceName, }; use rsass::output::Format; use rsass::Error; use std::collections::BTreeMap; use std::io::{Cursor, Read}; use std::sync::Arc; pub fn runner() -> TestRunner { TestRunner::new() } #[derive(Clone)] pub struct TestRunner { format: Format, loader: TestLoader, } #[derive(Clone, Debug)] struct TestLoader { parent: Arc, mock: BTreeMap, cwd: String, } impl TestLoader { fn new() -> Self { let mut parent = FsLoader::for_cwd(); parent.push_path("tests/spec".as_ref()); TestLoader { parent: Arc::new(parent), mock: BTreeMap::new(), cwd: String::new(), } } fn mock_file(&mut self, name: &str, content: &str) { self.mock.insert(url_join(&self.cwd, name), content.into()); } #[allow(unused)] // only used while building tests fn has_mock_files(&self) -> bool { !self.mock.is_empty() } fn with_cwd(&mut self, cwd: &str) { self.cwd = url_join(&self.cwd, cwd); } } fn url_join(p: &str, c: &str) -> String { let c = c.trim_start_matches("./").replace("/./", "/"); if p.is_empty() { c } else if c.is_empty() { p.to_string() } else if p.ends_with('/') { format!("{}{}", p, c) } else { format!("{}/{}", p, c) } } impl Loader for TestLoader { type File = Cursor>; fn find_file(&self, name: &str) -> Result, LoadError> { let mut cwd = self.cwd.trim_end_matches('/'); let mut lname = name; while let Some(name) = lname.strip_prefix("../") { cwd = cwd.rfind('/').map(|p| &self.cwd[..p]).unwrap_or(""); lname = name; } let tname = url_join(cwd, lname); if let Some(data) = self.mock.get(&tname) { return Ok(Some(Cursor::new(data.as_bytes().to_vec()))); } if let Some(data) = self.mock.get(lname) { return Ok(Some(Cursor::new(data.as_bytes().to_vec()))); } Ok(self.parent.find_file(name)?.map(|mut file| { let mut buf = Vec::new(); file.read_to_end(&mut buf).unwrap(); Cursor::new(buf) })) } } impl TestRunner { pub fn new() -> TestRunner { TestRunner { format: Default::default(), loader: TestLoader::new(), } } pub fn set_precision(mut self, precision: usize) -> Self { self.format = Format { precision, ..self.format }; self } pub fn mock_file(mut self, name: &str, content: &str) -> Self { self.loader.mock_file(name, content); self } #[allow(unused)] // only used while building tests pub fn has_files(&self) -> bool { self.loader.has_mock_files() } pub fn with_cwd(mut self, cwd: &str) -> Self { self.loader.with_cwd(cwd); self } #[allow(unused)] // only used while executing tests pub fn ok(&self, input: &str) -> String { match self.run(input) { Ok(css) => css, Err(err) => panic!("Unexpected error:\n{}\n", err), } } #[allow(unused)] // only used while executing tests pub fn err(&self, input: &str) -> String { match self.run(input) { Ok(css) => panic!("Unexpected result:\n{css}\n"), Err(err) => err, } } pub fn run(&self, input: &str) -> Result { self.rsass(input) .map(|css| String::from_utf8(css).unwrap().replace("\n\n", "\n")) .map_err(|err| format!("Error: {err}")) } fn rsass(&self, input: &str) -> Result, Error> { let name = SourceName::root("input.scss"); let file = SourceFile::read(&mut input.as_bytes(), name)?; Context::for_loader(self.loader.clone()) .with_format(self.format) .transform(file) } } rsass-0.29.0/spectest/src/writestr.rs000066400000000000000000000013551474765622100176310ustar00rootroot00000000000000use std::fmt::{self, Display, Write}; pub struct WriteStr<'a>(pub &'a str, pub u8); impl Display for WriteStr<'_> { fn fmt(&self, out: &mut fmt::Formatter) -> fmt::Result { out.write_char('"')?; let mut parts = self.0.split('\n'); if let Some(part) = parts.next() { write!(out, "{}", part.escape_debug())?; } for part in parts { if part.is_empty() { out.write_str("\\n")?; } else { write!( out, "\\\n{:1$}\\n{2}", "", self.1 as usize, part.escape_debug() )?; } } out.write_char('"') } }