//! Tests auto-converted from "sass-spec/spec/directives/import/whitespace.hrx"

fn runner() -> crate::TestRunner {
    super::runner().with_cwd("whitespace")
}

mod after_comma {
    use super::runner;

    #[test]
    fn sass() {
        assert_eq!(
            runner().ok("@import \"a.css\",\
             \n  \"b.css\"\n"),
            "@import \"a.css\";\
         \n@import \"b.css\";\n"
        );
    }
    #[test]
    fn scss() {
        assert_eq!(
            runner().ok("@import \"a.css\",\
             \n  \"b.css\"\n"),
            "@import \"a.css\";\
         \n@import \"b.css\";\n"
        );
    }
}
mod before_comma {
    use super::runner;

    #[test]
    fn scss() {
        assert_eq!(
            runner().ok("@import \"a.css\"\
             \n  , \"b.css\"\n"),
            "@import \"a.css\";\
         \n@import \"b.css\";\n"
        );
    }
}
mod before_url {
    use super::runner;

    #[test]
    fn scss() {
        assert_eq!(
            runner().ok("@import\
             \n  \"a.css\"\n"),
            "@import \"a.css\";\n"
        );
    }
}
mod modifier {
    use super::runner;

    mod args {
        use super::runner;

        mod after_open_paren {
            use super::runner;

            #[test]
            #[ignore] // wrong result
            fn scss() {
                assert_eq!(
                    runner().ok("@import \"a.css\" b(\
             \n  c)\n"),
                    "@import \"a.css\" b(\
         \n  c);\n"
                );
            }
        }
        mod before {
            use super::runner;

            #[test]
            fn scss() {
                assert_eq!(
                    runner().ok("@import \"a.css\"\
             \n  b(c)\n"),
                    "@import \"a.css\" b(c);\n"
                );
            }
        }
        mod before_close_paren {
            use super::runner;

            #[test]
            #[ignore] // wrong result
            fn scss() {
                assert_eq!(
                    runner().ok("@import \"a.css\" b(c\
             \n  )\n"),
                    "@import \"a.css\" b(c\
         \n  );\n"
                );
            }
        }
    }
    mod no_args {
        use super::runner;

        mod before {
            use super::runner;

            #[test]
            fn sass() {
                assert_eq!(
                    runner().ok("@import \"a.css\"\
             \n  b\n"),
                    "@import \"a.css\" b;\n"
                );
            }
            #[test]
            fn scss() {
                assert_eq!(
                    runner().ok("@import \"a.css\"\
             \n  b\n"),
                    "@import \"a.css\" b;\n"
                );
            }
        }
    }
}
