Merge pull request #24133 from taosdata/test/3.0/TD-27956

test: support for windows using 'taos -s'
This commit is contained in:
Alex Duan 2023-12-20 12:25:58 +08:00 committed by GitHub
commit 361ba76234
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 5 deletions

View File

@ -14,7 +14,7 @@ class TDTestCase:
tdSql.init(conn.cursor(), True)
def checksql(self, sql):
result = os.popen("taos -s '%s'" %sql)
result = os.popen(f"taos -s \"{sql}\" ")
res = result.read()
print(res)
if ("Query OK" in res):
@ -23,14 +23,12 @@ class TDTestCase:
tdLog.exit(f"checkEqual error")
def check(self):
conn = taos.connect()
sql = "select 'a;b' as x"
tdSql.query(f"%s" %sql)
tdSql.checkRows(1)
self.checksql('select "a;b" as x\G')
self.checksql('select "a;b" as x >> /tmp/res.txt')
return
self.checksql('select \\\"a;b\\\" as x\G')
self.checksql('select \\\"a;b\\\" as x >> temp.txt')
def run(self):
tdSql.prepare()