diff options
| author | Paul Buetow <paul@buetow.org> | 2023-03-27 22:19:19 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2023-03-27 22:19:19 +0300 |
| commit | 152ea8e177a609b02b415d3399b5d078eff23eaa (patch) | |
| tree | fc17b10497fcd3a1775f06c6647d3ae2e997a932 /guprecords.raku | |
| parent | 54f506de1fd1d0f58fe0c50f88476df89241dd7e (diff) | |
add a test per output format
Diffstat (limited to 'guprecords.raku')
| -rw-r--r-- | guprecords.raku | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/guprecords.raku b/guprecords.raku index cb331ed..a09f4a5 100644 --- a/guprecords.raku +++ b/guprecords.raku @@ -232,9 +232,10 @@ multi sub MAIN('test') { use Test; my @combs = gather { - for Category.^enum_value_list X Metric.^enum_value_list -> (Category $category, Metric $metric) { + for Category.^enum_value_list X Metric.^enum_value_list X OutputFormat.^enum_value_list + -> (Category $category, Metric $metric, OutputFormat $output-format) { next if $category !~~ Host and $metric !~~ MetricSubset; - take $category, $metric; + take $category, $metric, $output-format; } } @@ -243,11 +244,11 @@ multi sub MAIN('test') { my $output-format = Plaintext; my %aggregates = Aggregator.new('./fixtures').aggregate; - for @combs -> (Category $category, Metric $metric) { + for @combs -> (Category $category, Metric $metric, OutputFormat $output-format) { my \reporter = $category ~~ Host ?? HostReporter.new(:%aggregates, :$metric, :$limit, :$output-format) !! Reporter.new(:%aggregates, :$category, :$metric, :$limit, :$output-format); - is reporter.report, "./fixtures/$category.$metric.expected-output".IO.slurp; + is reporter.report, "./fixtures/$category.$metric.$output-format.expected".IO.slurp; } done-testing; |
