1 |
Signed-off-by: Michał Górny <mgorny@g.o> |
2 |
--- |
3 |
eclass/tests/unpacker.sh | 29 +++++++++++++++++++++++++++++ |
4 |
1 file changed, 29 insertions(+) |
5 |
|
6 |
diff --git a/eclass/tests/unpacker.sh b/eclass/tests/unpacker.sh |
7 |
index b15953966f65..175975798731 100755 |
8 |
--- a/eclass/tests/unpacker.sh |
9 |
+++ b/eclass/tests/unpacker.sh |
10 |
@@ -177,6 +177,25 @@ test_gpkg() { |
11 |
"create_gpkg '${suffix}' '${tool_cmd}' \${archive} \${TESTFILE}" |
12 |
} |
13 |
|
14 |
+create_makeself() { |
15 |
+ local comp_opt=${1} |
16 |
+ local archive=${2} |
17 |
+ local infile=${3} |
18 |
+ |
19 |
+ mkdir test || die |
20 |
+ cp "${infile}" test/ || die |
21 |
+ makeself --quiet "${comp_opt}" test "${archive}" test : || die |
22 |
+ rm -rf test || die |
23 |
+} |
24 |
+ |
25 |
+test_makeself() { |
26 |
+ local comp_opt=${1} |
27 |
+ local tool=${2} |
28 |
+ |
29 |
+ test_unpack "makeself-${tool}.sh" test.in "makeself ${tool}" \ |
30 |
+ "create_makeself '${comp_opt}' \${archive} \${TESTFILE}" |
31 |
+} |
32 |
+ |
33 |
test_reject_junk() { |
34 |
local suffix=${1} |
35 |
local archive=test${1} |
36 |
@@ -260,6 +279,16 @@ test_gpkg .lzo lzop |
37 |
test_gpkg .xz xz |
38 |
test_gpkg .zst zstd |
39 |
|
40 |
+test_makeself --gzip gzip |
41 |
+test_makeself --zstd zstd |
42 |
+test_makeself --bzip2 bzip2 |
43 |
+test_makeself --xz xz |
44 |
+test_makeself --lzo lzop |
45 |
+test_makeself --lz4 lz4 |
46 |
+test_makeself --compress compress |
47 |
+test_makeself --base64 base64 |
48 |
+test_makeself --nocomp tar |
49 |
+ |
50 |
test_unpack test.zip test.in zip 'zip -q ${archive} ${TESTFILE}' |
51 |
# test handling non-adjusted zip with junk prepended |
52 |
test_unpack test.zip test.in zip \ |
53 |
-- |
54 |
2.37.3 |