Revision d0db3323fbd0f8a2783ed69ad1012c487629d98d authored by Eric Fischer on 02 November 2016, 19:49:31 UTC, committed by Eric Fischer on 02 November 2016, 21:25:04 UTC
1 parent faa5720
unit.cpp
#define CATCH_CONFIG_MAIN
#include "catch/catch.hpp"
#include "text.hpp"
TEST_CASE("UTF-8 enforcement", "[utf8]") {
REQUIRE(check_utf8("") == std::string(""));
REQUIRE(check_utf8("hello world") == std::string(""));
REQUIRE(check_utf8("Καλημέρα κόσμε") == std::string(""));
REQUIRE(check_utf8("こんにちは 世界") == std::string(""));
REQUIRE(check_utf8("👋🌏") == std::string(""));
REQUIRE(check_utf8("Hola m\xF3n") == std::string("\"Hola m\xF3n\" is not valid UTF-8 (0xF3 0x6E)"));
}
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...