2 # vim:ts=4:sw=4:expandtab
3 # Verifies that we can get the version number of i3 via IPC.
6 my $i3 = i3(get_socket_path());
8 # We explicitly send the version message because AnyEvent::I3’s 'version' sugar
9 # method has a fallback which tries to parse the version number from i3
10 # --version for older versions, and we want to avoid using that.
11 my $version = $i3->message(7, "")->recv;
13 # We need to change this when the major version changes (but we need to touch a
14 # lot of changes then anyways).
15 is($version->{major}, 4, 'major version is 4');
17 cmp_ok($version->{minor}, '>', 0, 'minor version > 0');
19 is(int($version->{minor}), $version->{minor}, 'minor version is an integer');
20 is(int($version->{patch}), $version->{patch}, 'patch version is an integer');
21 like($version->{human_readable}, qr/branch/, 'human readable version contains branch name');