#! /bin/bash lnav_test="${top_builddir}/src/lnav-test" run_test ${lnav_test} -n \ -I ${test_dir} \ ${test_dir}/logfile_json.json check_output "json log format is not working" < 1,p.0,2013-09-06 20:00:49.124,1000,info,0, 2,p.0,2013-09-06 22:00:49.124,7200000,info,0,steve@example.com 4,p.0,2013-09-06 22:00:59.124,10000,debug5,0, 5,p.0,2013-09-06 22:00:59.124,0,debug4,0, 6,p.0,2013-09-06 22:00:59.124,0,debug3,0, 7,p.0,2013-09-06 22:00:59.124,0,debug2,0, 8,p.0,2013-09-06 22:00:59.124,0,debug,0, 9,p.0,2013-09-06 22:01:49.124,50000,stats,0, 10,p.0,2013-09-06 22:01:49.124,0,warning,0, 11,p.0,2013-09-06 22:01:49.124,0,error,0, 12,p.0,2013-09-06 22:01:49.124,0,critical,0, 13,p.0,2013-09-06 22:01:49.124,0,fatal,0, EOF run_test ${lnav_test} -n \ -I ${test_dir} \ -c ":goto 2" \ -c ":pipe-line-to sed -e 's/2013//g'" \ -c ":switch-to-view text" \ ${test_dir}/logfile_json.json check_output "pipe-line-to is not working" < 2,p.0,2013-09-06 20:00:49.124,1000,info,0, 4,p.0,2013-09-06 22:00:49.124,7200000,info,0,steve@example.com 7,p.0,2013-09-06 22:00:59.124,10000,debug5,0, 9,p.0,2013-09-06 22:00:59.124,0,debug4,0, 11,p.0,2013-09-06 22:00:59.124,0,debug3,0, 13,p.0,2013-09-06 22:00:59.124,0,debug2,0, 15,p.0,2013-09-06 22:00:59.124,0,debug,0, 17,p.0,2013-09-06 22:01:49.124,50000,stats,0, 19,p.0,2013-09-06 22:01:49.124,0,warning,0, 21,p.0,2013-09-06 22:01:49.124,0,error,0, 23,p.0,2013-09-06 22:01:49.124,0,critical,0, 25,p.0,2013-09-06 22:01:49.124,0,fatal,0, EOF run_test ${lnav_test} -n \ -I ${test_dir} \ -c ":goto 4" \ -c ":pipe-line-to sed -e 's/2013//g'" \ -c ":switch-to-view text" \ ${test_dir}/logfile_nested_json.json check_output "pipe-line-to is not working" <