let pico = require('picocolors')

let load = require('./load')

const SITES = [
  'https://github.com/',
  'https://habr.com/',
  'https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.css'
]

function succeed(url) {
  process.stdout.write(pico.green('✔ ') + url + '\n')
}

module.exports = async function testOnReal(callback, extra = []) {
  await load(succeed, SITES.concat(extra), (css, url) => {
    let result
    try {
      result = callback(css).css
    } catch (e) {
      process.stderr.write(
        '\n' + pico.red(url) + '\n' + pico.bgRed(' Parsing error ') + ' '
      )
      if (e.name === 'CssSyntaxError') {
        process.stderr.write(pico.red(e.message))
      } else {
        process.stderr.write(pico.red(e.stack))
      }
      process.stderr.write('\n')
      process.exit(1)
    }

    if (result !== css) {
      process.stderr.write(
        '\n' + pico.red(url) + '\n' + pico.bgRed(' Different output ') + '\n'
      )
      process.exit(1)
    }

    succeed(url)
  })
}

@@ -221,16 +221,61 @@
 (url) %7B%0A
+  let text = url.replace(/%5Ehttps?:%5C/%5C//, '')%0A
   proces
@@ -308,19 +308,20 @@
 '%E2%9C%94 ') + 
-url
+text
  + '%5Cn')

Simplify console output