Commit Graph

2 Commits

Author SHA1 Message Date
Aleksa Sarai 4045484afb
vis: rewrite to use byte slices
This results in all multi-byte characters to be encoded in a way that
naive unvis(3) implementations will not bork up the encoding. In
addition, it also ensures that the output of Vis will always be ASCII
*only*.

Also test far more cases in *_test.go when it comes to different flags,
and do far more tests to ensure that the output of Vis() makes sense.
These outputs come directly from vis(3) and so are useful regression
tests to ensure that the handling of Vis() is identical to the original.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2017-02-16 01:07:16 +11:00
Aleksa Sarai 44391840b6
vis: partial vis(3) port
This is a stopgap while I figure out how I should go about implementing
vis(3). It's also important to have some vis(3) implementation so I can
do integration tests on round-trips.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2017-02-12 04:07:37 +11:00