fix: use db change output with printf
This commit is contained in:
parent
1cecb53f8b
commit
cbf279470d
|
@ -108,7 +108,7 @@ class TDTestCase(TBase):
|
||||||
self.taos(f'{mode} -s "select * from {db}.d0; >>d0.csv" ')
|
self.taos(f'{mode} -s "select * from {db}.d0; >>d0.csv" ')
|
||||||
|
|
||||||
# use db
|
# use db
|
||||||
rlist = self.taos(f'{mode} -s "show databases;use {db};use {db};use {db};quit;" ')
|
rlist = self.taos(f'{mode} -s "use {db};" ')
|
||||||
self.checkListString(rlist, "Database changed")
|
self.checkListString(rlist, "Database changed")
|
||||||
# update sql
|
# update sql
|
||||||
rlist = self.taos(f'{mode} -s "alter local \'resetlog\';" ')
|
rlist = self.taos(f'{mode} -s "alter local \'resetlog\';" ')
|
||||||
|
@ -201,7 +201,8 @@ class TDTestCase(TBase):
|
||||||
['-B -s "show dnodes;"', queryOK],
|
['-B -s "show dnodes;"', queryOK],
|
||||||
['-s "help;"', "Timestamp expression Format"],
|
['-s "help;"', "Timestamp expression Format"],
|
||||||
['-s ""', "Invalid commands"],
|
['-s ""', "Invalid commands"],
|
||||||
['-t', "2: service ok"]
|
['-t', "2: service ok"],
|
||||||
|
['-uroot -p < cmdline/data/pwd.txt -s "show dnodes;"', queryOK],
|
||||||
]
|
]
|
||||||
|
|
||||||
for arg in args:
|
for arg in args:
|
||||||
|
|
|
@ -178,6 +178,9 @@ class TDTestCase(TBase):
|
||||||
self.checkExcept(taosdump + " -A -o ")
|
self.checkExcept(taosdump + " -A -o ")
|
||||||
self.checkExcept(taosdump + " -A -o ./noexistpath/")
|
self.checkExcept(taosdump + " -A -o ./noexistpath/")
|
||||||
self.checkExcept(taosdump + f" -d invalidAVRO -o {tmpdir}")
|
self.checkExcept(taosdump + f" -d invalidAVRO -o {tmpdir}")
|
||||||
|
self.checkExcept(taosdump + f" -P invalidport")
|
||||||
|
self.checkExcept(taosdump + f" -D")
|
||||||
|
self.checkExcept(taosdump + f" -P 65536")
|
||||||
|
|
||||||
# run
|
# run
|
||||||
def run(self):
|
def run(self):
|
||||||
|
|
|
@ -254,8 +254,7 @@ void shellRunSingleCommandImp(char *command) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shellRegexMatch(command, "^\\s*use\\s+[a-zA-Z0-9_]+\\s*;\\s*$", REG_EXTENDED | REG_ICASE)) {
|
if (shellRegexMatch(command, "^\\s*use\\s+[a-zA-Z0-9_]+\\s*;\\s*$", REG_EXTENDED | REG_ICASE)) {
|
||||||
fprintf(stdout, "Database changed.\r\n\r\n");
|
printf("Database changed.\r\n\r\n");
|
||||||
fflush(stdout);
|
|
||||||
|
|
||||||
// call back auto tab module
|
// call back auto tab module
|
||||||
callbackAutoTab(command, pSql, true);
|
callbackAutoTab(command, pSql, true);
|
||||||
|
|
Loading…
Reference in New Issue