ncview: use pipe_output in the test (#4718)
ncview: use pipe_output in the test (#4718)

This avoids asserting the exit code is 0, which is not the case unless
the test is run from the macOS GUI.
andrewjpage/homebrew-science,philippbayer/homebrew-science,heuermh/homebrew-science,DabeDotCom/homebrew-science,dpo/homebrew-science,maplesond/homebrew-science,pditommaso/homebrew-science,quantumsteve/homebrew-science