aboutsummaryrefslogtreecommitdiff
path: root/tests/project-name/testscript
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-07-25 20:11:47 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-07-25 20:22:33 +0300
commit84f6ebab62a9f2553ae454d67861b0b142470d0b (patch)
tree63d41dc772ebcaf6f1821de3b155cadd90d309dc /tests/project-name/testscript
parent35e9273090109e5fb87fe65e3f1631ff6fc5fb3a (diff)
Move bpkg::package_name class to butl::project_name
Diffstat (limited to 'tests/project-name/testscript')
-rw-r--r--tests/project-name/testscript78
1 files changed, 78 insertions, 0 deletions
diff --git a/tests/project-name/testscript b/tests/project-name/testscript
new file mode 100644
index 0000000..92bd5e8
--- /dev/null
+++ b/tests/project-name/testscript
@@ -0,0 +1,78 @@
+# file : tests/project-name/testscript
+# copyright : Copyright (c) 2014-2018 Code Synthesis Ltd
+# license : MIT; see accompanying LICENSE file
+
+: string
+{
+ test.arguments += 'string'
+
+ : valid
+ :
+ $* <<EOF >>EOF
+ foo
+ foo1
+ Foo
+ foo_bar
+ foo+bar
+ foo-bar
+ foo.bar
+ build2
+ EOF
+
+ $* <'a' 2>'length is less than two characters' != 0: short
+ $* <'nul' 2>'illegal name' != 0: illegal-name
+ $* <'1a' 2>'illegal first character (must be alphabetic)' != 0: illegal-first-char
+ $* <'a!b' 2>'illegal character' != 0: illegal-char
+
+ : illegal-last-char
+ :
+ $* <'a.' 2>'illegal last character (must be alphabetic, digit, or plus)' != 0
+}
+
+: base
+:
+{
+ test.arguments += 'base';
+
+ $* <<EOI >>EOO
+ libbutl
+ libbutl.bash
+ a.b.c
+ EOI
+ libbutl
+ libbutl
+ a.b
+ EOO
+}
+
+: extension
+:
+{
+ test.arguments += 'extension';
+
+ $* <<EOI >>EOO
+ libbutl
+ libbutl.bash
+ a.b.c
+ EOI
+
+ bash
+ c
+ EOO
+}
+
+: variable
+:
+{
+ test.arguments += 'variable';
+
+ $* <<EOI >>EOO
+ foo-bar
+ libc++
+ libbutl.bash
+ EOI
+ foo_bar
+ libc__
+ libbutl_bash
+ EOO
+}