diff options
author | y <rtmitchell@google.com> | 2018-04-11 09:54:56 -0700 |
---|---|---|
committer | y <rtmitchell@google.com> | 2018-04-11 15:52:43 -0700 |
commit | d6b83299a6d636c67fee8bd4ae07555a9ae2269a (patch) | |
tree | 3ba4327af7207a6a57c2375f87cdda1804651d08 /tools/aapt2/integration-tests | |
parent | 65317bac02e993d1313a1958a8497ff5f2a2ecd5 (diff) |
AAPT: Multiple period legacy support and errors
AAPT would accept files with multiple periods in the filename as input.
This lead to cases explained in b/74999475. This change adds error
messages for files with multiple periods unless the legacy flag is
present. With the legacy flag present, AAPT2 will behave like AAPT
rather than throwing an error.
Test: Added tests to aapt2_tests
Bug: 73071563
Bug: 74999475
Change-Id: I28dfceeea7b39f8e4b9e6671e0fc8793cf388f52
Diffstat (limited to 'tools/aapt2/integration-tests')
-rw-r--r-- | tools/aapt2/integration-tests/CompileTest/res/drawable/image.9.png | bin | 0 -> 103 bytes | |||
-rw-r--r-- | tools/aapt2/integration-tests/CompileTest/res/drawable/image.png | bin | 0 -> 103 bytes | |||
-rw-r--r-- | tools/aapt2/integration-tests/CompileTest/res/drawable/image.small.9.png | bin | 0 -> 103 bytes | |||
-rw-r--r-- | tools/aapt2/integration-tests/CompileTest/res/drawable/image.small.png | bin | 0 -> 103 bytes | |||
-rw-r--r-- | tools/aapt2/integration-tests/CompileTest/res/values/values.all.xml | 18 | ||||
-rw-r--r-- | tools/aapt2/integration-tests/CompileTest/res/values/values.xml | 18 |
6 files changed, 36 insertions, 0 deletions
diff --git a/tools/aapt2/integration-tests/CompileTest/res/drawable/image.9.png b/tools/aapt2/integration-tests/CompileTest/res/drawable/image.9.png Binary files differnew file mode 100644 index 000000000000..1a3731bbc8b8 --- /dev/null +++ b/tools/aapt2/integration-tests/CompileTest/res/drawable/image.9.png diff --git a/tools/aapt2/integration-tests/CompileTest/res/drawable/image.png b/tools/aapt2/integration-tests/CompileTest/res/drawable/image.png Binary files differnew file mode 100644 index 000000000000..1a3731bbc8b8 --- /dev/null +++ b/tools/aapt2/integration-tests/CompileTest/res/drawable/image.png diff --git a/tools/aapt2/integration-tests/CompileTest/res/drawable/image.small.9.png b/tools/aapt2/integration-tests/CompileTest/res/drawable/image.small.9.png Binary files differnew file mode 100644 index 000000000000..1a3731bbc8b8 --- /dev/null +++ b/tools/aapt2/integration-tests/CompileTest/res/drawable/image.small.9.png diff --git a/tools/aapt2/integration-tests/CompileTest/res/drawable/image.small.png b/tools/aapt2/integration-tests/CompileTest/res/drawable/image.small.png Binary files differnew file mode 100644 index 000000000000..1a3731bbc8b8 --- /dev/null +++ b/tools/aapt2/integration-tests/CompileTest/res/drawable/image.small.png diff --git a/tools/aapt2/integration-tests/CompileTest/res/values/values.all.xml b/tools/aapt2/integration-tests/CompileTest/res/values/values.all.xml new file mode 100644 index 000000000000..62ab6526ef7e --- /dev/null +++ b/tools/aapt2/integration-tests/CompileTest/res/values/values.all.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2018 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<resources> +</resources>
\ No newline at end of file diff --git a/tools/aapt2/integration-tests/CompileTest/res/values/values.xml b/tools/aapt2/integration-tests/CompileTest/res/values/values.xml new file mode 100644 index 000000000000..62ab6526ef7e --- /dev/null +++ b/tools/aapt2/integration-tests/CompileTest/res/values/values.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2018 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<resources> +</resources>
\ No newline at end of file |