Browse Source

add a new script

Bill Gianopoulos 3 years ago
parent
commit
7e32eee6cb
1 changed files with 3 additions and 0 deletions
  1. 3 0
      scripts/do_check2Assert.sh

+ 3 - 0
scripts/do_check2Assert.sh

@@ -0,0 +1,3 @@
+#!/bin/bash
+find . -name .hg -prune -o -name '*.js' -exec egrep 'do_check_eq\(|do_check_neq\(|do_check_true\(|do_check_false\('  {} \; -a -print | grep '^\./' >~/mozilla/files
+for i in `cat /home/wag/mozilla/files` ; do  echo $i; cp $i $i.original; sed -e 's@todo_check_@doxyzzycheck_@g' -e 's@_do_check_@UdoUcheckU@g' -e 's@do_check_eq[(]@Assert.equal(@g' -e 's@do_check_neq[(]@Assert.notEqual(@g' -e 's@do_check_true[(]@Assert.ok(@g' -e 's@do_check_false[(]@Assert.ok(!@g' -e 's@UdoUcheckU@_do_check_@g' -e 's@doxyzzycheck_@todo_check_@g' < $i.original > $i; rm $i.original; done