@@ -47,15 +47,14 @@ func writeLinesToFile(filename string, lines []string) error {
47
47
// Create and save user specified custom case input, and update the given egor meta data
48
48
func AddNewCaseInput (inputLines []string ,
49
49
caseName string ,
50
- metaData config.EgorMeta ,
51
- noTimeOut bool ) (config.EgorMeta , error ) {
50
+ metaData config.EgorMeta ) (config.EgorMeta , error ) {
52
51
53
52
inputFileName := caseName + ".in"
54
53
err := writeLinesToFile (path .Join ("inputs" , inputFileName ), inputLines )
55
54
if err != nil {
56
55
return metaData , err
57
56
}
58
- inputFile := config .NewIoFile (inputFileName , path .Join ("inputs" , inputFileName ), true , noTimeOut )
57
+ inputFile := config .NewIoFile (inputFileName , path .Join ("inputs" , inputFileName ), true )
59
58
metaData .Inputs = append (metaData .Inputs , inputFile )
60
59
61
60
return metaData , nil
@@ -64,15 +63,14 @@ func AddNewCaseInput(inputLines []string,
64
63
// Create and save user specified custom csae output, and update the given egor meta data
65
64
func AddNewCaseOutput (outputLines []string ,
66
65
caseName string ,
67
- metaData config.EgorMeta ,
68
- noTimeOut bool ) (config.EgorMeta , error ) {
66
+ metaData config.EgorMeta ) (config.EgorMeta , error ) {
69
67
70
68
outputFileName := caseName + ".ans"
71
69
err := writeLinesToFile (path .Join ("outputs" , outputFileName ), outputLines )
72
70
if err != nil {
73
71
return metaData , err
74
72
}
75
- outputFile := config .NewIoFile (outputFileName , path .Join ("outputs" , outputFileName ), true , noTimeOut )
73
+ outputFile := config .NewIoFile (outputFileName , path .Join ("outputs" , outputFileName ), true )
76
74
metaData .Outputs = append (metaData .Outputs , outputFile )
77
75
78
76
return metaData , nil
@@ -102,12 +100,10 @@ func CustomCaseAction(context *cli.Context) error {
102
100
return err
103
101
}
104
102
105
- noTimeOut := context .Bool ("no-timeout" )
106
-
107
103
caseName := "test-" + strconv .Itoa (len (metaData .Inputs ))
108
104
color .Green ("Provide your input:" )
109
105
inputLines := readFromStdin ()
110
- metaData , err = AddNewCaseInput (inputLines , caseName , metaData , noTimeOut )
106
+ metaData , err = AddNewCaseInput (inputLines , caseName , metaData )
111
107
112
108
if err != nil {
113
109
color .Red ("Failed to add new case input" )
@@ -117,7 +113,7 @@ func CustomCaseAction(context *cli.Context) error {
117
113
if ! context .Bool ("no-output" ) {
118
114
color .Green ("Provide your output:" )
119
115
outputLines := readFromStdin ()
120
- metaData , err = AddNewCaseOutput (outputLines , caseName , metaData , noTimeOut )
116
+ metaData , err = AddNewCaseOutput (outputLines , caseName , metaData )
121
117
122
118
if err != nil {
123
119
color .Red ("Failed to add new case output" )
@@ -148,10 +144,5 @@ var CaseCommand = cli.Command{
148
144
Usage : "This test case doesnt have output" ,
149
145
Value : false ,
150
146
},
151
- & cli.BoolFlag {
152
- Name : "no-timeout" ,
153
- Usage : "This test case should not timeout when passed time limit" ,
154
- Value : false ,
155
- },
156
147
},
157
148
}
0 commit comments