test:测试添加光标是否自动换位。
This commit is contained in:
parent
cca1e149cd
commit
909c68cf6e
16
main.cpp
16
main.cpp
@ -1,12 +1,26 @@
|
||||
#include "filecomplete.h"
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
|
||||
static int cnt = 5;
|
||||
|
||||
// 测试光标位置
|
||||
void delay_auto_show()
|
||||
{
|
||||
while (--cnt) {
|
||||
std::this_thread::sleep_for(std::chrono::seconds(10));
|
||||
std::cout << "IMCOMMING..............." << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
std::cout << "PreContent1 " << std::endl;
|
||||
std::cout << "PreContent2 " << std::endl;
|
||||
fc_append('|');
|
||||
std::thread t(delay_auto_show);
|
||||
|
||||
while (1) {
|
||||
char* content = fc_readline();
|
||||
if (content) {
|
||||
@ -14,5 +28,7 @@ int main(int argc, char** argv)
|
||||
std::cout << "" << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
t.join();
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user