From 0f38a688d263d8c58d28e51da2ff864fad493f3f Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Fri, 24 Jan 2020 22:54:10 +0100 Subject: [PATCH] test value parameters and option parsing --- barcat | 6 +++++- t/t1700-empty_input.in | 0 t/t1700-empty_input.out | 0 t/t1701-number_option_-1_?64.out | 1 + t/t1710-zero_value_--_0.out | 0 t/t1711-value_parameter_--_1.out | 1 + ...ut => t1712-value_parameters_--_1_4_8_2_6_3_9_5_2.out} | 0 t/t1713-negative_value_--_-1_1.out | 2 ++ t/t1721-option_overrides_-c_-C_1.out | 1 + ...ed_options_-C_1_-l_2_hi_3_--st_4_--_5_-1_--version.out | 8 ++++++++ 10 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 t/t1700-empty_input.in create mode 100644 t/t1700-empty_input.out create mode 100644 t/t1701-number_option_-1_?64.out create mode 100644 t/t1710-zero_value_--_0.out create mode 100644 t/t1711-value_parameter_--_1.out rename t/{t0101-value_parameters_--_1_4_8_2_6_3_9_5_2.out => t1712-value_parameters_--_1_4_8_2_6_3_9_5_2.out} (100%) create mode 100644 t/t1713-negative_value_--_-1_1.out create mode 100644 t/t1721-option_overrides_-c_-C_1.out create mode 100644 t/t1722-mixed_options_-C_1_-l_2_hi_3_--st_4_--_5_-1_--version.out diff --git a/barcat b/barcat index 7f442a5..77d35ad 100755 --- a/barcat +++ b/barcat @@ -559,7 +559,11 @@ Or the top 3 most frequent authors with statistics over all: git shortlog -sn | barcat -L3 -s -Activity of the last days (substitute date C<-v-{}d> on BSD): +Sparkline graphics of simple input given as inline parameters: + + barcat --spark= 3 1 4 1 5 0 9 2 4 + +Activity graph of the last days (substitute date C<-v-{}d> on BSD): ( git log --pretty=%ci --since=30day | cut -b-10 seq 0 30 | xargs -i date +%F -d-{}day ) | diff --git a/t/t1700-empty_input.in b/t/t1700-empty_input.in new file mode 100644 index 0000000..e69de29 diff --git a/t/t1700-empty_input.out b/t/t1700-empty_input.out new file mode 100644 index 0000000..e69de29 diff --git a/t/t1701-number_option_-1_?64.out b/t/t1701-number_option_-1_?64.out new file mode 100644 index 0000000..71d67cc --- /dev/null +++ b/t/t1701-number_option_-1_?64.out @@ -0,0 +1 @@ +Unknown option: 1 diff --git a/t/t1710-zero_value_--_0.out b/t/t1710-zero_value_--_0.out new file mode 100644 index 0000000..e69de29 diff --git a/t/t1711-value_parameter_--_1.out b/t/t1711-value_parameter_--_1.out new file mode 100644 index 0000000..3ad53e9 --- /dev/null +++ b/t/t1711-value_parameter_--_1.out @@ -0,0 +1 @@ +1 -------------------------------------+ diff --git a/t/t0101-value_parameters_--_1_4_8_2_6_3_9_5_2.out b/t/t1712-value_parameters_--_1_4_8_2_6_3_9_5_2.out similarity index 100% rename from t/t0101-value_parameters_--_1_4_8_2_6_3_9_5_2.out rename to t/t1712-value_parameters_--_1_4_8_2_6_3_9_5_2.out diff --git a/t/t1713-negative_value_--_-1_1.out b/t/t1713-negative_value_--_-1_1.out new file mode 100644 index 0000000..162bba2 --- /dev/null +++ b/t/t1713-negative_value_--_-1_1.out @@ -0,0 +1,2 @@ +-1 + 1 -----------------|------------------> diff --git a/t/t1721-option_overrides_-c_-C_1.out b/t/t1721-option_overrides_-c_-C_1.out new file mode 100644 index 0000000..3ad53e9 --- /dev/null +++ b/t/t1721-option_overrides_-c_-C_1.out @@ -0,0 +1 @@ +1 -------------------------------------+ diff --git a/t/t1722-mixed_options_-C_1_-l_2_hi_3_--st_4_--_5_-1_--version.out b/t/t1722-mixed_options_-C_1_-l_2_hi_3_--st_4_--_5_-1_--version.out new file mode 100644 index 0000000..6722bef --- /dev/null +++ b/t/t1722-mixed_options_-C_1_-l_2_hi_3_--st_4_--_5_-1_--version.out @@ -0,0 +1,8 @@ + 1 -----|------ +…-----| + 3 -----|-----------<-=---+- + 4 -----|-----------<-=---+----->- + 5 -----|-----------<-=---+----->------- +-1 +…-----| +12 total in 5 values over 7 lines (-1 min, 2.40 avg, 5 max) -- 2.30.0