diff options
author | 2019-11-04 13:18:41 +0900 | |
---|---|---|
committer | 2019-11-04 14:23:07 +0900 | |
commit | 04bbf98e069c35282ab904c154356f3f9755da97 (patch) | |
tree | dd4d30ddb860ca61789987f32aceeb07edf40bb1 /zip/zip_test.go | |
parent | f68f98eeb6374a865c8f40225eca7ca0cea46cad (diff) |
-l option soong_zip can accept a file having space separated list
-l option of soong_zip is used to specify the list of input files that
should be zipped. However, it only accepted newline-separated list in the
file. This prevented us from using a rspfile as paths in rspfile are
space-separated in a single line. Fixing the problem by splitting the
file content by any unicode whitespace character including newline and
space.
Test: zip_test
Change-Id: Iba572109e30c01540eacf20bd2794ba60c870fa3
Diffstat (limited to 'zip/zip_test.go')
-rw-r--r-- | zip/zip_test.go | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/zip/zip_test.go b/zip/zip_test.go index 84317d1b6..9705d6c49 100644 --- a/zip/zip_test.go +++ b/zip/zip_test.go @@ -46,7 +46,8 @@ var mockFs = pathtools.MockFs(map[string][]byte{ "dangling -> missing": nil, "a/a/d -> b": nil, "c": fileC, - "l": []byte("a/a/a\na/a/b\nc\n"), + "l_nl": []byte("a/a/a\na/a/b\nc\n"), + "l_sp": []byte("a/a/a a/a/b c"), "l2": []byte("missing\n"), "manifest.txt": fileCustomManifest, }) @@ -224,7 +225,19 @@ func TestZip(t *testing.T) { { name: "list", args: fileArgsBuilder(). - List("l"), + List("l_nl"), + compressionLevel: 9, + + files: []zip.FileHeader{ + fh("a/a/a", fileA, zip.Deflate), + fh("a/a/b", fileB, zip.Deflate), + fh("c", fileC, zip.Deflate), + }, + }, + { + name: "list", + args: fileArgsBuilder(). + List("l_sp"), compressionLevel: 9, files: []zip.FileHeader{ |