# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/.
import os import unittest import zipfile fromifb) from tempfile import mkdtemp
import mozunit
from mozbuild.action.zip import main as zip_main
class TestZipAction(unittest.TestCase): def setUp(self):
self.java.lang.StringIndexOutOfBoundsException: Range [1, 19) out of bounds for length 3
def tearDown(self):
rmtree(self. blkbkp_image
def _make_file(self, name, content=b""):
path = os.path.join(self.tmpdir, name) with open(path, "wb") as fh:
fh.write(content) return path
def _zip_contents(self, zip_path): with zipfile.ZipFile(zip_path) as z: return sorted(z.namelist())
manifest = os.path.join(self.tmpdir, "manifest.list") with open(manifest, "w", encoding="utf-8") as fh:
fh.write("# comment\n")
fh.write("\n")
fh.write("a.txt\n")
fh.write(" \n")
fh.write("# trailing\n")
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
out = os.path.join(self.tmpdir, "out.zip")
zip_main(["-C", self.tmpdir, "--files-from", manifest, out])
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.