Phan tich cach test CLI trong Go theo kieu table-driven: bien viec chay lenh thanh mot hop dong co the kiem tra
args →
exit code +
stdout/
stderr, bat output qua
bytes.Buffer, truyen stdin qua
strings.NewReader, them ho tro
stdin vao cac case, dung
t.Run va helper voi
t.Helper(), dong thoi thao luan khi nao nen kiem tra thong diep toan bo va khi nao nen kiem tra theo doan (
strings.Contains).