# Path: chirp/library/bulk_tagging_form.py
# VERIFIED = "verified"
# QUESTION = "???"
# DUPLICATE = "duplicate"
# DELETE = "delete"
# TALB_MISMATCH = "TALB mismatch"
# LINE_RE = re.compile(r"([0-9a-f]{8})\s+\[([^\]]*)\]\s+(\d+)\s+\d+\s+(.+)",
#                      re.UNICODE)
# NEW_SECTION_RE = re.compile(r"^\d{5}-{9}\s(.*)", re.UNICODE)
# def _update(this_batch, artist, results):
# def get_path_hash(full_dirpath):
# def parse_file(file_obj):


import codecs
import cStringIO
import unittest
from chirp.library import bulk_tagging_form
1234abcd [ x ] 192 10 To Be Deleted
abcd1234 [ ? ] 222  7 What You Talkin' About Willis?

00665--------- Audioslave
00085fb1 [ 1 ] 128 14 Audioslave
660414cd [ 1 ] 192 14 Audioslave
52c55fc7 [   ] 228 12 Out of Exile
11111111 [ 2 ] 228 13 TALB
22222222 [ 2 ] 228 13 MISMATCH
"""

EXPECTED_RESULTS_1 = {
    "a7314af4": (bulk_tagging_form.VERIFIED,
                 "A Perfect Circle", "Mer de Noms"),
    "e2ebb0f2": (bulk_tagging_form.DUPLICATE, 
                 "A Perfect Circle", "Mer de Noms"),
    "55d1c5a4": (bulk_tagging_form.VERIFIED,
                 "A Perfect Circle", "Thirteenth Step"),
    "1234abcd": (bulk_tagging_form.DELETE,
                 "A Perfect Circle", "To Be Deleted"),
    "abcd1234": (bulk_tagging_form.QUESTION, 
                 "A Perfect Circle", "What You Talkin' About Willis?"),
    "00085fb1": (bulk_tagging_form.DUPLICATE,
                 "Audioslave", "Audioslave"),
    "660414cd": (bulk_tagging_form.VERIFIED,
                 "Audioslave", "Audioslave"),
    "52c55fc7": (bulk_tagging_form.VERIFIED, 
                 "Audioslave", "Out of Exile"),
    "11111111": (bulk_tagging_form.TALB_MISMATCH, 
                 "Audioslave", "TALB", '"MISMATCH" vs. "TALB"'),

# Path: chirp/library/bulk_tagging_form.py
# VERIFIED = "verified"
# QUESTION = "???"
# DUPLICATE = "duplicate"
# DELETE = "delete"
# TALB_MISMATCH = "TALB mismatch"
# LINE_RE = re.compile(r"([0-9a-f]{8})\s+\[([^\]]*)\]\s+(\d+)\s+\d+\s+(.+)",
#                      re.UNICODE)
# NEW_SECTION_RE = re.compile(r"^\d{5}-{9}\s(.*)", re.UNICODE)
# def _update(this_batch, artist, results):
# def get_path_hash(full_dirpath):
# def parse_file(file_obj):


# Path: chirp/library/bulk_tagging_form_test.py
import codecs
import cStringIO
import unittest
from chirp.library import bulk_tagging_form

1234abcd [ x ] 192 10 To Be Deleted
abcd1234 [ ? ] 222  7 What You Talkin' About Willis?

00665--------- Audioslave
00085fb1 [ 1 ] 128 14 Audioslave
660414cd [ 1 ] 192 14 Audioslave
52c55fc7 [   ] 228 12 Out of Exile
11111111 [ 2 ] 228 13 TALB
22222222 [ 2 ] 228 13 MISMATCH
"""

EXPECTED_RESULTS_1 = {
    "a7314af4": (bulk_tagging_form.VERIFIED,
                 "A Perfect Circle", "Mer de Noms"),
    "e2ebb0f2": (bulk_tagging_form.DUPLICATE, 
                 "A Perfect Circle", "Mer de Noms"),
    "55d1c5a4": (bulk_tagging_form.VERIFIED,
                 "A Perfect Circle", "Thirteenth Step"),
    "1234abcd": (bulk_tagging_form.DELETE,
                 "A Perfect Circle", "To Be Deleted"),
    "abcd1234": (bulk_tagging_form.QUESTION, 
                 "A Perfect Circle", "What You Talkin' About Willis?"),
    "00085fb1": (bulk_tagging_form.DUPLICATE,
                 "Audioslave", "Audioslave"),
    "660414cd": (bulk_tagging_form.VERIFIED,
                 "Audioslave", "Audioslave"),
    "52c55fc7": (bulk_tagging_form.VERIFIED, 
                 "Audioslave", "Out of Exile"),
    "11111111": (bulk_tagging_form.TALB_MISMATCH, 
                 "Audioslave", "TALB", '"MISMATCH" vs. "TALB"'),

    "22222222": (bulk_tagging_form.TALB_MISMATCH,