'The function ``valid_javascript_identifier`` validates a given identifier
according to the latest draft of the ECMAScript 5 Specification'

def test_valid_javascript_identifier(self):

    self.assertTrue(valid_javascript_identifier('hello'))
    self.assertFalse(valid_javascript_identifier('alert()'))
    self.assertFalse(valid_javascript_identifier('a-b'))
    self.assertFalse(valid_javascript_identifier('23foo'))
    self.assertTrue(valid_javascript_identifier('foo23'))
    self.assertTrue(valid_javascript_identifier('$210'))
    self.assertTrue(valid_javascript_identifier(u'Stra\xdfe'))
    self.assertTrue(valid_javascript_identifier('\\u0062'))
    self.assertFalse(valid_javascript_identifier('\\u62'))
    self.assertFalse(valid_javascript_identifier('\\u0020'))
    self.assertTrue(valid_javascript_identifier('_bar'))
    self.assertTrue(valid_javascript_identifier('some_var'))
    self.assertTrue(valid_javascript_identifier('$'))
