#!/usr/bin/perl
#
# Stress-test for beagle
# Creates lots of files with UTF8 encoded filenames
# Useful for testing that beagle doesn't choke on odd characters, stress testing
# lots of files being added at once, etc.
# 
# Probably requires a UTF-8 environment!
#

binmode STDOUT, ":utf8";

# Maximum sane value is 12999, but thats a lot of files!
# See http://www.columbia.edu/kermit/utf8-t1.html
$max_utf8_char = 500;

for ($i = 0; $i <= $max_utf8_char; $i++) {
	$packed = "\"a" . pack ("U", $i) . "b\"";
	$ret = `echo "moo" > $packed`;
}

