'Regression test for https://aeon.stsci.edu/ssb/trac/pyfits/ticket/183
Ensures that cards with standard commentary keywords are never treated
as RVKCs.  Also ensures that cards not stricly matching the RVKC
pattern are not treated as such.'

def test_overly_permissive_parsing(self):

    h = fits.Header()
    h['HISTORY'] = 'AXIS.1:    2'
    h['HISTORY'] = 'AXIS.2:    2'
    assert ('HISTORY.AXIS' not in h)
    assert ('HISTORY.AXIS.1' not in h)
    assert ('HISTORY.AXIS.2' not in h)
    assert (h['HISTORY'] == ['AXIS.1:    2', 'AXIS.2:    2'])
    h = fits.Header()
    h['HISTORY'] = 'Date:    2012-09-19T13:58:53.756061'
    assert ('HISTORY.Date' not in h)
    assert (str(h.cards[0]) == _pad('HISTORY    Date:    2012-09-19T13:58:53.756061'))
    c = fits.Card.fromstring("                                'Date:    2012-09-19T13:58:53.756061'")
    assert (c.keyword == '')
    assert (c.value == "'Date:    2012-09-19T13:58:53.756061'")
    assert (c.field_specifier is None)
    h = fits.Header()
    h['FOO'] = 'Date:    2012-09-19T13:58:53.756061'
    assert ('FOO.Date' not in h)
    assert (str(h.cards[0]) == _pad("FOO                    =    'Date:    2012-09-19T13:58:53.756061'"))
