test_tc_port.cpp 585 B

1234567891011121314151617181920212223242526272829303132333435
  1. #include "util/tc_port.h"
  2. #include "util/tc_common.h"
  3. #include <cmath>
  4. #include "gtest/gtest.h"
  5. #include <iostream>
  6. #include <vector>
  7. using namespace std;
  8. using namespace tars;
  9. class UtilPortTest : public testing::Test
  10. {
  11. public:
  12. //添加日志
  13. static void SetUpTestCase()
  14. {
  15. }
  16. static void TearDownTestCase()
  17. {
  18. }
  19. virtual void SetUp() //TEST跑之前会执行SetUp
  20. {
  21. }
  22. virtual void TearDown() //TEST跑完之后会执行TearDown
  23. {
  24. }
  25. };
  26. TEST_F(UtilPortTest, testExec)
  27. {
  28. string err;
  29. string result = TC_Port::exec("ls '*.txt'", err);
  30. cout << result << endl;
  31. }