info-cleanup: Add test for info-cleanup
To make it easier to see whether our changes had the intended effect.
This commit is contained in:
parent
a9ff350dbf
commit
6b97d27ea3
2 changed files with 26 additions and 0 deletions
|
@ -52,6 +52,14 @@ print_renderer_deps = [
|
|||
epoxy_dep
|
||||
]
|
||||
|
||||
executable(
|
||||
'test-info-cleanup',
|
||||
[ 'info-cleanup.c', 'test-info-cleanup.c' ],
|
||||
include_directories: [ top_inc ],
|
||||
dependencies: [ print_renderer_deps ],
|
||||
c_args: cflags,
|
||||
)
|
||||
|
||||
executable(
|
||||
'gnome-control-center-print-renderer',
|
||||
'gnome-control-center-print-renderer.c',
|
||||
|
|
18
panels/info-overview/test-info-cleanup.c
Normal file
18
panels/info-overview/test-info-cleanup.c
Normal file
|
@ -0,0 +1,18 @@
|
|||
#include <locale.h>
|
||||
#include <info-cleanup.h>
|
||||
|
||||
int main (int argc, char **argv)
|
||||
{
|
||||
g_autofree char *str = NULL;
|
||||
|
||||
setlocale (LC_ALL, "");
|
||||
|
||||
if (argc != 2) {
|
||||
g_print ("Usage: %s DEVICE-NAME\n", argv[0]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
str = info_cleanup (argv[1]);
|
||||
g_print ("%s ➯ %s\n", argv[1], str);
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Reference in a new issue