- 修复 MySql 字符串反斜杠无效的 bug;

This commit is contained in:
28810
2020-04-12 19:00:29 +08:00
parent bd79fc803e
commit 613940df20
15 changed files with 87 additions and 22 deletions

View File

@ -178,7 +178,7 @@ namespace FreeSql.Tests.Odbc.SqlServer
testFieldSByteNullable = sbyte.MinValue,
testFieldShort = short.MaxValue,
testFieldShortNullable = short.MinValue,
testFieldString = "<22><><EFBFBD><EFBFBD><EFBFBD>й<EFBFBD><D0B9><EFBFBD>string",
testFieldString = "<22><><EFBFBD><EFBFBD><EFBFBD>й<EFBFBD><D0B9><EFBFBD>string'\\?!@#$%^&*()_+{}}{~?><<>",
testFieldTimeSpan = TimeSpan.FromSeconds(999),
testFieldTimeSpanNullable = TimeSpan.FromSeconds(30),
testFieldUInt = uint.MaxValue,
@ -197,7 +197,12 @@ namespace FreeSql.Tests.Odbc.SqlServer
var sqlTestUpdate = g.sqlserver.Update<TableAllType>().SetSource(item3NP).NoneParameter().ToSql();
var item3 = insert.AppendData(item2).ExecuteInserted();
var newitem2 = select.Where(a => a.Id == item2.Id).ToOne();
var newitem2 = select.Where(a => a.Id == item3[0].Id).ToOne();
Assert.Equal(item2.testFieldString, newitem2.testFieldString);
item3 = insert.NoneParameter().AppendData(item2).ExecuteInserted();
newitem2 = select.Where(a => a.Id == item3[0].Id).ToOne();
Assert.Equal(item2.testFieldString, newitem2.testFieldString);
var items = select.ToList();
}