From c407ddc200c9db528f264a28760acd0af4ca0dc3 Mon Sep 17 00:00:00 2001 From: Amit Upadhyay Date: Sat, 11 Nov 2023 12:34:36 +0530 Subject: [PATCH] fixed tests --- fastn-core/tests/02-hello/cmd.p1 | 2 +- fastn-core/tests/03-nested-document/cmd.p1 | 2 +- fastn-core/tests/04-import-code-block/cmd.p1 | 2 +- fastn-core/tests/05-hello-font/cmd.p1 | 2 +- fastn-core/tests/08-static-assets/cmd.p1 | 2 +- fastn-core/tests/09-markdown-pages/cmd.p1 | 2 +- fastn-core/tests/10-readme-index/cmd.p1 | 2 +- fastn-core/tests/11-readme-with-index/cmd.p1 | 2 +- fastn-core/tests/15-fpm-dependency-alias/cmd.p1 | 2 +- fastn-core/tests/16-include-processor/cmd.p1 | 2 +- fastn/src/main.rs | 3 +-- 11 files changed, 11 insertions(+), 12 deletions(-) diff --git a/fastn-core/tests/02-hello/cmd.p1 b/fastn-core/tests/02-hello/cmd.p1 index d6a8ce1cd2..2bb8ae6250 100644 --- a/fastn-core/tests/02-hello/cmd.p1 +++ b/fastn-core/tests/02-hello/cmd.p1 @@ -1,5 +1,5 @@ -- fbt: -cmd: cd amitu && $FBT_CWD/../target/debug/fastn --test build --test --ignore-failed +cmd: cd amitu && $FBT_CWD/../target/debug/fastn --test build --edition 2022 --ignore-failed output: amitu/.build -- stdout: diff --git a/fastn-core/tests/03-nested-document/cmd.p1 b/fastn-core/tests/03-nested-document/cmd.p1 index d067b4ceba..5e41e4f2fe 100644 --- a/fastn-core/tests/03-nested-document/cmd.p1 +++ b/fastn-core/tests/03-nested-document/cmd.p1 @@ -1,5 +1,5 @@ -- fbt: -cmd: cd amitu && $FBT_CWD/../target/debug/fastn --test build --test +cmd: cd amitu && $FBT_CWD/../target/debug/fastn --test build --edition 2022 output: amitu/.build diff --git a/fastn-core/tests/04-import-code-block/cmd.p1 b/fastn-core/tests/04-import-code-block/cmd.p1 index 7a4fbf5b58..6d1b9ef1f2 100644 --- a/fastn-core/tests/04-import-code-block/cmd.p1 +++ b/fastn-core/tests/04-import-code-block/cmd.p1 @@ -1,5 +1,5 @@ -- fbt: -cmd: cd amitu && $FBT_CWD/../target/debug/fastn --test build --test +cmd: cd amitu && $FBT_CWD/../target/debug/fastn --test build --edition 2022 output: amitu/.build diff --git a/fastn-core/tests/05-hello-font/cmd.p1 b/fastn-core/tests/05-hello-font/cmd.p1 index a99401bebe..facc1d14bb 100644 --- a/fastn-core/tests/05-hello-font/cmd.p1 +++ b/fastn-core/tests/05-hello-font/cmd.p1 @@ -1,5 +1,5 @@ -- fbt: -cmd: cd amitu && $FBT_CWD/../target/debug/fastn --test build --test +cmd: cd amitu && $FBT_CWD/../target/debug/fastn --test build --edition 2022 output: amitu/.build -- stdout: diff --git a/fastn-core/tests/08-static-assets/cmd.p1 b/fastn-core/tests/08-static-assets/cmd.p1 index afb174e321..c43c2a5894 100644 --- a/fastn-core/tests/08-static-assets/cmd.p1 +++ b/fastn-core/tests/08-static-assets/cmd.p1 @@ -1,5 +1,5 @@ -- fbt: -cmd: cd amitu && $FBT_CWD/../target/debug/fastn --test build --test +cmd: cd amitu && $FBT_CWD/../target/debug/fastn --test build output: amitu/.build -- stdout: diff --git a/fastn-core/tests/09-markdown-pages/cmd.p1 b/fastn-core/tests/09-markdown-pages/cmd.p1 index edff3d8828..8e645676d3 100644 --- a/fastn-core/tests/09-markdown-pages/cmd.p1 +++ b/fastn-core/tests/09-markdown-pages/cmd.p1 @@ -1,5 +1,5 @@ -- fbt: -cmd: cd amitu && $FBT_CWD/../target/debug/fastn --test build --test +cmd: cd amitu && $FBT_CWD/../target/debug/fastn --test build output: amitu/.build -- stdout: diff --git a/fastn-core/tests/10-readme-index/cmd.p1 b/fastn-core/tests/10-readme-index/cmd.p1 index eff11272e3..914620bda8 100644 --- a/fastn-core/tests/10-readme-index/cmd.p1 +++ b/fastn-core/tests/10-readme-index/cmd.p1 @@ -1,5 +1,5 @@ -- fbt: -cmd: cd amitu && $FBT_CWD/../target/debug/fastn --test build --test +cmd: cd amitu && $FBT_CWD/../target/debug/fastn --test build output: amitu/.build skip: temporarily removed markdown support diff --git a/fastn-core/tests/11-readme-with-index/cmd.p1 b/fastn-core/tests/11-readme-with-index/cmd.p1 index f1f676bd26..9fc2a11257 100644 --- a/fastn-core/tests/11-readme-with-index/cmd.p1 +++ b/fastn-core/tests/11-readme-with-index/cmd.p1 @@ -1,5 +1,5 @@ -- fbt: -cmd: cd amitu && $FBT_CWD/../target/debug/fastn --test build --test +cmd: cd amitu && $FBT_CWD/../target/debug/fastn --test build --edition 2022 output: amitu/.build -- stdout: diff --git a/fastn-core/tests/15-fpm-dependency-alias/cmd.p1 b/fastn-core/tests/15-fpm-dependency-alias/cmd.p1 index 19cf935d2c..348d3723e6 100644 --- a/fastn-core/tests/15-fpm-dependency-alias/cmd.p1 +++ b/fastn-core/tests/15-fpm-dependency-alias/cmd.p1 @@ -1,5 +1,5 @@ -- fbt: -cmd: cd amitu && $FBT_CWD/../target/debug/fastn --test build --test +cmd: cd amitu && $FBT_CWD/../target/debug/fastn --test build --edition 2022 output: amitu/.build -- stdout: diff --git a/fastn-core/tests/16-include-processor/cmd.p1 b/fastn-core/tests/16-include-processor/cmd.p1 index 6958c9332f..e8af6c7a63 100644 --- a/fastn-core/tests/16-include-processor/cmd.p1 +++ b/fastn-core/tests/16-include-processor/cmd.p1 @@ -1,5 +1,5 @@ -- fbt: -cmd: $FBT_CWD/../target/debug/fastn --test build --test +cmd: $FBT_CWD/../target/debug/fastn --test build --edition 2022 output: .build -- stdout: diff --git a/fastn/src/main.rs b/fastn/src/main.rs index a4f982fedf..957d8ef31b 100644 --- a/fastn/src/main.rs +++ b/fastn/src/main.rs @@ -173,7 +173,7 @@ async fn fastn_core_commands(matches: &clap::ArgMatches) -> fastn_core::Result<( build.value_of_("file"), // TODO: handle more than one files build.value_of_("base").unwrap_or("/"), build.get_flag("ignore-failed"), - build.get_flag("test"), + matches.get_flag("test"), build.get_flag("check-build"), ) .await; @@ -337,7 +337,6 @@ fn app(version: &'static str) -> clap::Command { .arg(clap::arg!(-b --base [BASE] "The base path.").default_value("/")) .arg(clap::arg!(--"ignore-failed" "Ignore failed files.")) .arg(clap::arg!(--"check-build" "Checks .build for index files validation.")) - .arg(clap::arg!(--"test" "Use for test")) .arg(clap::arg!(--"external-js" "Script added in ftd files") .action(clap::ArgAction::Append)) .arg(clap::arg!(--"js" "Script text added in ftd files")