From: Andrew Ruthven Date: Sun, 30 Dec 2018 10:54:36 +0000 (+1300) Subject: Update test files for new output X-Git-Tag: 1.0.0~36 X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=062100a680c62969e15a48e53993736f6067b92a;p=mythtv-status.git Update test files for new output --- diff --git a/t/01-test-help.t b/t/01-test-help.t index fb4c2f1..9fe9447 100644 --- a/t/01-test-help.t +++ b/t/01-test-help.t @@ -46,6 +46,11 @@ Options: --encoder-skip-idle Suppress displaying idle encoders in the Encoders block. + --encoder-warn-non-idle + Display warnings if an encoder is not idle. This is the default, it + allows you to know if an encoder or the MythTV system is busy. To + disable, use --no-encoder-warn-non-idle. + -e, --episode Display the episode (subtitle) for the scheduled recordings. @@ -57,6 +62,8 @@ Options: To turn the additional blocks on you can use --encoders, --recording-now and/or --next-recording. + By default highlight is turned on, to disable it use --nohighlight. + --email-only-on-alert Only send an email out (if --email is present) if there is an alert (i.e., schedule conflict or low disk space). @@ -79,6 +86,10 @@ Options: -h HOST, --host=HOST The host to check, defaults to localhost. + --highlight + Surround any items that are considered a warning with asterisks. + This helps to highlight an issue if colour mode is disabled. + --nostatus, --noencoders, --norecording-now, --noscheduled-recordings, --noschedule-conflicts, --nonext-recording, --nototal-disk-space, --nodisk-space, --noguide-data, --noauto-expire diff --git a/t/05-v0.20-clean.t b/t/05-v0.20-clean.t index 1fe77f1..5c001fe 100644 --- a/t/05-v0.20-clean.t +++ b/t/05-v0.20-clean.t @@ -12,52 +12,52 @@ my $out = `$Bin/../bin/mythtv-status --file $xml 2>&1`; #diag($out); like($out, qr/MythTV status for localhost/, 'Header is present'); -like($out, qr/^Status..........: Thu Nov 29 2007, 6:43 PM$/m, 'Status line is present'); -like($out, qr/^Total Disk Space: Total space is 100\.0 GB, with 72\.2 GB used \(72.2%\)$/m, 'Total disk space is present'); +like($out, qr/^Status as of\.*: Thu Nov 29 2007, 6:43 PM$/m, 'Status line is present'); +like($out, qr/^Total Disk Space: Total space is 100 GB, with 72\.2 GB used \(72%\)$/m, 'Total disk space is present'); unlike($out, qr/^Guide Data\.*:/m, 'Guide data warning is not present'); like($out, qr/^Encoders:\s+cerberus \(9\) - Recording$/m, 'Encoder is present, and recording'); -like($out, qr/^Recording Now:\s+3 News \(TV3\) Ends: 19:00:00$/m, 'Recording now is present (the news)'); +like($out, qr/^Recording Now:\s+3 News \(TV3\), Ends: 19:00:00$/m, 'Recording now is present (the news)'); # Test that the status isn't present if --nostatus is passed. $out = `$Bin/../bin/mythtv-status --file $xml --nostatus 2>&1`; like($out, qr/MythTV status for localhost/, 'Header is present'); -unlike($out, qr/^Status\.*:/m, 'Status line is not present'); -like($out, qr/^Total Disk Space: Total space is 100\.0 GB, with 72\.2 GB used \(72.2%\)$/m, 'Total disk space is present'); +unlike($out, qr/^Status as of\.*:/m, 'Status line is not present'); +like($out, qr/^Total Disk Space: Total space is 100 GB, with 72\.2 GB used \(72%\)$/m, 'Total disk space is present'); unlike($out, qr/^Guide Data\.*:/m, 'Guide data warning is not present'); like($out, qr/^Encoders:\s+cerberus \(9\) - Recording$/m, 'Encoder is present, and recording'); -like($out, qr/^Recording Now:\s+3 News \(TV3\) Ends: 19:00:00$/m, 'Recording now is present (the news)'); +like($out, qr/^Recording Now:\s+3 News \(TV3\), Ends: 19:00:00$/m, 'Recording now is present (the news)'); # Test that the disk space isn't present if --nototal-disk-space is passed. $out = `$Bin/../bin/mythtv-status --file $xml --nototal-disk-space 2>&1`; like($out, qr/MythTV status for localhost/, 'Header is present'); -like($out, qr/^Status\.*: Thu Nov 29 2007, 6:43 PM$/m, 'Status line is present'); -unlike($out, qr/^Total Disk Space: Total space is 100\.0 GB, with 72\.2 GB used \(72.2%\)$/m, 'Total disk space is not present'); +like($out, qr/^Status as of\.*: Thu Nov 29 2007, 6:43 PM$/m, 'Status line is present'); +unlike($out, qr/^Total Disk Space: Total space is 100 GB, with 72\.2 GB used \(72%\)$/m, 'Total disk space is not present'); unlike($out, qr/^Guide Data\.*:/m, 'Guide data warning is not present'); like($out, qr/^Encoders:\s+cerberus \(9\) - Recording$/m, 'Encoder is present, and recording'); -like($out, qr/^Recording Now:\s+3 News \(TV3\) Ends: 19:00:00$/m, 'Recording now is present (the news)'); +like($out, qr/^Recording Now:\s+3 News \(TV3\), Ends: 19:00:00$/m, 'Recording now is present (the news)'); # Test that the encoders details aren't present if --noencoders is passed. $out = `$Bin/../bin/mythtv-status --file $xml --noencoders 2>&1`; like($out, qr/MythTV status for localhost/, 'Header is present'); -like($out, qr/^Status\.*: Thu Nov 29 2007, 6:43 PM$/m, 'Status line is present'); -like($out, qr/^Total Disk Space: Total space is 100\.0 GB, with 72\.2 GB used \(72.2%\)$/m, 'Total disk space is present'); +like($out, qr/^Status as of\.*: Thu Nov 29 2007, 6:43 PM$/m, 'Status line is present'); +like($out, qr/^Total Disk Space: Total space is 100 GB, with 72\.2 GB used \(72%\)$/m, 'Total disk space is present'); unlike($out, qr/^Guide Data\.*:/m, 'Guide data warning is not present'); unlike($out, qr/^Encoders:\s+cerberus \(9\) - Recording$/m, 'Encoder is not present'); -like($out, qr/^Recording Now:\s+3 News \(TV3\) Ends: 19:00:00$/m, 'Recording now is present (the news)'); +like($out, qr/^Recording Now:\s+3 News \(TV3\), Ends: 19:00:00$/m, 'Recording now is present (the news)'); # Test that the recording now details aren't present if --norecording-now is passed. $out = `$Bin/../bin/mythtv-status --file $xml --norecording-now 2>&1`; like($out, qr/MythTV status for localhost/, 'Header is present'); -like($out, qr/^Status\.*: Thu Nov 29 2007, 6:43 PM$/m, 'Status line is present'); -like($out, qr/^Total Disk Space: Total space is 100\.0 GB, with 72\.2 GB used \(72.2%\)$/m, 'Total disk space is present'); +like($out, qr/^Status as of\.*: Thu Nov 29 2007, 6:43 PM$/m, 'Status line is present'); +like($out, qr/^Total Disk Space: Total space is 100 GB, with 72\.2 GB used \(72%\)$/m, 'Total disk space is present'); unlike($out, qr/^Guide Data\.*:/m, 'Guide data warning is not present'); like($out, qr/^Encoders:\s+cerberus \(9\) - Recording$/m, 'Encoder is present, and recording'); unlike($out, qr/^Recording Now:\s+3 News \(TV3\) Ends: 19:00:00$/m, 'Recording now is not present'); @@ -69,11 +69,11 @@ $out = `$Bin/../bin/mythtv-status --file $xml --encoder-details 2>&1`; #diag($out); like($out, qr/MythTV status for localhost/, 'Header is present'); -like($out, qr/^Status..........: Thu Nov 29 2007, 6:43 PM$/m, 'Status line is present'); -like($out, qr/^Total Disk Space: Total space is 100\.0 GB, with 72\.2 GB used \(72.2%\)$/m, 'Total disk space is present'); +like($out, qr/^Status as of\.*: Thu Nov 29 2007, 6:43 PM$/m, 'Status line is present'); +like($out, qr/^Total Disk Space: Total space is 100 GB, with 72\.2 GB used \(72%\)$/m, 'Total disk space is present'); unlike($out, qr/^Guide Data\.*:/m, 'Guide data warning is not present'); like($out, qr/^Encoders:\s+cerberus \(9\) - Recording$/m, 'Encoder is present, and recording'); -like($out, qr/^Recording Now:\s+3 News \(TV3, Enc: 9, Chan: 3\) Ends: 19:00:00$/m, 'Recording now is present (the news) with encoder details'); +like($out, qr/^Recording Now:\s+3 News \(TV3\), Enc: 9, Chan: 3, Ends: 19:00:00$/m, 'Recording now is present (the news) with encoder details'); # Test that the encoder details for a recording are present if --encoder-details is passed. @@ -82,8 +82,8 @@ $out = `$Bin/../bin/mythtv-status --file $xml --oneliner-bullets 2>&1`; #diag($out); like($out, qr/MythTV status for localhost/, 'Header is present'); -like($out, qr/^\* Status..........: Thu Nov 29 2007, 6:43 PM$/m, 'Status line is present (with bullet)'); -like($out, qr/^\* Total Disk Space: Total space is 100\.0 GB, with 72\.2 GB used \(72.2%\)$/m, 'Total disk space is present (with bullet)'); +like($out, qr/^\* Status as of\.*: Thu Nov 29 2007, 6:43 PM$/m, 'Status line is present (with bullet)'); +like($out, qr/^\* Total Disk Space: Total space is 100 GB, with 72\.2 GB used \(72%\)$/m, 'Total disk space is present (with bullet)'); unlike($out, qr/^Guide Data\.*:/m, 'Guide data warning is not present'); like($out, qr/^Encoders:\s+cerberus \(9\) - Recording$/m, 'Encoder is present, and recording'); -like($out, qr/^Recording Now:\s+3 News \(TV3\) Ends: 19:00:00$/m, 'Recording now is present (the news)'); +like($out, qr/^Recording Now:\s+3 News \(TV3\), Ends: 19:00:00$/m, 'Recording now is present (the news)');