mirror of https://github.com/01-edu/public.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
567 B
28 lines
567 B
5 years ago
|
package main
|
||
5 years ago
|
|
||
|
import (
|
||
|
"io/ioutil"
|
||
|
"os"
|
||
|
"strings"
|
||
|
|
||
5 years ago
|
"lib"
|
||
5 years ago
|
)
|
||
|
|
||
5 years ago
|
func main() {
|
||
5 years ago
|
file1 := "quest8.txt"
|
||
|
file2 := "quest8T.txt"
|
||
|
if err := ioutil.WriteFile(file1, []byte(lib.RandWords()+"\n"), os.ModePerm); err != nil {
|
||
|
panic(err)
|
||
5 years ago
|
}
|
||
5 years ago
|
if err := ioutil.WriteFile(file2, []byte(lib.RandWords()+"\n"), os.ModePerm); err != nil {
|
||
|
panic(err)
|
||
5 years ago
|
}
|
||
5 years ago
|
|
||
|
table := []string{file1, file1 + " " + file2, "asd", "", file1 + " abc", "abc " + file2}
|
||
5 years ago
|
|
||
|
for _, s := range table {
|
||
5 years ago
|
lib.ChallengeMain("cat", strings.Fields(s)...)
|
||
5 years ago
|
}
|
||
5 years ago
|
lib.ChallengeMainStdin("cat", lib.RandWords()+"\n")
|
||
5 years ago
|
}
|