Skip to content

Commit 1b54aeb

Browse files
committed
Added a tests for variables and functions with names containing Unicode characters
1 parent 694d2eb commit 1b54aeb

2 files changed

Lines changed: 48 additions & 1 deletion

File tree

‎build/common.props‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<Copyright>Copyright © 2012-2018 Andrey Taritsyn</Copyright>
44
</PropertyGroup>
55

6-
<PropertyGroup Condition=" '$(TargetFramework)' == 'net40-client' Or '$(TargetFramework)' == 'net45' Or '$(TargetFramework)' == 'net451' ">
6+
<PropertyGroup Condition=" '$(TargetFramework)' == 'net40-client' Or '$(TargetFramework)' == 'net45' Or '$(TargetFramework)' == 'net451' Or '$(TargetFramework)' == 'net46' ">
77
<DefineConstants>$(DefineConstants);NETFULL</DefineConstants>
88
</PropertyGroup>
99

‎test/MsieJavaScriptEngine.Test.Common/CommonTestsBase.cs‎

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,29 @@ public virtual void CallingOfFunctionWithManyParametersAndUnicodeStringResultIsC
638638
Assert.AreEqual("Привет, Петя!", output);
639639
}
640640

641+
[Test]
642+
public virtual void CallingOfFunctionWithNameContainingUnicodeCharactersIsCorrect()
643+
{
644+
// Arrange
645+
const string functionCode = @"function сумма(число1, число2) {
646+
var результат = число1 + число2;
647+
648+
return результат;
649+
}";
650+
651+
// Act
652+
int output;
653+
654+
using (var jsEngine = CreateJsEngine())
655+
{
656+
jsEngine.Execute(functionCode);
657