Commit Graph

207 Commits

Author SHA1 Message Date
Peter Retzlaff
408050ffde Add tests to ensure empty, uncompressed files are put on the doNotCompress list.
Also, fix a bug where ext would retain its value from a previous
iteration of the loop, since we don't always overwrite it now.
2020-06-09 07:05:43 -04:00
Peter Retzlaff
05f81f9dd0 Change zero-byte-file tests so they test the correct behavior.
* The empty test file needs to be STORED in the testapp, so put it on
  the initial doNotCompress list.
* It needs to have a file extension that matches the NO_COMPRESS_PATTERN.
* assertNotSame tests for object equality, which doesn't work for String
  comparisons.
2020-06-09 07:05:43 -04:00
Connor Tumbleson
3f831c8221
refactor: copyright year should be year started, not current year 2020-04-11 06:33:05 -04:00
Frieder Bluemle
81ca785e02
Fix file header comment format 2020-02-29 17:37:46 -08:00
Daniel Malmqvist
dc312a5336 Fixes issue with decoding apk containing a zero byte 9patch 2019-09-19 13:34:06 +02:00
Connor Tumbleson
4aa933b31a
test: ensure we don't allow path traversal with win 2019-07-18 07:42:34 -04:00
Connor Tumbleson
342661cbaa
fix: correct license header on "DuplicateDexTest" 2019-07-14 07:30:41 -04:00
Connor Tumbleson
9edcc78ee5
style: clean test file 2019-07-14 07:29:32 -04:00
Daniel Malmqvist
d79724549c
Added new option to skip non classes[0-9]*.dex files 2019-07-14 07:17:20 -04:00
Connor Tumbleson
25a1cb02ef
fix: License 2019 update 2019-07-13 12:19:41 -04:00
Connor Tumbleson
5f43a1fbca
style: cleanup formatting 2019-06-01 09:27:41 -04:00
Adib Faramarzi
cfd50acd1d Add unit tests
- add APK file containing a simple app that tries to use coroutines every 2 seconds, and would fail with earlier versions of APKTool
- add unit test for decoding the app
2019-05-30 22:12:57 +04:30
Connor Tumbleson
3037024022 test: add 32,767 byte string for aapt2
- https://issuetracker.google.com/issues/73456167
2019-04-26 14:11:41 -04:00
Connor Tumbleson
4030e94cb3 test: aapt2 test for raw qmg file 2019-04-26 11:14:51 -04:00
Connor Tumbleson
95fe0f3f02 test: assert SDK_Q works with insane test value (10,000) 2019-04-24 18:46:48 -04:00
Connor Tumbleson
bc7302a52b
test: assert that vertical/horizontal divs are added if missing 2019-02-17 13:07:32 -05:00
Vincent Barthelemy
72368fc0d4 bug: reproduce the bug were array resources are decoded as style bag 2019-01-29 10:06:32 +01:00
Connor Tumbleson
cfea3e0831 build: initial attempt at getting travis windows support
build: force windows onto the bash environment

build: update permission (+x) of clean-test file

build: "bat" instead of "exe" extension

build: attempt to support long-path names on windows

build: another attempt at long filepaths on windows

build: force +x on scripts prior to execution

build: exit with return code of last command

build: dump out current path

build: dump out current path - part 2

fix: remove 5 chars from path to drop down from 260 windows max path

build: correct gradlew.bat path and remove unneeded lines

fix: remove long path global configuration

fix: restore PATH setting for windows env

