Commit Graph

21 Commits

Author SHA1 Message Date
Matthias Clasen
25696d67e3 Add tests for dconf utilities
Closes: #2880
Approved by: alexlarsson
2019-05-07 06:11:18 +00:00
Alexander Larsson
894151033f tests: Add tests for client-side filtering
Closes: #2869
Approved by: alexlarsson
2019-05-06 13:58:58 +00:00
Ryan Gonzalez
89a6782c55 utils: Add flatpak_strv_merge
Closes: #2775
Approved by: alexlarsson
2019-04-12 08:59:35 +00:00
Matthew Leeds
e8816b7663 Remove extra newlines in variable definiton blocks
Uncrustify has an option "nl_func_var_def_blk" which is supposed to
ensure there's a newline character between the block of variable
definitions and the rest of the function body, but it gets confused and
thinks that the first instance of "g_autoptr" or "g_auto" being used on
a variable is the start of the function body. So this commit removes
those extra newline characters and removes that option in uncrustify.cfg
so they don't get re-added the next time uncrustify is run.

Here's the command I used:

perl -0777 -i -pe 's/\n(\n\s*g_auto\()/\1/g' `git ls-tree --name-only
-r HEAD | grep \\\.[ch]$ | grep -v common/valgrind-private.h |
grep -v app/flatpak-polkit-agent-text-listener\\\.[ch]`

I ran it again with "g_autoptr" in place of "g_auto", and made a few
manual edits to add back the newline when the g_auto* was in the middle
of a function body rather than at the top.

Closes: #2715
Approved by: matthiasclasen
2019-02-25 18:12:30 +00:00
Matthew Leeds
8d962a686f Run uncrustify
I had to make a few manual edits but other than those the changes look
reasonable.

Closes: #2715
Approved by: matthiasclasen
2019-02-25 18:12:30 +00:00
Matthias Clasen
228ee0bd0a appdata: Ignore allowed attributes
We only interested in a few of the attributes of some
tags, but we shouldn't fail if other valid attributes
are present.

Add some of the allowed attributes to the <release> element
in the appdata test and verify that we can still parse it.

The appstream spec is here:
https://www.freedesktop.org/software/appstream/docs/

Closes: #2674
Approved by: matthiasclasen
2019-02-02 00:52:32 +00:00
Matthias Clasen
ac14058d9a Update tests to match new output
Our tests notice the string changes in the previous commit.

Closes: #2624
Approved by: matthiasclasen
2019-01-23 12:45:00 +00:00
Matthias Clasen
1c831c131f Test appdata date parsing
Add a few dates to our appdata testdata,
and verify the results.

Closes: #2619
Approved by: alexlarsson
2019-01-21 08:46:57 +00:00
Matthias Clasen
e7172516a0 Add one more name matching test
This one is from #2615 and does not work.

Closes: #2616
Approved by: alexlarsson
2019-01-21 08:27:09 +00:00
Matthias Clasen
9fccb90f26 Add some tests for name matching
These examples are taken from commit 8f428fd768

Closes: #2616
Approved by: alexlarsson
2019-01-21 08:27:09 +00:00
Simon McVittie
7c3140bb7a testcommon: An i386 Flatpak doesn't support x86_64 apps
The compatible architectures are not symmetric: x86_64 and aarch64 can
run i386 and arm binaries, but i386 and arm cannot usually run x86_64
and aarch64 binaries.

This caused test failures on Debian i386 autobuilders.

Signed-off-by: Simon McVittie <smcv@collabora.com>

Closes: #2603
Approved by: matthiasclasen
2019-01-16 12:51:32 +00:00
Alexander Larsson
a143161131 tests: Fix tests on intel gpus
We can't assume have-intel-gpu is not true!

Closes: #2589
Approved by: alexlarsson
2019-01-14 16:48:32 +00:00
Matthias Clasen
7a6e52eca8 Add tests for appdata parsing
Closes: #2580
Approved by: alexlarsson
2019-01-14 15:06:41 +00:00
Matthias Clasen
bd6f71a3c8 Update colum tests
We have tests for internal apis now, and they
catch when we change those apis. Yay.

Closes: #2460
Approved by: alexlarsson
2019-01-14 13:35:56 +00:00
Matthias Clasen
4f6f9dda1c Add tests for number parsing
Closes: #2578
Approved by: matthiasclasen
2019-01-12 02:05:05 +00:00
Matthias Clasen
ccd602dd19 Fix a compiler warning
The largest warning ever. Go clang!

Closes: #2498
Approved by: matthiasclasen
2019-01-11 18:32:45 +00:00
Matthias Clasen
0360fa84ef Adapt format_choices tests
The formatting has changed, and our tests catch that. Yay!
Also fix the build with glib master.

Closes: #2498
Approved by: matthiasclasen
2019-01-11 18:32:45 +00:00
Matthias Clasen
9e27fc67fe testcommon: Add another table ellipsization test
This tests the situation when we can't accommodate
the requested width with the available shrinkage.

This used to cause an infinite loop in the table
printer.

Closes: #2498
Approved by: matthiasclasen
2019-01-11 18:32:45 +00:00
Matthias Clasen
b095ca8ac6 datetime tests
Closes: #2498
Approved by: matthiasclasen
2019-01-11 18:32:45 +00:00
Matthias Clasen
16cf081f97 tests: Add tests for app helpers
Link testcommon against libflatpak-app.la and
add tests for some utility functions.

Closes: #2498
Approved by: matthiasclasen
2019-01-11 18:32:44 +00:00
Matthias Clasen
46e1f8f3b0 Add a test for some private utilities
Add another test that links against libflatpak-common.la
and tests functions that are not part of the public
library api.

Closes: #2498
Approved by: matthiasclasen
2019-01-11 18:32:44 +00:00