[utils] Correct octal/hexadecimal number detection in js_to_json
[youtube-dl] / test / test_utils.py
index cb578cd536ab0db6161306ccb795206851f24234..b83da93b4e15432f192a731f398ffd75b1df1dc0 100644 (file)
@@ -712,6 +712,9 @@ class TestUtil(unittest.TestCase):
         inp = '''{"foo":101}'''
         self.assertEqual(js_to_json(inp), '''{"foo":101}''')
 
+        inp = '''{"duration": "00:01:07"}'''
+        self.assertEqual(js_to_json(inp), '''{"duration": "00:01:07"}''')
+
     def test_js_to_json_edgecases(self):
         on = js_to_json("{abc_def:'1\\'\\\\2\\\\\\'3\"4'}")
         self.assertEqual(json.loads(on), {"abc_def": "1'\\2\\'3\"4"})