diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index a7d5a95c..6d81f233 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -77,6 +77,10 @@ add_fmt_test(compile-test) add_fmt_test(printf-test) add_fmt_test(ranges-test) add_fmt_test(scan-test) +add_fmt_test(unicode-test HEADER_ONLY) +if (MSVC) + target_compile_options(unicode-test PRIVATE /utf-8) +endif () add_fmt_test(wchar-test) if (FMT_CAN_MODULE) diff --git a/test/unicode-test.cc b/test/unicode-test.cc new file mode 100644 index 00000000..bceadc61 --- /dev/null +++ b/test/unicode-test.cc @@ -0,0 +1,11 @@ +// Formatting library for C++ - Unicode tests +// +// Copyright (c) 2012 - present, Victor Zverovich +// All rights reserved. +// +// For the license information refer to format.h. + +#include "fmt/core.h" +#include "gtest/gtest.h" + +TEST(unicode_test, is_utf8) { EXPECT_TRUE(fmt::detail::is_utf8()); } \ No newline at end of file