<commit_before>#include <tests/Base.hh>

#include <aleph/utilities/Filesystem.hh>

int main( int, char** )
{
  ALEPH_TEST_BEGIN( "Filesystem utilities" );

  std::string path1 = "/the/path/to/hell/is/paved/with/good/queries.txt";

  ALEPH_ASSERT_THROW( aleph::utilities::basename( path1 )  == std::string( "queries.txt" ) );
  ALEPH_ASSERT_THROW( aleph::utilities::stem( path1 )      == std::string( "queries" ) );
  ALEPH_ASSERT_THROW( aleph::utilities::extension( path1 ) == std::string( ".txt" ) );

  ALEPH_TEST_END();
}<commit_msg>Restructured tests for filesystem operations<commit_after>#include <tests/Base.hh>

#include <aleph/utilities/Filesystem.hh>

void testUtilities()
{
  ALEPH_TEST_BEGIN( "Filesystem utilities" );

  std::string path1 = "/the/path/to/hell/is/paved/with/good/queries.txt";

  ALEPH_ASSERT_THROW( aleph::utilities::basename( path1 )  == std::string( "queries.txt" ) );
  ALEPH_ASSERT_THROW( aleph::utilities::stem( path1 )      == std::string( "queries" ) );
  ALEPH_ASSERT_THROW( aleph::utilities::extension( path1 ) == std::string( ".txt" ) );

  ALEPH_TEST_END();
}

int main( int, char** )
{
  testUtilities();
}
{'fraction_non_alphanumeric': 0.17682926829268292, 'fraction_numerical': 0.006968641114982578, 'mean_word_length': 5.210810810810811, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '1518883', 'n_tokens_mistral': 449, 'n_tokens_neox': 426, 'n_words': 67}