<commit_before>use Test::More tests => 58;
use v5.14;
use UAV::Pilot;
use UAV::Pilot::Driver::ARDrone::Mock;
use UAV::Pilot::Control::ARDrone;
use UAV::Pilot::Commands;

my $LIB_DIR = 'share';


my $ardrone = UAV::Pilot::Driver::ARDrone::Mock->new({
    host => 'localhost',
});
$ardrone->connect;
my $repl = UAV::Pilot::Commands->new({
    device => UAV::Pilot::Control::ARDrone->new({
        driver => $ardrone,
    }),
});

$ardrone->saved_commands; # Flush saved commands from connect() call

eval {
    $repl->run_cmd( 'takeoff;' );
};
ok( $@, "No commands loaded into namespace yet" );

$repl->add_lib_dir( UAV::Pilot->default_module_dir );
$repl->load_lib( 'ARDrone' );
pass( "ARDrone basic flight library loaded" );

UAV::Pilot::Commands::run_cmd( 'takeoff;' );
cmp_ok( scalar($ardrone->saved_commands), '==', 0,
    'run_cmd does nothing when called without $self' );
<commit_msg>Use correct module<commit_after>use Test::More tests => 58;
use v5.14;
use UAV::Pilot;
use UAV::Pilot::ARDrone::Driver::Mock;
use UAV::Pilot::ARDrone::Control;
use UAV::Pilot::Commands;

my $LIB_DIR = 'share';


my $ardrone = UAV::Pilot::ARDrone::Driver::Mock->new({
    host => 'localhost',
});
$ardrone->connect;
my $repl = UAV::Pilot::Commands->new({
    device => UAV::Pilot::ARDrone::Control->new({
        driver => $ardrone,
    }),
});

$ardrone->saved_commands; # Flush saved commands from connect() call

eval {
    $repl->run_cmd( 'takeoff;' );
};
ok( $@, "No commands loaded into namespace yet" );

$repl->add_lib_dir( UAV::Pilot->default_module_dir );
$repl->load_lib( 'ARDrone' );
pass( "ARDrone basic flight library loaded" );

UAV::Pilot::Commands::run_cmd( 'takeoff;' );
cmp_ok( scalar($ardrone->saved_commands), '==', 0,
    'run_cmd does nothing when called without $self' );

{'fraction_non_alphanumeric': 0.19831932773109243, 'fraction_numerical': 0.0067226890756302525, 'mean_word_length': 5.447653429602888, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 31, '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': '1326579', 'n_tokens_mistral': 703, 'n_tokens_neox': 668, 'n_words': 140}