X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=script%2Fmaketestdb.pl;h=79f9b3e82df495e2df2cb8441eeec3fa85d66831;hb=38d04b6da652705f625b954a83664e3d234201bc;hp=f26659db0c78682dc3da55dd0931f4a839944892;hpb=85990daf0e04461abd1b789fb283848dd583c134;p=scpubgit%2Fstemmaweb.git diff --git a/script/maketestdb.pl b/script/maketestdb.pl index f26659d..79f9b3e 100755 --- a/script/maketestdb.pl +++ b/script/maketestdb.pl @@ -40,9 +40,9 @@ say "Created test database"; my $user = $dir->add_user({ username => 'user@example.org', password => 'UserPass' }); my $admin = $dir->add_user({ username => 'admin@example.org', password => 'AdminPass', role => 'admin' }); -my $openid_user = $dir->add_user({ - username => 'https://www.google.com/accounts/o8/id?id=AItOawlFTlpuHGcI67tqahtw7xOod9VNWffB-Qg', - password => 'pass' +my $openid_user = $dir->create_user({ + url => 'https://www.google.com/accounts/o8/id?id=AItOawlFTlpuHGcI67tqahtw7xOod9VNWffB-Qg', + extensions => {'http://openid.net/srv/ax/1.0' => { 'value.email' =>'openid@example.org' } }, }); die "Failed to create test users" unless $user && $admin && $openid_user; say "Created users"; @@ -51,8 +51,11 @@ my $t1 = Text::Tradition->new( input => 'Self', file => 't/data/besoin.xml' ); die "Failed to create test tradition #1" unless $t1; $t1->add_stemma( dotfile => 't/data/besoin_stemweb.dot' ); $user->add_tradition( $t1 ); -$openid_user->add_tradition($t1); +my $t1b = Text::Tradition->new( input => 'Self', file => 't/data/besoin.xml' ); +$t1b->add_stemma( dotfile => 't/data/besoin_stemweb.dot' ); +$openid_user->add_tradition($t1b); $dir->store( $user ); +$dir->store( $openid_user ); say "Created test user tradition"; my $t2 = Text::Tradition->new( input => 'Tabular', sep_char => ',', @@ -62,13 +65,18 @@ die "Failed to create test tradition #2" unless $t2; $t2->public( 1 ); $dir->store( $t2 ); my $t3 = Text::Tradition->new( input => 'Self', file => 't/data/john.xml' ); +$t3->collation->change_direction('BI'); $t3->public( 1 ); $t3->name( 'John verse' ); +$user->add_tradition( $t3 ); $dir->store( $t3 ); my $t4 = Text::Tradition->new( input => 'Self', file => 't/data/collatecorr.xml' ); $t4->public( 1 ); $user->add_tradition( $t4 ); $dir->store( $t4 ); +my $t5 = Text::Tradition->new( input => 'Tabular', file => 't/data/arabic_snippet.csv', sep_char => ',', direction => 'RL', name => 'RTL test' ); +$user->add_tradition( $t5 ); +$dir->store( $t5 ); $dir->store( $user ); say "Created test public traditions";