系统命令
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
302 B

3 years ago
  1. package terminal
  2. import (
  3. "testing"
  4. )
  5. func Test_UseTerminal(t *testing.T) {
  6. name := "sudo"
  7. a, b, c, d, e := "-u", "www-data", "php", "/www/web/nextcloud/occ", "trashbin:cleanup"
  8. mRet := UseTerminal(name, a, b, c, d, e)
  9. //mRet := UseTerminal("sudo -u www-data php occ --help")
  10. t.Log(mRet)
  11. }