Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 11 lines (9 sloc) 0.42 kb
1 2 3 4 5 6 7 8 9 10 11
should = require 'should'
prettyPrinter = require('../src/d16bunny/prettyprint').prettyPrinter

describe "PrettyPrinter", ->
  it "copes with tabs", ->
    line = "\t\tSET A, 0x30\t\t\t\t;"
    prettyPrinter.dumpString(line).should.eql("\"\\u0009\\u0009SET A, 0x30\\u0009\\u0009\\u0009\\u0009;\"")

  it "can handle regex", ->
    regex = /^yes|no$/
    prettyPrinter.dump(regex).should.eql("\x1b[37m/^yes|no$/\x1b[0m")
Something went wrong with that request. Please try again.