diff --git a/Makefile b/Makefile index 66ffa44..5a93a0c 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ # ------------------------------------------------------------ # SPDX-License-Identifier: GPL-3.0-or-later # ------------------------------------------------------------- -# File : Makefile -# Authors : Aoran Zeng -# Created on : <2023-08-28> -# Last modified : <2024-06-05> +# Build File : Makefile +# File Authors : Aoran Zeng +# Created On : <2023-08-28> +# Last Modified : <2024-09-04> # --------------------------------------------------------------- CFLAGS = -Iinclude # -Wall @@ -35,6 +35,9 @@ CI: all test: $(Target) @perl ./test/cli.pl +fastcheck: $(Target) + @perl ./test/cli.pl fastcheck + test-xy: @$(CC) test/xy.c $(CFLAGS) -o xy @./xy diff --git a/test/cli.pl b/test/cli.pl index 74ab582..b435008 100644 --- a/test/cli.pl +++ b/test/cli.pl @@ -41,6 +41,13 @@ like `./chsrc get -no-color 2>&1`, $get_null, 'chsrc get -no-color'; my $fake_target_name = qr/暂不支持的换源目标/; like `./chsrc get fake_target_name 2>&1`, $fake_target_name, 'chsrc get fake_target_name'; + +if ($ARGV[0] eq 'fastcheck') { + say "Fast checking, done testing."; + done_testing; + exit 0; +} + my $has_ruby = system 'ruby1 -v'; if ($has_ruby == 0) { say "Ruby exists. Go on testing.";