From 2cfe115dfb9fe1707ca7974e30b9ffaf8671d416 Mon Sep 17 00:00:00 2001 From: Yoshihiro Hokazono Date: Thu, 16 Sep 2021 06:41:17 +0900 Subject: [PATCH] Change test for remaining to test for * nargs --- test/test_actions.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_actions.cpp b/test/test_actions.cpp index 6d624af..1aff18f 100644 --- a/test/test_actions.cpp +++ b/test/test_actions.cpp @@ -121,12 +121,12 @@ TEST_CASE("Users can bind arguments to actions" * test_suite("actions")) { } } -TEST_CASE("Users can use actions on remaining arguments" * +TEST_CASE("Users can use actions on nargs=ANY arguments" * test_suite("actions")) { argparse::ArgumentParser program("sum"); int result = 0; - program.add_argument("all").remaining().action( + program.add_argument("all").nargs(argparse::NArgsPattern::ANY).action( [](int &sum, std::string const &value) { sum += std::stoi(value); }, std::ref(result));