<commit_before>#!/usr/bin/env bats

load includes

@test "pdfcat: Common option --help" {
  output=$(pdf2pdfa --help 2>&1)
  [[ ${output} =~ ' --help ' ]]
  [[ ${output} =~ ' --version ' ]]
}

@test "pdfcat: Common option -h" {
  output=$(pdfcat -h 2>&1)
  [[ ${output} =~ ' -h ' ]]
  [[ ${output} =~ ' -V ' ]]
}

@test "pdfcat: Common option --version" {
  pdfcat --version | grep -w ${PDFCAT_VERSION}
}

@test "pdfcat: Common option -V" {
  pdfcat -V | grep -w ${PDFCAT_VERSION}
}<commit_msg>Add concat test to pdfcat<commit_after>#!/usr/bin/env bats

load includes

@test "pdfcat: Common option --help" {
  output=$(pdf2pdfa --help 2>&1)
  [[ ${output} =~ ' --help ' ]]
  [[ ${output} =~ ' --version ' ]]
}

@test "pdfcat: Common option -h" {
  output=$(pdfcat -h 2>&1)
  [[ ${output} =~ ' -h ' ]]
  [[ ${output} =~ ' -V ' ]]
}

@test "pdfcat: Common option --version" {
  pdfcat --version | grep -w ${PDFCAT_VERSION}
}

@test "pdfcat: Common option -V" {
  pdfcat -V | grep -w ${PDFCAT_VERSION}
}

@test "pdfcat: Concat two PDFs" {
  ::create-tempdir
  input_pdf=${FILES_DIR}/${SAMPLE_PDF}
  output_pdf=${TEMP_DIR}/output.pdf
  pdfcat "${input_pdf}" "${input_pdf}" > "${output_pdf}"
  meta=$(pdfinfo "${output_pdf}")
  [[ ${meta} =~ Title:.*Lorem\ ipsum ]]
  [[ ${meta} =~ Producer:.*Wikisource ]]
  [[ ${meta} =~ Pages:.*10 ]]
  [[ ${meta} =~ Page\ size:.*A4 ]]
}
{'fraction_non_alphanumeric': 0.2412280701754386, 'fraction_numerical': 0.009502923976608187, 'mean_word_length': 3.346031746031746, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, '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': '5350421', 'n_tokens_mistral': 573, 'n_tokens_neox': 558, 'n_words': 124}