build: PATH resets between scripts, fix for windows
2019-01-09 17:43:40 -05:00
Connor Tumbleson
c833a32a6e style: syntax changes for review 2019-01-04 18:05:51 -05:00
Connor Tumbleson
39faff0a21 test: allow aapt2 xsd test to run 2019-01-04 18:00:33 -05:00
Connor Tumbleson
a5cfe41a8f test: add test for aapt1/aapt2
- ignore aapt2 due to failure
2019-01-04 17:45:51 -05:00
Connor Tumbleson
0dfa6c4656 test: add test to ensure empty ids.xml are generated for aapt1/aapt2 2019-01-03 16:56:25 -05:00
Connor Tumbleson
bec8778d7a tests: update platformBuild* values to inherit from AndroidManifest 2018-12-18 18:07:40 -05:00
Connor Tumbleson
7a481f68e0
test: updates aapt1 tests to handle the new "compileSdk" attributes 2018-09-02 09:39:07 -04:00
Connor Tumbleson
b49bba19e4
test: don't enforce attribute order or compare attributes that don't exist 2018-09-02 09:37:59 -04:00
Connor Tumbleson
b7d33cb623 style: update license headers that are missing 2018 2018-08-23 16:14:24 -04:00
Connor Tumbleson
abdd536a18 test: add aapt1/aapt2 tests for "0byte" files 2018-07-20 15:21:44 -04:00
Connor Tumbleson
4bda4674f9 test: use correct "new" variable for tests 2018-07-20 15:20:39 -04:00
Connor Tumbleson
eecfc18c82 fix: add another example aapt1 version string 2018-07-02 11:37:55 -04:00
Connor Tumbleson
39ab6b636b test: add "$" leading resource test 2018-06-14 16:30:16 -04:00
Connor Tumbleson
06aa8db942
test: navigation resource test added 2018-06-12 08:22:10 -04:00
Connor Tumbleson
3879b90f76 test: add test for various aapt2 version strings 2018-04-19 17:10:10 -04:00
Connor Tumbleson
ba9b532283 test: add a test to confirm that mp3 file is stored (not compressed) 2018-04-12 12:00:38 -04:00
Connor Tumbleson
a073bad32d Revert "tests: update test to use new "noCompressAssets" property"
This reverts commit 653472d006.
2018-04-06 14:58:56 -04:00
Connor Tumbleson
923ae6e9b8 Revert "tests: refactor tests to use assertEquals instead of hacky assertTrue"
This reverts commit d6e3d013e7.
2018-04-06 14:58:48 -04:00
Connor Tumbleson
d6e3d013e7 tests: refactor tests to use assertEquals instead of hacky assertTrue 2018-04-05 17:07:55 -04:00
Connor Tumbleson
653472d006 tests: update test to use new "noCompressAssets" property 2018-04-05 17:07:55 -04:00
Connor Tumbleson
e679d71615
test: rename all resources towards new location 2018-04-03 07:24:00 -04:00
Connor Tumbleson
1713495ea7 aapt2: move test resources to math structure of tests 2018-03-05 11:00:47 -05:00
Connor Tumbleson
a693f316e0 aapt2: add test to confirm pkgId of 0x80 2018-03-05 10:29:58 -05:00
Connor Tumbleson
722870e6b9 aapt2: don't init XMLUnit if not using the full xml diff 2018-03-05 10:29:44 -05:00
Connor Tumbleson
646eb54102 aapt2: refactor testsuite
- split from aapt1/aapt2 (those that do building)
 - tests that just test decode (no aapt) split
 - categories for androlib/encdoers/util for various others
2018-02-28 15:11:39 -05:00
Connor Tumbleson
09148902ef aapt2: start of tests for aapt2 2018-02-28 13:27:13 -05:00
Connor Tumbleson
dc9d1866a5 test: rewrite test suite to use BaseTest extending 2018-02-22 11:22:41 -05:00
Connor Tumbleson
9e5df69d17 aapt2: remove unneeded newline 2018-02-22 11:22:40 -05:00
Connor Tumbleson
f57c73d421 aapt2: copy "BuildAndDecodeTest" to aapt2 for temporary testing 2018-02-22 11:22:40 -05:00
Connor Tumbleson
34a2d03b31
Support for applications with an empty resources.arsc file
- fixes #1730
2018-02-19 06:45:48 -05:00
Connor Tumbleson
9fc1ede991
License 2018 update 2018-02-16 08:26:53 -05:00
Connor Tumbleson
bca474272e Support for rebuilding root depth kotlin folder
- refs: #1703
2018-02-07 09:42:56 -05:00
Connor Tumbleson
895af9c975 refactor test 2017-12-14 14:07:32 -05:00
Connor Tumbleson
7d22fc66b5 Initial testing of private namespace
- added sample (removed attribute names)
2017-12-14 10:55:35 -05:00
Connor Tumbleson
d46ba2fb82 add small test for #1157 2017-12-13 14:41:36 -05:00
Connor Tumbleson
23486830a9 Passing test for #1587
- fixes #1587
 - refs: 0fa6418553
2017-12-07 17:10:30 -05:00
Connor Tumbleson
d414bbd3b4 add unit-tests for 1680 2017-12-07 16:38:38 -05:00
Connor Tumbleson
ee2b7206f1
Add test for #1674 2017-11-29 07:43:45 -05:00
Connor Tumbleson
0a3adab84c Add test changes to detect encoding of raw font files
- refs #1662
2017-11-23 06:48:56 -05:00
Connor Tumbleson
3ec4f360ab
Add support for shorthand SDK for bounding check
- fixes #1630
2017-09-28 08:23:02 -04:00
Connor Tumbleson
bc00cce9bd Add support for 4 non-positional attributes
- adds tests
 - fixes #1611
2017-09-19 17:02:42 -04:00
Connor Tumbleson
f0f87c844e Adds ability to skip asset files
- fixes #1605
 - prevents rebuild
