add \0 string test

This commit is contained in:
2881099
2022-06-07 10:15:52 +08:00
parent 79ebc184ef
commit e9949b58ff
16 changed files with 1021 additions and 701 deletions

View File

@ -1,4 +1,4 @@
using FreeSql.DataAnnotations;
using FreeSql.DataAnnotations;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
@ -12,6 +12,26 @@ namespace FreeSql.Tests.Odbc.Default
public class OdbcCodeFirstTest
{
[Fact]
public void Test_0String()
{
var fsql = g.odbc;
fsql.Delete<test_0string01>().Where("1=1").ExecuteAffrows();
Assert.Equal(1, fsql.Insert(new test_0string01 { name = @"1.0000\0.0000\0.0000\0.0000\1.0000\0.0000" }).ExecuteAffrows());
Assert.Equal(1, fsql.Insert(new test_0string01 { name = @"1.0000\0.0000\0.0000\0.0000\1.0000\0.0000" }).NoneParameter().ExecuteAffrows());
var list = fsql.Select<test_0string01>().ToList();
Assert.Equal(2, list.Count);
Assert.Equal(@"1.0000\0.0000\0.0000\0.0000\1.0000\0.0000", list[0].name);
Assert.Equal(@"1.0000\0.0000\0.0000\0.0000\1.0000\0.0000", list[1].name);
}
class test_0string01
{
public Guid id { get; set; }
public string name { get; set; }
}
[Fact]
public void _字段()
{