97 Commits

Author SHA1 Message Date
TheAssassin
5685bc575e Test invalid headers and missing files in ELF library
CC #185.
2021-11-30 00:08:52 +01:00
TheAssassin
d621d3949d Refactor and simplify tests config in CMake 2021-11-30 00:05:15 +01:00
TheAssassin
9aa59f3e75 Improve detection of excluded test targets, mk. 2 2021-11-20 01:58:28 +01:00
TheAssassin
39ab9909cf Fix test executable discovery 2021-11-20 01:35:16 +01:00
TheAssassin
789222bae6 Test that deployment actually works 2021-10-16 03:40:43 +02:00
TheAssassin
7e3beb4336 Add new test to check minimum permissions 2021-10-16 03:37:22 +02:00
TheAssassin
63d2fa5437 Add minimum permissions to copied files
Fixes #181.
2021-10-16 03:22:02 +02:00
TheAssassin
3c6096433d Detect dynamically linked and debug symbols only ELF files
TODO: extract ELF stuff into new small C++ wrapper library that can be used in various places (e.g., AppImageLauncher, the AppImage runtime, ...)
2021-05-29 01:19:42 +02:00
TheAssassin
7b1c858ff5 Fix macro like in linuxdeploy-desktopfile 2021-05-14 08:33:28 +02:00
TheAssassin
d26947985d Add tests only if they are built and can therefore be run 2019-09-06 03:13:05 +02:00
TheAssassin
32dca18eee We don't use exceptions for error communication 2019-03-20 17:22:46 +01:00
TheAssassin
5374e7ece9 Switch to extracted desktop file library 2018-12-22 23:09:04 +01:00
TheAssassin
6b715c691a Give test case more suitable name 2018-12-22 23:02:39 +01:00
TheAssassin
2ea9a367b5 Check whether parsing with comments is supported 2018-12-21 19:08:33 +01:00
TheAssassin
673ccf5691 Improve simple desktop file test 2018-12-21 19:08:33 +01:00
TheAssassin
cddefc3806 Validate some constraints on localized keys 2018-12-06 12:09:18 +01:00
TheAssassin
d486f936e2 Test localized keys support
This is the unit test that was missing to cover the use case described
in #69.
2018-12-06 11:47:25 +01:00
TheAssassin
b974f44ffd Debug desktop file unit tests, mk.1
They're only broken on non-debug builds, so it's quite likely the
optimizations break the code.
2018-11-21 00:03:20 +01:00
TheAssassin
ecaeda4533 Deactivate unit tests that fail for no apparent reason on Travis CI
Will re-enable and debug them eventually. Right now, they prevent
binaries from being published, which is really a problem.
2018-11-19 22:25:20 +01:00
TheAssassin
ccfd05b5e0 Improve DesktopFile's comparison operators 2018-11-19 22:12:14 +01:00
TheAssassin
6cf9bc55a7 Fix comparison editor 2018-11-19 22:06:29 +01:00
TheAssassin
1e3e074f35 Properly copy desktop file reader 2018-11-19 22:06:08 +01:00
TheAssassin
be0a891770 Improve test fixture names 2018-11-15 23:45:42 +01:00
TheAssassin
92a1370b30 Be able to use EXPECT_EQ with DesktopFile objects
GoogleTest internally uses operator==(first, second) instead of
first.operator==(second). By implementing the operators outside the
classes, GoogleTest can be made happy.
2018-11-15 23:36:04 +01:00
TheAssassin
541da1b573 Test (in)equality operators 2018-11-15 23:32:36 +01:00
TheAssassin
f274de8045 Make sure default keys don't overwrite existing ones 2018-11-15 21:24:08 +01:00
TheAssassin
e4bf795211 No need for a string conversion operator
Doesn't make sense here anyway.
2018-11-15 20:44:43 +01:00
TheAssassin
e994eacfa0 Prevent unnecessary log messages in unit tests 2018-11-15 19:08:03 +01:00
TheAssassin
2e1a37ccf5 Fix path to test data 2018-11-15 18:05:08 +01:00
TheAssassin
520ac6de9b Reduce amount of implicit behavior in desktop file parser 2018-11-15 18:03:46 +01:00
TheAssassin
1bcdcab057 Restructure desktop file tests, build single binary 2018-11-15 17:58:02 +01:00
TheAssassin
4af76a92c5 Fix duplicate key detection 2018-11-15 13:41:53 +01:00
TheAssassin
d10e0614a1 Increase build speed of tests 2018-11-15 13:39:17 +01:00
TheAssassin
9707b81931 Fix basic format header checks 2018-11-15 13:14:31 +01:00
TheAssassin
21b12cc6b6 Use EXPECT instead of ASSERT 2018-11-15 13:01:10 +01:00
TheAssassin
b43b04f693 Check for valid and invalid keys (spec/basic format) 2018-11-15 01:29:14 +01:00
TheAssassin
61fb8bebdb Fix execution of desktop file tests 2018-11-15 00:58:56 +01:00
TheAssassin
002ba4a496 Split two checks to make sure they're tested separately
Otherwise, one test case is always uncovered (either the first one
passes and the second one triggers, or the first one triggers and the
second one is never tested).
2018-11-14 11:22:38 +01:00
TheAssassin
244d82fede Test behavior on lines with multiple = characters 2018-11-14 11:19:02 +01:00
TheAssassin
9f8121ebff Check whether invalid lines are recognized 2018-11-14 11:16:35 +01:00
TheAssassin
80adfa8872 Recognize broken section headings, mk. 4 2018-11-14 11:14:24 +01:00
TheAssassin
4a07c8151e Make sure errors are recognized in all sections, not just the first one 2018-11-14 11:10:34 +01:00
TheAssassin
ded20c162d Recognize broken section headings, mk. 3 2018-11-14 10:59:17 +01:00
TheAssassin
bf152a509b Recognize broken section headings, mk. 2 2018-11-14 10:46:48 +01:00
TheAssassin
dc8f446ca4 Recognize broken section headings, mk. 1 2018-11-14 10:41:47 +01:00
TheAssassin
fbc1d78122 Use custom exceptions for error handling 2018-11-14 10:31:41 +01:00
TheAssassin
e069f6cd22 Fix typos 2018-11-10 14:03:23 +01:00
TheAssassin
d6e6cac6e0 Move libraries into directories following package path 2018-11-10 01:43:36 +01:00
TheAssassin
a87fd648e0 Add dedicated test for values with spaces
CC @azubieta
2018-11-09 21:28:40 +01:00
TheAssassin
574a883733 Don't require desktop file's path to exist 2018-11-09 21:28:40 +01:00