git.shiar.nl
/
barcat.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e5a35b8
)
treat zero as non-empty spark value
author
Mischa POSLAWSKY
<perl@shiar.org>
Sun, 13 Nov 2022 14:17:09 +0000
(15:17 +0100)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Fri, 18 Nov 2022 00:25:46 +0000
(
01:25
+0100)
barcat
patch
|
blob
|
history
t/t2110-spark_binary.in
[changed from symlink to file mode: 0644]
patch
|
blob
|
history
t/t2110-spark_binary_--spark_--indicators=XO.out
patch
|
blob
|
history
t/t2111-spark_unicode.in
patch
|
blob
|
history
t/t2111-spark_unicode_--spark_--indicators=-·•O.out
patch
|
blob
|
history
t/t2115-spark-oneliner_--spark_--indicators=1.out
patch
|
blob
|
history
t/t2180-spark_combined.in
patch
|
blob
|
history
t/t2180-spark_combined_--spark_--indicators=012345_-cs_--maxval=1_-L17.out
patch
|
blob
|
history
diff --git
a/barcat
b/barcat
index b939ea95ae88a91ddd0fe89b2017ecb1ae77259d..4d3205ff3aec082d3741083e8c438902e45aeb52 100755
(executable)
--- a/
barcat
+++ b/
barcat
@@
-291,7
+291,7
@@
while ($nr <= $limit) {
$val == $order[-1] ? $opt{palette}->[0] : # min
$opt{palette}->[ $rel * ($#{$opt{palette}} - 1) + 1 ];
my $indicator = $opt{indicators} && $opt{indicators}->[
$val == $order[-1] ? $opt{palette}->[0] : # min
$opt{palette}->[ $rel * ($#{$opt{palette}} - 1) + 1 ];
my $indicator = $opt{indicators} && $opt{indicators}->[
- !
$val
|| !$#{$opt{indicators}} ? 0 : # blank
+ !
length($val)
|| !$#{$opt{indicators}} ? 0 : # blank
$#{$opt{indicators}} < 2 ? 1 :
$val >= $order[0] ? -1 :
$rel * ($#{$opt{indicators}} - 1e-14) + 1
$#{$opt{indicators}} < 2 ? 1 :
$val >= $order[0] ? -1 :
$rel * ($#{$opt{indicators}} - 1e-14) + 1
diff --git
a/t/t2110-spark_binary.in
b/t/t2110-spark_binary.in
deleted file mode 120000
(symlink)
index dcd72c5f0f9185aaff0ffdda03721175a7883e7d..0000000000000000000000000000000000000000
--- a/
t/t2110-spark_binary.in
+++ /dev/null
@@
-1
+0,0
@@
-t1005-float.in
\ No newline at end of file
diff --git
a/t/t2110-spark_binary.in
b/t/t2110-spark_binary.in
new file mode 100644
(file)
index 0000000000000000000000000000000000000000..3252be5cba3cf62e4832b52398a9ae92e29d7c2a
--- /dev/null
+++ b/
t/t2110-spark_binary.in
@@
-0,0
+1,15
@@
+header:
+-2
+1
+2
+0
+not 0
+0 again
+3
+
+8
+3
+.9
+1
+empty
+
diff --git
a/t/t2110-spark_binary_--spark_--indicators=XO.out
b/t/t2110-spark_binary_--spark_--indicators=XO.out
index d25d0bdfd61c27c27d5c1f3b9fce5af666a5c01d..753f76c13732f892640bae3f05c2c59a5ac89d88 100644
(file)
--- a/
t/t2110-spark_binary_--spark_--indicators=XO.out
+++ b/
t/t2110-spark_binary_--spark_--indicators=XO.out
@@
-1
+1
@@
-
OOOOXOOOOOOOOOXOO
X
+
XOOOOXOOXOOOOX
X
diff --git
a/t/t2111-spark_unicode.in
b/t/t2111-spark_unicode.in
index dcd72c5f0f9185aaff0ffdda03721175a7883e7d..cb5106f243cdaef76b2d37444b15c19291b87a77 120000
(symlink)
--- a/
t/t2111-spark_unicode.in
+++ b/
t/t2111-spark_unicode.in
@@
-1
+1
@@
-t
1005-float
.in
\ No newline at end of file
+t
2110-spark_binary
.in
\ No newline at end of file
diff --git
a/t/t2111-spark_unicode_--spark_--indicators=-·•O.out
b/t/t2111-spark_unicode_--spark_--indicators=-·•O.out
index 854d335f2f6130c8f9904932562363004a56303a..6662c526e032eb3576acbe168b2b684d9bdfc416 100644
(file)
--- a/
t/t2111-spark_unicode_--spark_--indicators=-·•O.out
+++ b/
t/t2111-spark_unicode_--spark_--indicators=-·•O.out
@@
-1
+1
@@
-
···•-•••••••OO-O·
-
+
-··•·-·•-O•··-
-
diff --git
a/t/t2115-spark-oneliner_--spark_--indicators=1.out
b/t/t2115-spark-oneliner_--spark_--indicators=1.out
index 60d426865cb9a25bf3e2bc731e5daa16acacee26..86eb132b155142a620b981dc78b7a38e51ee2d23 100644
(file)
--- a/
t/t2115-spark-oneliner_--spark_--indicators=1.out
+++ b/
t/t2115-spark-oneliner_--spark_--indicators=1.out
@@
-1
+1
@@
-111111111111111
111
+111111111111111
diff --git
a/t/t2180-spark_combined.in
b/t/t2180-spark_combined.in
index cb5106f243cdaef76b2d37444b15c19291b87a77..dcd72c5f0f9185aaff0ffdda03721175a7883e7d 120000
(symlink)
--- a/
t/t2180-spark_combined.in
+++ b/
t/t2180-spark_combined.in
@@
-1
+1
@@
-t
2110-spark_binary
.in
\ No newline at end of file
+t
1005-float
.in
\ No newline at end of file
diff --git
a/t/t2180-spark_combined_--spark_--indicators=012345_-cs_--maxval=1_-L17.out
b/t/t2180-spark_combined_--spark_--indicators=012345_-cs_--maxval=1_-L17.out
index 777e01533e930666e176bdcc7cddb247590e6827..be3a08be5147570309679ddda402d3b551826442 100644
(file)
--- a/
t/t2180-spark_combined_--spark_--indicators=012345_-cs_--maxval=1_-L17.out
+++ b/
t/t2180-spark_combined_--spark_--indicators=012345_-cs_--maxval=1_-L17.out
@@
-1,2
+1,2
@@
-
\e
[31m1
\e
[90m1
\e
[90m2
\e
[90m3
\e
[90m
0
\e
[90m4
\e
[90m4
\e
[90m4
\e
[90m4
\e
[90m4
\e
[90m3
\e
[90m4
\e
[32m5
\e
[32m50
\e
[32m5
\e
[90m2
\e
[0m
+
\e
[31m1
\e
[90m1
\e
[90m2
\e
[90m3
\e
[90m
4
\e
[90m4
\e
[90m4
\e
[90m4
\e
[90m4
\e
[90m4
\e
[90m3
\e
[90m4
\e
[32m5
\e
[32m50
\e
[32m5
\e
[90m2
\e
[0m
-7.459 of
\e
[1m-7.459
\e
[0m total in 16 values over 18 lines (
\e
[31m-3
\e
[0m min,
\e
[36m-0.47
\e
[0m avg,
\e
[32m2
\e
[0m max)
-7.459 of
\e
[1m-7.459
\e
[0m total in 16 values over 18 lines (
\e
[31m-3
\e
[0m min,
\e
[36m-0.47
\e
[0m avg,
\e
[32m2
\e
[0m max)