Description:
Fixed truncate
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r370:9b23889aa864 - - 1 file changed: 1 inserted, 1 deleted

@@ -4,37 +4,37
4 User:
4 User:
5 = "#{@test_request.user.login}"
5 = "#{@test_request.user.login}"
6 %br/
6 %br/
7 Problem:
7 Problem:
8 - if @test_request.problem!=nil
8 - if @test_request.problem!=nil
9 = "#{@test_request.problem.full_name}"
9 = "#{@test_request.problem.full_name}"
10 - else
10 - else
11 = "(n/a)"
11 = "(n/a)"
12 %br/
12 %br/
13 = "Submission: #{@test_request.submission.number}"
13 = "Submission: #{@test_request.submission.number}"
14 = link_to '[view submission]', :action => 'submission', :id => @test_request.submission.id
14 = link_to '[view submission]', :action => 'submission', :id => @test_request.submission.id
15 %br/
15 %br/
16 = "Test submitted at: #{format_short_time(@test_request.submitted_at)}"
16 = "Test submitted at: #{format_short_time(@test_request.submitted_at)}"
17 %br/
17 %br/
18 = "Execution time: #{@test_request.running_time} s."
18 = "Execution time: #{@test_request.running_time} s."
19 %br/
19 %br/
20 = "Memory usage: #{@test_request.memory_usage}kb"
20 = "Memory usage: #{@test_request.memory_usage}kb"
21 %br/
21 %br/
22 %b= @test_request.exit_status
22 %b= @test_request.exit_status
23 %br/
23 %br/
24
24
25 - if @test_request.compiler_message!=nil and @test_request.compiler_message!=''
25 - if @test_request.compiler_message!=nil and @test_request.compiler_message!=''
26 %b Compiler Message
26 %b Compiler Message
27 %div{:style => "border: 1px solid black; background: lightgrey"}
27 %div{:style => "border: 1px solid black; background: lightgrey"}
28 - = simple_format(truncate((@test_request.compiler_message or ''),200))
28 + = simple_format(truncate((@test_request.compiler_message or ''), :length => 200))
29
29
30 %b Input (first 2kb)
30 %b Input (first 2kb)
31 %div{:style => "border: 1px solid black; background: lightgrey"}
31 %div{:style => "border: 1px solid black; background: lightgrey"}
32 - if @test_request.input_file_name!=nil
32 - if @test_request.input_file_name!=nil
33 = simple_format(read_textfile(@test_request.input_file_name,2048))
33 = simple_format(read_textfile(@test_request.input_file_name,2048))
34
34
35 %b Output (first 2kb)
35 %b Output (first 2kb)
36 %div{:style => "border: 1px solid black; background: lightgrey"}
36 %div{:style => "border: 1px solid black; background: lightgrey"}
37 - if @test_request.output_file_name!=nil
37 - if @test_request.output_file_name!=nil
38 = simple_format(read_textfile(@test_request.output_file_name,2048))
38 = simple_format(read_textfile(@test_request.output_file_name,2048))
39 - else
39 - else
40 (no output)
40 (no output)
You need to be logged in to leave comments. Login now