mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2024-11-24 18:45:02 +00:00
20 lines
484 B
C++
20 lines
484 B
C++
#ifdef WITH_MODULE
|
|
import argparse;
|
|
#else
|
|
#include <argparse/argparse.hpp>
|
|
#endif
|
|
#include <doctest.hpp>
|
|
|
|
#include <cmath>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
using doctest::test_suite;
|
|
|
|
TEST_CASE("Get Version String" * test_suite("stringstream")) {
|
|
std::stringstream os;
|
|
argparse::ArgumentParser program("test", "1.0",
|
|
argparse::default_arguments::all, false, os);
|
|
program.parse_args({"test", "--version"});
|
|
REQUIRE(os.str() == "1.0\n");
|
|
} |