<commit_before><commit_msg>add tests for command line<commit_after>package com.codexfons.compositesplit.test;

import static org.junit.Assert.*;

import org.junit.BeforeClass;
import org.junit.Test;

import com.codexfons.compositesplit.CommandLineInterface;
import com.codexfons.compositesplit.CommandLineInterface.Config;

public class CommandLineInterfacetest {

	@BeforeClass
	public static void setUpBeforeClass() throws Exception {
	}

	@Test
	public void testNoArgs() {
		Config config = CommandLineInterface.parseArgs(new String[] { });
		assertNull(config);
	}

	@Test
	public void testDefaultDict() {
		Config config = CommandLineInterface.parseArgs(new String[] { "testwort" });
		assertEquals(config.dictPath, "data/nomen-sg-filt.txt");
		assertEquals(config.compoundWord, "testwort");
	}

	@Test
	public void testNoCompoundWord() {
		Config config = CommandLineInterface.parseArgs(new String[] { "-d", "data/nomen-sg-filt.txt" });
		assertNull(config);
	}

	@Test
	public void testCustomDict() {
		Config config = CommandLineInterface.parseArgs(new String[] { "-d", "data/custom-dict.txt", "testwort" });
		assertEquals(config.dictPath, "data/custom-dict.txt");
		assertEquals(config.compoundWord, "testwort");
	}

}
{'fraction_non_alphanumeric': 0.12866449511400652, 'fraction_numerical': 0.0, 'mean_word_length': 5.643243243243243, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '829503', 'n_tokens_mistral': 401, 'n_tokens_neox': 385, 'n_words': 75}