alias -l testqpfx {
!inc -u0 %tnum
!var %exp = $iif( $show == $1 , $true , $false )
!echo -ag Test %tnum - $2 $iif( $1 , verbose , silenced ) evaluation $3
!echo -agq This should $iif( !%exp , not ) appear, ($show expected to be $1)
!return Test %tnum - 98, $+ $iif( %exp , 44[ PASS ] , 52[ FAIL ] ) $+
}
alias runqpfxtests {
!echo -ag $testqpfx( $true , Hard-coded )
!linesep
!.echo -ag $testqpfx( $false , Hard-coded )
!linesep
!var %dcsA = !echo -ag, %dcsB = !.echo -ag , %dcsC = !.echo -agq , %dcsD = echo -ag
%dcsA $testqpfx( $true , Dynamically-coded )
!linesep
%dcsB $testqpfx( $false , Dynamically-coded , with command as / $+ %dcsB )
!linesep
%dcsC $testqpfx( $false , Dynamically-coded , with command as / $+ %dcsC )
!linesep
!.%dcsD $testqpfx( $false , Dynamically-coded , with hard-coded command prefixes )
!linesep
}