From 20ced70c3dfe597bea65ba5187cc933231867d79 Mon Sep 17 00:00:00 2001 From: Korenevskiy Denis Date: Sat, 12 Oct 2024 15:22:01 +0300 Subject: [PATCH] add test to check custom output table header labels --- scripts/test.sh | 12 ++++++++++++ table-converter/integrations/custom_out_labels.csv | 7 +++++++ 2 files changed, 19 insertions(+) create mode 100644 table-converter/integrations/custom_out_labels.csv diff --git a/scripts/test.sh b/scripts/test.sh index 45de085..c65598c 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -60,6 +60,18 @@ repo_root="$(pwd)" echo "OK" echo "" + echo "# Test case: custom labels" + "${converter}" \ + -sample-column-name M \ + -separator ' ' \ + --sample-label S \ + --metric-label M \ + --value-label V \ + "${integrations}/custom_in.csv" "./custom_out_labels.csv" + diff "${integrations}/custom_out_labels.csv" "./custom_out_labels.csv" + echo "OK" + echo "" + echo "# Test case: custom (sample by RE)" "${converter}" -sample-column-search '^M$' -separator ' ' "${integrations}/custom_in.csv" "./custom_out.csv" diff "${integrations}/custom_out.csv" "./custom_out.csv" diff --git a/table-converter/integrations/custom_out_labels.csv b/table-converter/integrations/custom_out_labels.csv new file mode 100644 index 0000000..fb8c13f --- /dev/null +++ b/table-converter/integrations/custom_out_labels.csv @@ -0,0 +1,7 @@ +S M V +s1 M1 v1 +s1 M2 v2 +s2 M1 v4 +s2 M2 v5 +s3 M1 v7 +s3 M2 v8