
#                                      Copyright 2024 WebPros International, LLC
#                                                           All rights reserved.
# copyright@cpanel.net                                         http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited.

package Whostmgr::360Monitoring::Agent::Test;

use v5.36;
use Exporter 'import';

our @EXPORT = qw/&test_to_package_short &test_to_package/;

sub test_to_package_short ($file) {
    die sprintf( "%s is designed to only work on tests (.t files)", __PACKAGE__ ) unless $file =~ s'.t$'';
    $file =~ s'.*-'';
    return $file;
}

sub test_to_package ($file) {
    die sprintf( "%s is designed to only work on tests (.t files)", __PACKAGE__ ) unless $file =~ s'.t$'';
    $file                                                                                      =~ s'.*/'';
    $file                                                                                      =~ s'-'::'g;
    return $file;
}

1;
