diff --git a/sqlx-macros-core/src/test_attr.rs b/sqlx-macros-core/src/test_attr.rs index ae1e1574..09af02c4 100644 --- a/sqlx-macros-core/src/test_attr.rs +++ b/sqlx-macros-core/src/test_attr.rs @@ -187,7 +187,10 @@ fn expand_advanced(args: AttributeArgs, input: syn::ItemFn) -> crate::Result syn::Result { - use syn::{punctuated::Punctuated, Expr, Lit, LitStr, Meta, MetaNameValue, Token}; + use syn::{ + parenthesized, parse::Parse, punctuated::Punctuated, token::Comma, Expr, Lit, LitStr, Meta, + MetaNameValue, Token, + }; let mut fixtures = Vec::new(); let mut migrations = MigrationsOpt::InferredPath; @@ -208,8 +211,9 @@ fn parse_args(attr_args: AttributeArgs) -> syn::Result { parse_fixtures_path_args(&mut fixtures_type, val)?; } else if meta.path.is_ident("scripts") { // fixtures(path = "", scripts("","")) checking `scripts` argument - let parser = >::parse_terminated; - let list = parser.parse2(list.tokens.clone())?; + let content; + parenthesized!(content in meta.input); + let list = content.parse_terminated(::parse, Comma)?; parse_fixtures_scripts_args(&mut fixtures_type, list, &mut fixtures_local)?; } else { return Err(syn::Error::new_spanned( diff --git a/tests/postgres/test-attr.rs b/tests/postgres/test-attr.rs index a8497882..cfdb0b74 100644 --- a/tests/postgres/test-attr.rs +++ b/tests/postgres/test-attr.rs @@ -178,3 +178,11 @@ async fn it_gets_comments(pool: PgPool) -> sqlx::Result<()> { Ok(()) } + +#[sqlx::test( + migrations = "tests/postgres/migrations", + fixtures(path = "../fixtures/postgres", scripts("users", "posts")) +)] +async fn this_should_compile(_pool: PgPool) -> sqlx::Result<()> { + Ok(()) +} diff --git a/tests/sqlite/test-attr.rs b/tests/sqlite/test-attr.rs index 8ad052ff..09957d76 100644 --- a/tests/sqlite/test-attr.rs +++ b/tests/sqlite/test-attr.rs @@ -97,3 +97,11 @@ async fn it_gets_comments(pool: SqlitePool) -> sqlx::Result<()> { Ok(()) } + +#[sqlx::test( + migrations = "tests/sqlite/migrations", + fixtures(path = "./fixtures", scripts("users", "posts")) +)] +async fn this_should_compile(_pool: SqlitePool) -> sqlx::Result<()> { + Ok(()) +}