|
|
@ -60,7 +60,7 @@ sub load_from_text {
|
|
|
|
if ( $line eq '' ) {
|
|
|
|
if ( $line eq '' ) {
|
|
|
|
next;
|
|
|
|
next;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ( $line =~ /^(.*?)\s*#\s+(.*)$/ ) {
|
|
|
|
if ( $line =~ /^(.*?)\s*#\s*(.*)$/ ) {
|
|
|
|
$line = $1;
|
|
|
|
$line = $1;
|
|
|
|
$comment = $2;
|
|
|
|
$comment = $2;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -235,8 +235,8 @@ sub generate_script {
|
|
|
|
elsif ( my $action = $entry->{action} ) {
|
|
|
|
elsif ( my $action = $entry->{action} ) {
|
|
|
|
|
|
|
|
|
|
|
|
if ( $action eq 'name' ) { generate_start_new_test($entry) }
|
|
|
|
if ( $action eq 'name' ) { generate_start_new_test($entry) }
|
|
|
|
elsif ( !$inside_test ) {
|
|
|
|
elsif ( !$inside_test && defined $action ) {
|
|
|
|
die "Attempting to run an action when not inside a test section on line " . $entry->{line_num} . "\n";
|
|
|
|
die "Attempting to run an action '$action' when not inside a test section on line " . $entry->{line_num} . "\n";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
elsif ( $action eq 'press' ) { generate_press($entry) }
|
|
|
|
elsif ( $action eq 'press' ) { generate_press($entry) }
|
|
|
|
elsif ( $action eq 'release' ) { generate_release($entry); }
|
|
|
|
elsif ( $action eq 'release' ) { generate_release($entry); }
|
|
|
@ -248,8 +248,9 @@ sub generate_script {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($inside_test) {
|
|
|
|
generate_end_test();
|
|
|
|
generate_end_test();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|