mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2025-12-07 01:06:54 +08:00
Test case for BOM in user-provided string.
This commit is contained in:
parent
df6bc8f9b5
commit
67dcd3e8d8
@ -370,6 +370,12 @@ TEST_CASE("Non-ASCII characters in the end of string")
|
|||||||
CHECK_THROWS_AS(chai.eval<std::string>("print \"Hello World\"\xef"), chaiscript::exception::eval_error);
|
CHECK_THROWS_AS(chai.eval<std::string>("print \"Hello World\"\xef"), chaiscript::exception::eval_error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_CASE("BOM in string")
|
||||||
|
{
|
||||||
|
chaiscript::ChaiScript_Basic chai(create_chaiscript_stdlib(),create_chaiscript_parser());
|
||||||
|
CHECK_THROWS_AS(chai.eval<std::string>("\xef\xbb\xbfprint \"Hello World\""), chaiscript::exception::eval_error);
|
||||||
|
}
|
||||||
|
|
||||||
int set_state_test_myfun()
|
int set_state_test_myfun()
|
||||||
{
|
{
|
||||||
return 2;
|
return 2;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user