2017-09-19 15:51:04 -04:00
Connor Tumbleson
dc33533d76 add tests, make public method 2017-09-19 15:09:25 -04:00
Connor Tumbleson
a0ae7eaea8
Skip any file attempting to use relative paths
- fixes #1589
2017-09-03 18:12:57 -04:00
Connor Tumbleson
67b2325136
add font test 2017-08-24 22:49:43 -04:00
Connor Tumbleson
800394cf30 new qualifiers require v26 naming 2017-08-23 17:53:33 -04:00
Connor Tumbleson
adeffe3e98 Initial work at qualifier test suite changes 2017-08-23 17:04:26 -04:00
Connor Tumbleson
68a7eb7a74 example applications (sparse & not) tests
- update ARSCDecoder to detail sparse applications
2017-08-23 14:43:57 -04:00
Connor Tumbleson
a1cb15d721 add additional tests for (json/png) deflated unknown files 2017-08-15 17:01:53 -04:00
Connor Tumbleson
0f0ec681b7 Detect root file path on windows vs others 2017-07-26 08:22:27 -04:00
Connor Tumbleson
1c0d6abb75 update license headers 2017-07-05 12:45:51 -04:00
Connor Tumbleson
02c8b62b00 Prevent malicious directory/file work with unknown files 2017-07-05 12:45:17 -04:00
Connor Tumbleson
1597c12472 changed all license files 2017-07-05 12:05:52 -04:00
Connor Tumbleson
2a1160f720 Add unit test for kotlin applications 2017-07-04 09:55:50 -04:00
Connor Tumbleson
28848319af
Skip resources for test 2017-06-11 17:40:25 -04:00
Marvin Killing
4ce8a00180 Merge branch 'master' into issue-1498 2017-06-09 22:56:04 +02:00
Connor Tumbleson
dab59a2aec
Adding a few random AOSP 9 patch images to more test suite more robust. 2017-06-09 08:20:41 -04:00
Connor Tumbleson
b6751f893c add test for #1511 2017-06-08 16:51:16 -04:00
Connor Tumbleson
e794508869
cleanup tests 2017-05-27 15:23:39 -04:00
Connor Tumbleson
f19317d87c
Prevent doctypes declarations 2017-05-27 15:12:54 -04:00
Connor Tumbleson
c3ea300b96
Add unit-test for #1508 2017-05-25 07:02:10 -04:00
Marvin Killing
f979f202c7 Add failing test for #1498 2017-05-09 21:54:37 +02:00
Connor Tumbleson
b09dce4050
Prevent loading styles if style position is outside of string
- fixes #1453
2017-05-08 09:03:13 -04:00
Connor Tumbleson
015f3a734b
Add unit test for #1456 2017-05-08 08:34:03 -04:00
Connor Tumbleson
2d5337d3cb
Keep baksmali options same as previous apktool 2017-04-25 08:42:01 -04:00
Connor Tumbleson
1b55105042
Skip UTF8 test on Windows
- fixes #1414
2017-01-19 06:12:41 -05:00
Connor Tumbleson
b60db0917d
Add support for 3 non-positional attributes
- fixes #1360 & fixes #1405
 - add tests
2017-01-13 07:06:38 -05:00
Connor Tumbleson
0571cccaff Merge pull request #1395 from iBotPeaches/issue/1394
Refactor ExtFile to brut.j.dir
2016-12-29 09:34:37 -05:00
Connor Tumbleson
78a7724725 manually replace %20 w/ space 2016-12-25 08:47:20 -05:00
Connor Tumbleson
891d0d39e0 Refactor ExtFile to brut.j.dir
- move to using Paths when possible
 - adapt calls to FileDirectory to leverage Paths
2016-12-25 07:57:41 -05:00
Connor Tumbleson
b6127d2a31 Ignore filename checks to allow unicode filenames
- fixes #1369
 - aapt binaries for mac osx
2016-12-24 07:45:54 -05:00
Connor Tumbleson
5798c9200f Add unit-test (no unicode)
- #1369
2016-12-02 14:28:06 -05:00
Connor Tumbleson
76eb39b8c6
Add passing unit-test for #1298 2016-08-10 09:24:48 -04:00
Connor Tumbleson
3a982948ea
Adds full filepath for STORED files in case of multiple extensions
- fixes #1244
 - prevents greedy extension check STORE`ing too many files
2016-07-29 09:21:52 -04:00
Connor Tumbleson
3c41d44d8c
add failing test (skipped) for #1274 2016-06-21 07:23:41 -04:00
Connor Tumbleson
c389139434
Handles APKs with missing versionCode/versionName properties
- fixes #1264
2016-06-08 07:24:27 -04:00
Connor Tumbleson
a7f3e9b4d0 add unit-test for #1234 2016-04-29 07:07:33 -04:00
Connor Tumbleson
87315af36e Remove previous android:debuggable value to allow changing
- adds unit test
 - normalizeNewlines moved to TestUtils
2016-04-28 08:31:36 -04:00
Connor Tumbleson
8689991626 clear /apktool/framework/1.apk in between tests 2016-04-27 07:37:14 -04:00
Connor Tumbleson
d05dc3296a update tests for new internal framework 2016-04-23 15:12:21 -04:00
Connor Tumbleson
fc43ec2470 unit test to check image color of 9patch 2016-03-24 08:14:20 -04:00
Connor Tumbleson
ea2c821fa5 Add support for AndResGuard
- fixes #1170
2016-03-10 09:29:49 -05:00
Connor Tumbleson
f3e21023ac Prefix integers only exceeding 9 digits to treat as string
- This prevents small numbers like "1" to become "\ 1"
 - added unit tests
 - fixes #1130
2016-02-10 08:05:54 -05:00