test value parameters and option parsing
authorMischa POSLAWSKY <perl@shiar.org>
Fri, 24 Jan 2020 21:54:10 +0000 (22:54 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Sun, 16 Feb 2020 21:35:47 +0000 (22:35 +0100)
barcat
t/t1700-empty_input.in [new file with mode: 0644]
t/t1700-empty_input.out [new file with mode: 0644]
t/t1701-number_option_-1_?64.out [new file with mode: 0644]
t/t1710-zero_value_--_0.out [new file with mode: 0644]
t/t1711-value_parameter_--_1.out [new file with mode: 0644]
t/t1712-value_parameters_--_1_4_8_2_6_3_9_5_2.out [moved from t/t0101-value_parameters_--_1_4_8_2_6_3_9_5_2.out with 100% similarity]
t/t1713-negative_value_--_-1_1.out [new file with mode: 0644]
t/t1721-option_overrides_-c_-C_1.out [new file with mode: 0644]
t/t1722-mixed_options_-C_1_-l_2_hi_3_--st_4_--_5_-1_--version.out [new file with mode: 0644]

diff --git a/barcat b/barcat
index 7f442a54f97e410cd6f684d1e4e2598795c5d137..77d35ad739d58459864ed17e8d0f3bc036dfd941 100755 (executable)
--- 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 (file)
index 0000000..e69de29
diff --git a/t/t1700-empty_input.out b/t/t1700-empty_input.out
new file mode 100644 (file)
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 (file)
index 0000000..71d67cc
--- /dev/null
@@ -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 (file)
index 0000000..e69de29
diff --git a/t/t1711-value_parameter_--_1.out b/t/t1711-value_parameter_--_1.out
new file mode 100644 (file)
index 0000000..3ad53e9
--- /dev/null
@@ -0,0 +1 @@
+1 -------------------------------------+
diff --git a/t/t1713-negative_value_--_-1_1.out b/t/t1713-negative_value_--_-1_1.out
new file mode 100644 (file)
index 0000000..162bba2
--- /dev/null
@@ -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 (file)
index 0000000..3ad53e9
--- /dev/null
@@ -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 (file)
index 0000000..6722bef
--- /dev/null
@@ -0,0 +1,8 @@
+ 1 -----|------
+…-----|
+ 3 -----|-----------<-=---+-
+ 4 -----|-----------<-=---+----->-
+ 5 -----|-----------<-=---+----->-------
+-1 
+…-----|
+12 total in 5 values over 7 lines (-1 min, 2.40 avg, 5 max)