Commit b390c2c9 authored by Daniel Espinosa Ortiz's avatar Daniel Espinosa Ortiz

unit-test: prepare interactive/non-interactive testing

parent ccc7436e
option('vala-version', type: 'string', value : '0.44', description : 'Use another version of Vala (only the latest is officially supported)')
\ No newline at end of file
option('vala-version', type: 'string', value : '0.44', description : 'Use another version of Vala (only the latest is officially supported)')
option('ui-test-interactive', type: 'boolean', value : 'True', description : 'Makes UI tests interactive, so auto-close is disable')
\ No newline at end of file
[CCode (cheader_filename = "config.h")]
namespace TestConfig {
[CCode (cname = "INTERACTIVE")]
public bool INTERACTIVE;
}
\ No newline at end of file
conftl = configuration_data()
configure_file (input:'config.vapi.in',
output: 'config.vapi',
configuration: conftl,
)
confht = configuration_data ()
confht.set10('INTERACTIVE', get_option('ui-test-interactive'))
configure_file(output : 'config.h',
configuration : confht)
files_tests = files([
'parse.vala',
'namespace.vala',
......
......@@ -7,11 +7,19 @@ files_sv = files ([
])
tuisw = executable('sourceview', files_sv,
vala_args : [],
vala_args : [
'--vapidir', join_paths (meson.build_root(), 'tests'),
'--target-glib=2.58',
'--pkg','config'
],
dependencies : [ gvlsui_deps, gtktester, inc_rooth_dep],
link_with: [
lib, libui
]
],
c_args : [
'-include',
join_paths (meson.build_root(), 'tests', 'config.h'),
],
)
test ('sourceview', tuisw,
......@@ -26,11 +34,19 @@ files_svf = files ([
])
tuiswf = executable('sourceview-format', files_svf,
vala_args : [],
vala_args : [
'--vapidir', join_paths (meson.build_root(), 'tests'),
'--target-glib=2.58',
'--pkg','config'
],
dependencies : [ gvlsui_deps, gtktester, inc_rooth_dep],
link_with: [
lib, libui
]
],
c_args : [
'-include',
join_paths (meson.build_root(), 'tests', 'config.h'),
],
)
test ('sourceview-format', tuiswf,
......
......@@ -36,7 +36,7 @@ class Tests {
w.set_wrap_mode (Gtk.WrapMode.WORD);
w.set_auto_indent (true);
w.set_indent_on_tab (true);
win.waiting_for_event = true;
win.waiting_for_event = TestConfig.INTERACTIVE;
w.server = server;
win.widget = w;
win.add_test ("Syntax highligth", "keywords/types");
......
......@@ -86,7 +86,7 @@ public class App {
w.set_wrap_mode (Gtk.WrapMode.WORD);
w.set_auto_indent (true);
w.set_indent_on_tab (true);
win.waiting_for_event = true;
win.waiting_for_event = TestConfig.INTERACTIVE;
w.server = server;
win.widget = w;
win.add_test ("Parse pre-defined buffer with fields", "A text on view should be parsed. Try to use a symbol");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment