<commit_before>use Test::More;
BEGIN { use_ok( 'UI::Dialog::Backend::XOSD' ); }
require_ok( 'UI::Dialog::Backend::XOSD' );

# #########################

my $obj = UI::Dialog::Backend::XOSD->new();
isa_ok( $obj, 'UI::Dialog::Backend::XOSD' );

my @methods =
  qw( new line file gauge
      display_start display_stop
      display_text display_gauge
   );
can_ok( 'UI::Dialog::Backend::XOSD', @methods );
done_testing();<commit_msg>make XOSD tests binary-safety-check (like recent nautilus changes)<commit_after>use Test::More;
BEGIN { use_ok( 'UI::Dialog::Backend::XOSD' ); }
require_ok( 'UI::Dialog::Backend::XOSD' );

# #########################


eval { new UI::Dialog::Backend::XOSD (test_mode=>1); };
if ( $@ ) {
  if ($@ =~ m!binary could not be found!) {
    diag("Tests skipped, backend binary not found.");
  } else {
    diag("Tests skipped, unknown backend error: ".$@);
  }
  done_testing();
} else {
  my $obj = UI::Dialog::Backend::XOSD->new();
  isa_ok( $obj, 'UI::Dialog::Backend::XOSD' );

  my @methods =
    qw( new line file gauge
        display_start display_stop
        display_text display_gauge
     );
  can_ok( 'UI::Dialog::Backend::XOSD', @methods );
  done_testing();
}
{'fraction_non_alphanumeric': 0.22018348623853212, 'fraction_numerical': 0.0008340283569641367, 'mean_word_length': 4.825242718446602, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1331130', 'n_tokens_mistral': 433, 'n_tokens_neox': 428, 'n_words': 87}