<commit_before><commit_msg>[Test] test tag regex<commit_after>//@@author A0147984L
package seedu.address.model.task;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

import org.junit.Test;

import seedu.address.commons.exceptions.IllegalValueException;
import seedu.address.model.tag.Tag;

public class TagTest {

    @Test
    public void isValidTag() throws IllegalValueException {
        // invalid name
        assertFalse(Tag.isValidTagName(" ")); // space only
        assertFalse(Tag.isValidTagName("cs 2103")); // contains space
        assertFalse(Tag.isValidTagName("*NUS*")); // contains non-alphanumeric

        // valid name
        assertTrue(Tag.isValidTagName("")); // empty
        assertTrue(Tag.isValidTagName("personal")); // alphabets only
        assertTrue(Tag.isValidTagName("2103")); // digits only
        assertTrue(Tag.isValidTagName("cs2103")); // alphabets and digits only
        assertTrue(Tag.isValidTagName("list")); // reserved word

        // reserved word
        assertTrue(Tag.isReservedName("list")); // reserved word
        assertTrue(Tag.isReservedName("favorite")); // reserved word
    }
}
{'fraction_non_alphanumeric': 0.12999150382327954, 'fraction_numerical': 0.016142735768903994, 'mean_word_length': 3.4452830188679244, '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': '5895207', 'n_tokens_mistral': 338, 'n_tokens_neox': 335, 'n_words': 66}