github.com/fzfile/BaiduPCS-Go@v0.0.0-20200606205115-4408961cf336/pcsliner/args/args_test.go (about) 1 package args_test 2 3 import ( 4 "fmt" 5 "github.com/fzfile/BaiduPCS-Go/pcsliner/args" 6 "testing" 7 ) 8 9 func TestParseArgs(t *testing.T) { 10 as := args.Parse(` one two three "double quotes" 'single quotes' "" arg\ with\ spaces "\"quotes\" in 'quotes'" '"quotes" in \'quotes'" " `) 11 for k := range as { 12 fmt.Printf("%d: %s|\n", k, as[k]) 13 } 14 15 as = args.Parse(` cd 英语_800个有趣句子帮你记忆7000个单词_42页.doc`) 16 for k := range as { 17 fmt.Printf("%d: %s|\n", k, as[k]) 18 } 19 }