mirror of
https://github.com/vlang/v.git
synced 2025-09-11 16:36:20 -04:00
vcreate: don't use template names as project descriptions (#19439)
This commit is contained in:
parent
11e67a1a5f
commit
06fb8f0ffa
@ -9,6 +9,7 @@ set model [lindex $argv 2]
|
|||||||
|
|
||||||
spawn $v_root/v new $project_name $model
|
spawn $v_root/v new $project_name $model
|
||||||
|
|
||||||
|
expect "Input your project description: " { send "My Awesome V Project.\r" } timeout { exit 1 }
|
||||||
expect "Input your project version: (0.0.0) " { send "0.0.1\r" } timeout { exit 1 }
|
expect "Input your project version: (0.0.0) " { send "0.0.1\r" } timeout { exit 1 }
|
||||||
expect "Input your project license: (MIT) " { send "\r" } timeout { exit 1 }
|
expect "Input your project license: (MIT) " { send "\r" } timeout { exit 1 }
|
||||||
expect "Initialising ..." {} timeout { exit 1 }
|
expect "Initialising ..." {} timeout { exit 1 }
|
||||||
|
@ -81,7 +81,7 @@ fn new_project(args []string) {
|
|||||||
exit(3)
|
exit(3)
|
||||||
}
|
}
|
||||||
|
|
||||||
c.description = if args.len > 1 { args[1] } else { os.input('Input your project description: ') }
|
c.description = os.input('Input your project description: ')
|
||||||
|
|
||||||
default_version := '0.0.0'
|
default_version := '0.0.0'
|
||||||
c.version = os.input('Input your project version: (${default_version}) ')
|
c.version = os.input('Input your project version: (${default_version}) ')
|
||||||
|
@ -81,7 +81,7 @@ fn test_new_with_model_arg_input() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
assert mod.name == project_name
|
assert mod.name == project_name
|
||||||
assert mod.description == model
|
assert mod.description == 'My Awesome V Project.'
|
||||||
assert mod.version == '0.0.1'
|
assert mod.version == '0.0.1'
|
||||||
assert mod.license == 'MIT'
|
assert mod.license == 'MIT'
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user