Merge branch 'ul-refactor' of https://github.com/kerolasa/util-linux
* 'ul-refactor' of https://github.com/kerolasa/util-linux: ul: flip comparisons to lesser to greater order ul: use size_t to measure memory allocation size ul: improve function and variable names ul: rename enumerated mode symbols ul: remove function like putwp preprocessor define ul: free most allocations ncurses did during setupterm() ul: replace global runtime variables with a control structure ul: add a term capabilities tracking structure ul: remove function prototypes ul: tidy up coding style ul: add basic tests
This commit is contained in:
commit
9c4762cb6b
|
@ -0,0 +1,113 @@
|
|||
printable characters
|
||||
|
||||
!
|
||||
"
|
||||
#
|
||||
$
|
||||
%
|
||||
&
|
||||
'
|
||||
(
|
||||
)
|
||||
*
|
||||
+
|
||||
,
|
||||
-
|
||||
.
|
||||
/
|
||||
0
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
:
|
||||
;
|
||||
<
|
||||
=
|
||||
>
|
||||
?
|
||||
@
|
||||
A
|
||||
B
|
||||
C
|
||||
D
|
||||
E
|
||||
F
|
||||
G
|
||||
H
|
||||
I
|
||||
J
|
||||
K
|
||||
L
|
||||
M
|
||||
N
|
||||
O
|
||||
P
|
||||
Q
|
||||
R
|
||||
S
|
||||
T
|
||||
U
|
||||
V
|
||||
W
|
||||
X
|
||||
Y
|
||||
Z
|
||||
[
|
||||
\
|
||||
]
|
||||
^
|
||||
_
|
||||
`
|
||||
a
|
||||
b
|
||||
c
|
||||
d
|
||||
e
|
||||
f
|
||||
g
|
||||
h
|
||||
i
|
||||
j
|
||||
k
|
||||
l
|
||||
m
|
||||
n
|
||||
o
|
||||
p
|
||||
q
|
||||
r
|
||||
s
|
||||
t
|
||||
u
|
||||
v
|
||||
w
|
||||
x
|
||||
y
|
||||
z
|
||||
{
|
||||
|
|
||||
}
|
||||
~
|
||||
filter input
|
||||
backspacex
|
||||
tab
|
||||
R
|
||||
SO
|
||||
[7mSI(B[m
|
||||
[4munder[24mline
|
||||
flush
|
||||
afer flush
|
||||
normal[2mdim(B[m
|
||||
normaldimunderlined
|
||||
normal
|
||||
[A[A[C[C[C[C[C[Creverse
|
||||
eof
|
||||
indicated
|
||||
ul
|
||||
__
|
|
@ -0,0 +1,35 @@
|
|||
#!/bin/bash
|
||||
|
||||
#
|
||||
# Copyright (C) 2020 Sami Kerola <kerolasa@iki.fi>
|
||||
#
|
||||
# This file is part of util-linux.
|
||||
#
|
||||
# This file is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This file is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
TS_TOPDIR="${0%/*}/../.."
|
||||
TS_DESC="basic tests"
|
||||
|
||||
. $TS_TOPDIR/functions.sh
|
||||
ts_init "$*"
|
||||
|
||||
ts_check_test_command "$TS_CMD_UL"
|
||||
|
||||
ts_log "printable characters"
|
||||
$TS_CMD_UL < $TS_SELF/basic.input >> $TS_OUTPUT 2>> $TS_ERRLOG
|
||||
|
||||
ts_log "filter input"
|
||||
$TS_CMD_UL $TS_SELF/filter.input >> $TS_OUTPUT 2>> $TS_ERRLOG
|
||||
|
||||
ts_log "indicated"
|
||||
printf "u\b_l\b_\n" | ul --indicated >> $TS_OUTPUT 2>> $TS_ERRLOG
|
||||
|
||||
ts_finalize
|
|
@ -0,0 +1,95 @@
|
|||
|
||||
!
|
||||
"
|
||||
#
|
||||
$
|
||||
%
|
||||
&
|
||||
'
|
||||
(
|
||||
)
|
||||
*
|
||||
+
|
||||
,
|
||||
-
|
||||
.
|
||||
/
|
||||
0
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
:
|
||||
;
|
||||
<
|
||||
=
|
||||
>
|
||||
?
|
||||
@
|
||||
A
|
||||
B
|
||||
C
|
||||
D
|
||||
E
|
||||
F
|
||||
G
|
||||
H
|
||||
I
|
||||
J
|
||||
K
|
||||
L
|
||||
M
|
||||
N
|
||||
O
|
||||
P
|
||||
Q
|
||||
R
|
||||
S
|
||||
T
|
||||
U
|
||||
V
|
||||
W
|
||||
X
|
||||
Y
|
||||
Z
|
||||
[
|
||||
\
|
||||
]
|
||||
^
|
||||
_
|
||||
`
|
||||
a
|
||||
b
|
||||
c
|
||||
d
|
||||
e
|
||||
f
|
||||
g
|
||||
h
|
||||
i
|
||||
j
|
||||
k
|
||||
l
|
||||
m
|
||||
n
|
||||
o
|
||||
p
|
||||
q
|
||||
r
|
||||
s
|
||||
t
|
||||
u
|
||||
v
|
||||
w
|
||||
x
|
||||
y
|
||||
z
|
||||
{
|
||||
|
|
||||
}
|
||||
~
|
|
@ -0,0 +1,11 @@
|
|||
backspacexy
|
||||
tab
|
||||
R
S
|
||||
SO
|
||||
SI
|
||||
u_n_d_e_r_line
|
||||
flushafer flush
|
||||
normal9dim
|
||||
normal8dimunderlined
|
||||
normal7reverse
|
||||
eof
|
972
text-utils/ul.c
972
text-utils/ul.c
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue