tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

test-JSString.py (558B)


      1 # Printing JSStrings.
      2 # flake8: noqa: F821
      3 
      4 assert_subprinter_registered("SpiderMonkey", "ptr-to-JSString")
      5 run_fragment("JSString.simple")
      6 
      7 assert_pretty("empty", '""')
      8 assert_pretty("x", '"x"')
      9 assert_pretty("z", '"z"')
     10 assert_pretty("xz", '"xz"')
     11 
     12 stars = gdb.parse_and_eval("stars")
     13 assert_eq(str(stars), "'*' <repeats 100 times>")
     14 
     15 doubleStars = gdb.parse_and_eval("doubleStars")
     16 assert_eq(str(doubleStars), "'*' <repeats 200 times>")
     17 
     18 assert_pretty("xRaw", '"x"')
     19 
     20 # JSAtom *
     21 
     22 run_fragment("JSString.atom")
     23 
     24 assert_pretty("molybdenum", '"molybdenum"')