tests: use proctutil.stdout.write() instead of print() in test-extension.t
I was debugging this test failure on python3 + chg. I get the following hunk as
test failure:
```
@@ -206,6 +206,18 @@ Check normal command's load order of ext
4) bar uipopulate
5) foo reposetup
5) bar reposetup
+ 4) foo uipopulate (chg !)
+ 4) bar uipopulate (chg !)
+ 4) foo uipopulate (chg !)
+ 4) bar uipopulate (chg !)
+ 4) foo uipopulate (chg !)
+ 4) bar uipopulate (chg !)
+ 4) foo uipopulate (chg !)
+ 4) bar uipopulate (chg !)
+ 4) foo uipopulate (chg !)
+ 4) bar uipopulate (chg !)
+ 5) foo reposetup (chg !)
+ 5) bar reposetup (chg !)
0:
c24b9ac61126
```
After hours of debugging and head scracthing, I figured out that something is
wrong with output flushing. I initially switched the print() statements to
ui.warn() but thanks to Yuya who suggested using procutil.stdout.write()
instead.
#require clang-format test-repo
$ . "$TESTDIR/helpers-testrepo.sh"
$ cd "$TESTDIR"/..
$ for f in `testrepohg files 'set:(**.c or **.cc or **.h) and not "listfile:contrib/clang-format-ignorelist"'` ; do
> clang-format --style file $f > $f.formatted
> cmp $f $f.formatted || diff -u $f $f.formatted
> rm $f.formatted
> done