summaryrefslogtreecommitdiffstats
path: root/src/testdir/dumps
diff options
context:
space:
mode:
authorAapo Rantalainen <aapo.rantalainen@gmail.com>2023-08-31 17:58:13 +0200
committerChristian Brabandt <cb@256bit.org>2023-08-31 17:58:13 +0200
commite2528ae11134cdf35c312754b124aba4963d8054 (patch)
treee9ace8e13597b4032761b513b345b70490a08407 /src/testdir/dumps
parent0b8b145bf8bfd3e90a1c30a999e6adb89ec8891c (diff)
patch 9.0.1827: xxd: no color supportv9.0.1827
Problem: xxd: no color support Solution: Add color support using xxd -R Add some basic color support for xxd The hex-value and value are both colored with the same color depending on the hex-value, e.g.: 0x00 = white 0xff = blue printable = green non-printable = red tabs and linebreaks = yellow Each character needs 11 more bytes to contain color. (Same color in a row could contain only one overhead but the logic how xxd creates colums must be then changed.) Size of colored output is increased by factor of ~6. Also grepping the output will break when colors is used. Flag for color is "-R", because less uses "-R". Color uses parameters auto,always,never same as less and grep (among others). E.g. xxd -R always $FILE | less -R Add some screen-tests (that currently on work on linux) to verify the feature works as expected. closes: #12131 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Aapo Rantalainen <aapo.rantalainen@gmail.com>
Diffstat (limited to 'src/testdir/dumps')
-rw-r--r--src/testdir/dumps/Test_xxd_color_0.dump20
-rw-r--r--src/testdir/dumps/Test_xxd_color_1.dump20
2 files changed, 40 insertions, 0 deletions
diff --git a/src/testdir/dumps/Test_xxd_color_0.dump b/src/testdir/dumps/Test_xxd_color_0.dump
new file mode 100644
index 0000000000..0b3b5fc169
--- /dev/null
+++ b/src/testdir/dumps/Test_xxd_color_0.dump
@@ -0,0 +1,20 @@
+|$+0&#ffffff0| |.@1|/|x@1|d|/|x@1|d| |-|R| |n|e|v|e|r| @1|<| |X@1|D|f|i|l|e|_|c|o|l|o|r|s| @35
+|0@7|:| |0@2|1| |0|2|0|3| |0|4|0|5| |0|6|0|7| |0|8|0|9| |0|a|0|b| |0|c|0|d| |0|e|0|f| @1|.@15| @7
+|0@5|1|0|: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| |a|4|a|5| |a|6|a|7| |a|8|a|9| |a@2|b| |a|c|a|d| |a|e|a|f| @1|.@15| @7
+|0@5|b|0|:| |b|0|b|1| |b|2|b|3| |b|4|b|5| |b|6|b|7| |b|8|b|9| |b|a|b@1| |b|c|b|d| |b|e|b|f| @1|.@15| @7
+|0@5|c|0|:| |c|0|c|1| |c|2|c|3| |c|4|c|5| |c|6|c|7| |c|8|c|9| |c|a|c|b| |c@2|d| |c|e|c|f| @1|.@15| @7
+|0@5|d|0|:| |d|0|d|1| |d|2|d|3| |d|4|d|5| |d|6|d|7| |d|8|d|9| |d|a|d|b| |d|c|d@1| |d|e|d|f| @1|.@15| @7
+|0@5|e|0|:| |e|0|e|1| |e|2|e|3| |e|4|e|5| |e|6|e|7| |e|8|e|9| |e|a|e|b| |e|c|e|d| |e@2|f| @1|.@15| @7
+|0@5|f|0|:| |f|0|f|1| |f|2|f|3| |f|4|f|5| |f|6|f|7| |f|8|f|9| |f|a|f|b| |f|c|f|d| |f|e|f@1| @1|.@15| @7
+|$| > @72
+@75
+@75
diff --git a/src/testdir/dumps/Test_xxd_color_1.dump b/src/testdir/dumps/Test_xxd_color_1.dump
new file mode 100644
index 0000000000..da62821045
--- /dev/null
+++ b/src/testdir/dumps/Test_xxd_color_1.dump
@@ -0,0 +1,20 @@
+|$+0&#ffffff0| |0@7|:| |0+2#e0e0e08&@1|0+2#e000002&|1| +0#0000000&|0+2#e000002&|2|0|3| +0#0000000&|0+2#e000002&|4|0|5| +0#0000000&|0+2#e000002&|6|0|7| +0#0000000&|0+2#e000002&|8|0+2#e0e0004&|9| +0#0000000&|0+2#e0e0004&|a|0+2#e000002&|b| +0#0000000&|0+2#e000002&|c|0+2#e0e0004&|d| +0#0000000&|0+2#e000002&|e|0|f| +0#0000000&@1|.+2#e0e0e08&|.+2#e000002&@7|.+2#e0e0004&@1|.+2#e000002&@1|.+2#e0e0004&|.+2#e000002&@1| +0#0000000&@5
+|0@5|1|0|:| |1+2#e000002&|0|1@1| +0#0000000&|1+2#e000002&|2|1|3| +0#0000000&|1+2#e000002&|4|1|5| +0#0000000&|1+2#e000002&|6|1|7| +0#0000000&|1+2#e000002&|8|1|9| +0#0000000&|1+2#e000002&|a|1|b| +0#0000000&|1+2#e000002&|c|1|d| +0#0000000&|1+2#e000002&|e|1|f| +0#0000000&@1|.+2#e000002&@15| +0#0000000&@7
+|0@5|2|0|:| |2+2#00e0003&|0|2|1| +0#0000000&|2+2#00e0003&@2|3| +0#0000000&|2+2#00e0003&|4|2|5| +0#0000000&|2+2#00e0003&|6|0+2#e0e0e08&@1| +0#0000000&|2+2#00e0003&|8|2|9| +0#0000000&|2+2#00e0003&|a|2|b| +0#0000000&|2+2#00e0003&|c|2|d| +0#0000000&|2+2#00e0003&|e|2|f| +0#0000000&@1| +2#00e0003&|!|"|#|$|%|&|.+2#e0e0e08&|(+2#00e0003&|)|*|+|,|-|.|/| +0#0000000&@7
+|0@5|3|0|:| |3+2#00e0003&|0|3|1| +0#0000000&|3+2#00e0003&|2|3@1| +0#0000000&|3+2#00e0003&|4|3|5| +0#0000000&|3+2#00e0003&|6|3|7| +0#0000000&|3+2#00e0003&|8|3|9| +0#0000000&|3+2#00e0003&|a|3|b| +0#0000000&|3+2#00e0003&|c|3|d| +0#0000000&|3+2#00e0003&|e|3|f| +0#0000000&@1|0+2#00e0003&|1|2|3|4|5|6|7|8|9|:|;|<|=|>|?| +0#0000000&@7
+|0@5|4|0|:| |4+2#00e0003&|0|4|1| +0#0000000&|4+2#00e0003&|2|4|3| +0#0000000&|4+2#00e0003&@2|5| +0#0000000&|4+2#00e0003&|6|4|7| +0#0000000&|4+2#00e0003&|8|4|9| +0#0000000&|4+2#00e0003&|a|4|b| +0#0000000&|4+2#00e0003&|c|4|d| +0#0000000&|4+2#00e0003&|e|4|f| +0#0000000&@1|@+2#00e0003&|A|B|C|D|E|F|G|H|I|J|K|L|M|N|O| +0#0000000&@7
+|0@5|5|0|:| |5+2#00e0003&|0|5|1| +0#0000000&|5+2#00e0003&|2|5|3| +0#0000000&|5+2#00e0003&|4|5@1| +0#0000000&|5+2#00e0003&|6|5|7| +0#0000000&|5+2#00e0003&|8|5|9| +0#0000000&|5+2#00e0003&|a|5|b| +0#0000000&|0+2#e0e0e08&@1|5+2#00e0003&|d| +0#0000000&|5+2#00e0003&|e|5|f| +0#0000000&@1|P+2#00e0003&|Q|R|S|T|U|V|W|X|Y|Z|[|.+2#e0e0e08&|]+2#00e0003&|^|_| +0#0000000&@7
+|0@5|6|0|:| |6+2#00e0003&|0|6|1| +0#0000000&|6+2#00e0003&|2|6|3| +0#0000000&|6+2#00e0003&|4|6|5| +0#0000000&|6+2#00e0003&@2|7| +0#0000000&|6+2#00e0003&|8|6|9| +0#0000000&|6+2#00e0003&|a|6|b| +0#0000000&|6+2#00e0003&|c|6|d| +0#0000000&|6+2#00e0003&|e|6|f| +0#0000000&@1|`+2#00e0003&|a|b|c|d|e|f|g|h|i|j|k|l|m|n|o| +0#0000000&@7
+|0@5|7|0|:| |7+2#00e0003&|0|7|1| +0#0000000&|7+2#00e0003&|2|7|3| +0#0000000&|7+2#00e0003&|4|7|5| +0#0000000&|7+2#00e0003&|6|7@1| +0#0000000&|7+2#00e0003&|8|7|9| +0#0000000&|7+2#00e0003&|a|7|b| +0#0000000&|7+2#00e0003&|c|7|d| +0#0000000&|7+2#00e0003&|e|7+2#e000002&|f| +0#0000000&@1|p+2#00e0003&|q|r|s|t|u|v|w|x|y|z|{|||}|~|.+2#e000002&| +0#0000000&@7
+|0@5|8|0|:| |8+2#e000002&|0|8|1| +0#0000000&|8+2#e000002&|2|8|3| +0#0000000&|8+2#e000002&|4|8|5| +0#0000000&|8+2#e000002&|6|8|7| +0#0000000&|8+2#e000002&@2|9| +0#0000000&|8+2#e000002&|a|8|b| +0#0000000&|8+2#e000002&|c|8|d| +0#0000000&|8+2#e000002&|e|8|f| +0#0000000&@1|.+2#e000002&@15| +0#0000000&@7
+|0@5|9|0|:| |9+2#e000002&|0|9|1| +0#0000000&|9+2#e000002&|2|9|3| +0#0000000&|9+2#e000002&|4|9|5| +0#0000000&|9+2#e000002&|6|9|7| +0#0000000&|9+2#e000002&|8|9@1| +0#0000000&|9+2#e000002&|a|9|b| +0#0000000&|9+2#e000002&|c|9|d| +0#0000000&|9+2#e000002&|e|9|f| +0#0000000&@1|.+2#e000002&@15| +0#0000000&@7
+|0@5|a|0|:| |a+2#e000002&|0|a|1| +0#0000000&|a+2#e000002&|2|a|3| +0#0000000&|a+2#e000002&|4|a|5| +0#0000000&|a+2#e000002&|6|a|7| +0#0000000&|a+2#e000002&|8|a|9| +0#0000000&|a+2#e000002&@2|b| +0#0000000&|a+2#e000002&|c|a|d| +0#0000000&|a+2#e000002&|e|a|f| +0#0000000&@1|.+2#e000002&@15| +0#0000000&@7
+|0@5|b|0|:| |b+2#e000002&|0|b|1| +0#0000000&|b+2#e000002&|2|b|3| +0#0000000&|b+2#e000002&|4|b|5| +0#0000000&|b+2#e000002&|6|b|7| +0#0000000&|b+2#e000002&|8|b|9| +0#0000000&|b+2#e000002&|a|b@1| +0#0000000&|b+2#e000002&|c|b|d| +0#0000000&|b+2#e000002&|e|b|f| +0#0000000&@1|.+2#e000002&@15| +0#0000000&@7
+|0@5|c|0|:| |c+2#e000002&|0|c|1| +0#0000000&|c+2#e000002&|2|c|3| +0#0000000&|c+2#e000002&|4|c|5| +0#0000000&|c+2#e000002&|6|c|7| +0#0000000&|c+2#e000002&|8|c|9| +0#0000000&|c+2#e000002&|a|c|b| +0#0000000&|c+2#e000002&@2|d| +0#0000000&|c+2#e000002&|e|c|f| +0#0000000&@1|.+2#e000002&@15| +0#0000000&@7
+|0@5|d|0|:| |d+2#e000002&|0|d|1| +0#0000000&|d+2#e000002&|2|d|3| +0#0000000&|d+2#e000002&|4|d|5| +0#0000000&|d+2#e000002&|6|d|7| +0#0000000&|d+2#e000002&|8|d|9| +0#0000000&|d+2#e000002&|a|d|b| +0#0000000&|d+2#e000002&|c|d@1| +0#0000000&|d+2#e000002&|e|d|f| +0#0000000&@1|.+2#e000002&@15| +0#0000000&@7
+|0@5|e|0|:| |e+2#e000002&|0|e|1| +0#0000000&|e+2#e000002&|2|e|3| +0#0000000&|e+2#e000002&|4|e|5| +0#0000000&|e+2#e000002&|6|e|7| +0#0000000&|e+2#e000002&|8|e|9| +0#0000000&|e+2#e000002&|a|e|b| +0#0000000&|e+2#e000002&|c|e|d| +0#0000000&|e+2#e000002&@2|f| +0#0000000&@1|.+2#e000002&@15| +0#0000000&@7
+|0@5|f|0|:| |f+2#e000002&|0|f|1| +0#0000000&|f+2#e000002&|2|f|3| +0#0000000&|f+2#e000002&|4|f|5| +0#0000000&|f+2#e000002&|6|f|7| +0#0000000&|f+2#e000002&|8|f|9| +0#0000000&|f+2#e000002&|a|f|b| +0#0000000&|f+2#e000002&|c|f|d| +0#0000000&|f+2#e000002&|e|f+2#0000e05&@1| +0#0000000&@1|.+2#e000002&@14|.+2#0000e05&| +0#0000000&@7
+|$| > @72
+@75
+@75
+@75