diff options
author | Forkk <forkk@forkk.net> | 2014-01-02 13:38:20 -0600 |
---|---|---|
committer | Forkk <forkk@forkk.net> | 2014-01-02 13:38:20 -0600 |
commit | 17f1864a71b69b9df14d8e06ed48a65e678d09c9 (patch) | |
tree | 4d98a2b3493a26017150d6ba8c5ae0419de3de7d /tests/data | |
parent | 4495e20cd7f7f2ab062f3b60f19ac4b79f32c350 (diff) | |
parent | aa5f2c8120cc23de0d57c9f0280512adb9a531b3 (diff) | |
download | MultiMC-17f1864a71b69b9df14d8e06ed48a65e678d09c9.tar MultiMC-17f1864a71b69b9df14d8e06ed48a65e678d09c9.tar.gz MultiMC-17f1864a71b69b9df14d8e06ed48a65e678d09c9.tar.lz MultiMC-17f1864a71b69b9df14d8e06ed48a65e678d09c9.tar.xz MultiMC-17f1864a71b69b9df14d8e06ed48a65e678d09c9.zip |
Merge branch 'develop' of github.com:MultiMC/MultiMC5 into feature_news
Conflicts:
CMakeLists.txt
gui/MainWindow.h
Diffstat (limited to 'tests/data')
-rw-r--r-- | tests/data/.gitattributes | 2 | ||||
-rw-r--r-- | tests/data/1.json | 43 | ||||
-rw-r--r-- | tests/data/2.json | 31 | ||||
-rw-r--r-- | tests/data/CMakeLists.txt | 4 | ||||
-rw-r--r-- | tests/data/channels.json | 23 | ||||
-rw-r--r-- | tests/data/errorChannels.json | 23 | ||||
-rw-r--r-- | tests/data/fileOneA | 1 | ||||
-rw-r--r-- | tests/data/fileOneB | 3 | ||||
-rw-r--r-- | tests/data/fileThree | 1 | ||||
-rw-r--r-- | tests/data/fileTwo | 1 | ||||
-rw-r--r-- | tests/data/garbageChannels.json | 22 | ||||
-rw-r--r-- | tests/data/index.json | 9 | ||||
-rw-r--r-- | tests/data/noChannels.json | 5 | ||||
-rw-r--r-- | tests/data/oneChannel.json | 11 | ||||
-rw-r--r-- | tests/data/tst_DownloadUpdateTask-test_writeInstallScript.xml | 17 |
15 files changed, 192 insertions, 4 deletions
diff --git a/tests/data/.gitattributes b/tests/data/.gitattributes new file mode 100644 index 00000000..9ac803f0 --- /dev/null +++ b/tests/data/.gitattributes @@ -0,0 +1,2 @@ +* -text -diff + diff --git a/tests/data/1.json b/tests/data/1.json new file mode 100644 index 00000000..f9f99b22 --- /dev/null +++ b/tests/data/1.json @@ -0,0 +1,43 @@ +{ + "ApiVersion": 0, + "Id": 1, + "Name": "1.0.1", + "Files": [ + { + "Path": "fileOne", + "Sources": [ + { + "SourceType": "http", + "Url": "$PWD/tests/data/fileOneA" + } + ], + "Executable": true, + "Perms": 493, + "MD5": "9eb84090956c484e32cb6c08455a667b" + }, + { + "Path": "fileTwo", + "Sources": [ + { + "SourceType": "http", + "Url": "$PWD/tests/data/fileTwo" + } + ], + "Executable": false, + "Perms": 644, + "MD5": "38f94f54fa3eb72b0ea836538c10b043" + }, + { + "Path": "fileThree", + "Sources": [ + { + "SourceType": "http", + "Url": "$PWD/tests/data/fileThree" + } + ], + "Executable": false, + "Perms": "750", + "MD5": "f12df554b21e320be6471d7154130e70" + } + ] +} diff --git a/tests/data/2.json b/tests/data/2.json new file mode 100644 index 00000000..bb59b9b6 --- /dev/null +++ b/tests/data/2.json @@ -0,0 +1,31 @@ +{ + "ApiVersion": 0, + "Id": 1, + "Name": "1.0.1", + "Files": [ + { + "Path": "fileOne", + "Sources": [ + { + "SourceType": "http", + "Url": "$PWD/tests/data/fileOneB" + } + ], + "Executable": true, + "Perms": 493, + "MD5": "42915a71277c9016668cce7b82c6b577" + }, + { + "Path": "fileTwo", + "Sources": [ + { + "SourceType": "http", + "Url": "$PWD/tests/data/fileTwo" + } + ], + "Executable": false, + "Perms": 644, + "MD5": "38f94f54fa3eb72b0ea836538c10b043" + } + ] +} diff --git a/tests/data/CMakeLists.txt b/tests/data/CMakeLists.txt deleted file mode 100644 index eee5a596..00000000 --- a/tests/data/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -add_custom_target(MultiMC_Test_Data - ALL - COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} -) diff --git a/tests/data/channels.json b/tests/data/channels.json new file mode 100644 index 00000000..6bf65a82 --- /dev/null +++ b/tests/data/channels.json @@ -0,0 +1,23 @@ +{ + "format_version": 0, + "channels": [ + { + "id": "develop", + "name": "Develop", + "description": "The channel called \"develop\"", + "url": "$PWD/tests/data/" + }, + { + "id": "stable", + "name": "Stable", + "description": "It's stable at least", + "url": "ftp://username@host/path/to/stuff" + }, + { + "id": "42", + "name": "The Channel", + "description": "This is the channel that is going to answer all of your questions", + "url": "https://dent.me/tea" + } + ] +} diff --git a/tests/data/errorChannels.json b/tests/data/errorChannels.json new file mode 100644 index 00000000..333cd445 --- /dev/null +++ b/tests/data/errorChannels.json @@ -0,0 +1,23 @@ +{ + "format_version": 0, + "channels": [ + { + "id": "", + "name": "Develop", + "description": "The channel called \"develop\"", + "url": "http://example.org/stuff" + }, + { + "id": "stable", + "name": "", + "description": "It's stable at least", + "url": "ftp://username@host/path/to/stuff" + }, + { + "id": "42", + "name": "The Channel", + "description": "This is the channel that is going to answer all of your questions", + "url": "" + } + ] +} diff --git a/tests/data/fileOneA b/tests/data/fileOneA new file mode 100644 index 00000000..f2e41136 --- /dev/null +++ b/tests/data/fileOneA @@ -0,0 +1 @@ +stuff diff --git a/tests/data/fileOneB b/tests/data/fileOneB new file mode 100644 index 00000000..f9aba922 --- /dev/null +++ b/tests/data/fileOneB @@ -0,0 +1,3 @@ +stuff + +more stuff that came in the new version diff --git a/tests/data/fileThree b/tests/data/fileThree new file mode 100644 index 00000000..6353ff16 --- /dev/null +++ b/tests/data/fileThree @@ -0,0 +1 @@ +this is yet another file diff --git a/tests/data/fileTwo b/tests/data/fileTwo new file mode 100644 index 00000000..aad9a93a --- /dev/null +++ b/tests/data/fileTwo @@ -0,0 +1 @@ +some other stuff diff --git a/tests/data/garbageChannels.json b/tests/data/garbageChannels.json new file mode 100644 index 00000000..1450fb9c --- /dev/null +++ b/tests/data/garbageChannels.json @@ -0,0 +1,22 @@ +{ + "format_version": 0, + "channels": [ + { + "id": "develop", + "name": "Develop", + "description": "The channel called \"develop\"", +aa "url": "http://example.org/stuff" + }, +a "id": "stable", + "name": "Stable", + "description": "It's stable at least", + "url": "ftp://username@host/path/to/stuff" + }, + { + "id": "42"f + "name": "The Channel", + "description": "This is the channel that is going to answer all of your questions", + "url": "https://dent.me/tea" + } + ] +} diff --git a/tests/data/index.json b/tests/data/index.json new file mode 100644 index 00000000..20ceb9f4 --- /dev/null +++ b/tests/data/index.json @@ -0,0 +1,9 @@ +{ + "ApiVersion": 0, + "Versions": [ + { "Id": 0, "Name": "1.0.0" }, + { "Id": 1, "Name": "1.0.1" }, + { "Id": 2, "Name": "1.0.2" }, + { "Id": 3, "Name": "1.0.3" } + ] +} diff --git a/tests/data/noChannels.json b/tests/data/noChannels.json new file mode 100644 index 00000000..bbb2cb70 --- /dev/null +++ b/tests/data/noChannels.json @@ -0,0 +1,5 @@ +{ + "format_version": 0, + "channels": [ + ] +} diff --git a/tests/data/oneChannel.json b/tests/data/oneChannel.json new file mode 100644 index 00000000..84727ac7 --- /dev/null +++ b/tests/data/oneChannel.json @@ -0,0 +1,11 @@ +{ + "format_version": 0, + "channels": [ + { + "id": "develop", + "name": "Develop", + "description": "The channel called \"develop\"", + "url": "http://example.org/stuff" + } + ] +} diff --git a/tests/data/tst_DownloadUpdateTask-test_writeInstallScript.xml b/tests/data/tst_DownloadUpdateTask-test_writeInstallScript.xml new file mode 100644 index 00000000..09c162ca --- /dev/null +++ b/tests/data/tst_DownloadUpdateTask-test_writeInstallScript.xml @@ -0,0 +1,17 @@ +<update version="3"> + <install> + <file> + <source>sourceOne</source> + <dest>destOne</dest> + <mode>0777</mode> + </file> + <file> + <source>MultiMC.exe</source> + <dest>M/u/l/t/i/M/C/e/x/e</dest> + <mode>0644</mode> + </file> + </install> + <uninstall> + <file>toDelete.abc</file> + </uninstall> +</update> |