bug 361583, add testcases for jar.mn, r=ted.mielczarek

This commit is contained in:
Axel Hecht 2008-06-13 16:41:43 +02:00
parent eb3091850d
commit 6203b27834
17 changed files with 139 additions and 1 deletions

View File

@ -63,6 +63,7 @@ config/Makefile
config/autoconf.mk
config/mkdepend/Makefile
config/doxygen.cfg
config/tests/src-simple/Makefile
probes/Makefile
extensions/Makefile
"

View File

@ -155,8 +155,15 @@ endif
PYUNITS := unit-Expression.py unit-Preprocessor.py
check::
check:: check-preprocessor check-jar-mn
check-preprocessor::
@$(EXIT_ON_ERROR) \
for test in $(PYUNITS); do \
$(PYTHON) $(srcdir)/tests/$$test ; \
done
check-jar-mn::
make -C tests/src-simple check-jar
make -C tests/src-simple check-flat
make -C tests/src-simple check-symlink

View File

@ -0,0 +1 @@
<?xml version="1.0"><doc/>

View File

@ -0,0 +1,2 @@
This is ab-X-stuff.

View File

@ -0,0 +1,6 @@
#div: {
/* this is a ID rule, and should stay intact */
}
[lang=ab-X-stuff] {
/* this selector should match content with lang="ab-X-stuff" */
}

View File

@ -0,0 +1 @@
localized content

View File

@ -0,0 +1 @@
<?xml version="1.0"><otherdoc/>

View File

@ -0,0 +1,70 @@
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Mozilla Foundation.
# Portions created by the Initial Developer are Copyright (C) 2008
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Axel Hecht <axel@pike.org>
#
# Alternatively, the contents of this file may be used under the terms of
# either of the GNU General Public License Version 2 or later (the "GPL"),
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
LOCALE_SRCDIR = $(srcdir)/l10n
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/config.mk
XPI_NAME = test_jar_mn
DEFINES += \
-DAB_CD=ab-X-stuff \
$(NULL)
check-%::
if test -d $(FINAL_TARGET); then rm -rf $(FINAL_TARGET); fi;
make realchrome MOZ_CHROME_FILE_FORMAT=$*
@echo "Comparing manifests..."
@if ! sort $(FINAL_TARGET)/chrome/test.manifest | diff -u $(srcdir)/../test.manifest.$* - ; then \
echo "FAIL: different content in manifest!" ; \
fi
@if [ $* == "jar" ]; then \
$(UNZIP) -d $(FINAL_TARGET)/chrome/test $(FINAL_TARGET)/chrome/test.jar; \
fi
@echo "Comparing packages..."
@if ! diff -ur $(srcdir)/../ref-simple $(FINAL_TARGET)/chrome/test ; then\
echo "FAIL: different content in jar!" ; \
fi
include $(topsrcdir)/config/rules.mk

View File

@ -0,0 +1,22 @@
#filter substitution
test.jar:
# test chrome with flags and path expansion
% content test %one xpcnativewrappers=no
# test locale with variable substitution and path expansion
% locale @AB_CD@ %three
# test overlays
% overlay chrome://one/file.xml chrome://two/otherfile.xml
# test regular file, preprocessed file, preprocessed css
one/file.xml (thesrcdir/file.xml)
* one/preproc (thesrcdir/preproc.in)
* one/some.css (thesrcdir/some.css)
# test reference against topsrcdir
two/otherfile.xml (/config/tests/src-simple/thetopsrcdir/otherfile.xml)
# test reference against localesrcdir
three/l10nfile.txt (%l10nfile.txt)
test.jar:
# test manifest update the locale one was already added above, add skin
% locale @AB_CD@ %three
% skin test classic %one

View File

@ -0,0 +1 @@
localized content

View File

@ -0,0 +1 @@
<?xml version="1.0"><doc/>

View File

@ -0,0 +1,6 @@
# This would be an processed out
# pretty lengthy
# license header.
# For example.
#expand This is __AB_CD__.

View File

@ -0,0 +1,6 @@
#div: {
/* this is a ID rule, and should stay intact */
}
%expand [lang=__AB_CD__] {
/* this selector should match content with lang="ab-X-stuff" */
}

View File

@ -0,0 +1 @@
<?xml version="1.0"><otherdoc/>

View File

@ -0,0 +1,4 @@
content test test/one xpcnativewrappers=no
locale ab-X-stuff test/three
overlay chrome://one/file.xml chrome://two/otherfile.xml
skin test classic test/one

View File

@ -0,0 +1,4 @@
content test jar:test.jar!/one xpcnativewrappers=no
locale ab-X-stuff jar:test.jar!/three
overlay chrome://one/file.xml chrome://two/otherfile.xml
skin test classic jar:test.jar!/one

View File

@ -0,0 +1,4 @@
content test test/one xpcnativewrappers=no
locale ab-X-stuff test/three
overlay chrome://one/file.xml chrome://two/otherfile.xml
skin test classic test/one