File: modifiers.t

package info (click to toggle)
nqp 2024.09%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 9,972 kB
  • sloc: java: 28,087; perl: 3,479; ansic: 451; makefile: 202; javascript: 68; sh: 1
file content (11 lines) | stat: -rw-r--r-- 389 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
puts "1..10"
n=0
puts "ok #{n+=1} - if modifier" if true
puts "nok #{n+=1} - if modifier" if false
puts "ok #{n+=1} - unless modifier" unless false
puts "nok #{n+=1} - unless modifier" unless true
puts "ok #{n+=1} - until modifier" until n >= 6
puts "ok #{n+=1} - while modifier" while n < 8
begin
    puts "ok #{n+=1} - while modifier - begin .. end block" while n < 10
end until n >= 10