tests: add tests for action widget syntax

This commit is contained in:
Gleb Smirnov 2022-02-18 19:04:08 +03:00
parent 736681a841
commit d9ef1d4df9
No known key found for this signature in database
GPG key ID: 559DB6D1D625EFAB
17 changed files with 120 additions and 0 deletions

View file

@ -0,0 +1,8 @@
using Gtk 4.0;
Dialog {
[action response=17.9]
Button float_response_button {
}
}

View file

@ -0,0 +1 @@
4,22,4,Response type must be GtkResponseType member or integer, not float

View file

@ -0,0 +1,8 @@
using Gtk 4.0;
Dialog {
[action response=cancel]
Button {
label: _("Cancel");
}
}

View file

@ -0,0 +1 @@
4,13,15,Action widget must have ID

View file

@ -0,0 +1,13 @@
using Gtk 4.0;
Dialog {
[action response=yes default]
Button yes_button {
}
[action response=no default]
Button no_button {
}
}

View file

@ -0,0 +1 @@
9,25,7,Default response is already set

View file

@ -0,0 +1,8 @@
using Gtk 4.0;
Dialog {
[action response = -179]
Button numeric_response_button {
}
}

View file

@ -0,0 +1 @@
4,24,4,Numeric response type can't be negative

View file

@ -0,0 +1,8 @@
using Gtk 4.0;
Dialog {
[some_type response=ok]
Button ok_button {
}
}

View file

@ -0,0 +1 @@
4,16,11,Only action widget can have response ID

View file

@ -0,0 +1,8 @@
using Gtk 4.0;
Box {
[action response=ok]
Button ok_button {
}
}

View file

@ -0,0 +1 @@
4,13,11,Gtk.Box is not a Gtk.Dialog, so it doesn't have action widgets

View file

@ -0,0 +1,8 @@
using Gtk 4.0;
Dialog {
[action response=hello-world]
Button hello_world_button {
}
}

View file

@ -0,0 +1 @@
4,22,11,Response type "hello-world" doesn't exist