Skip to content

String

Background

Given a file named "pen.json" with:

{
  "type": "library",
  "dependencies": {}
}

Use a string literal

Given a file named "Foo.pen" with:

f = \() string {
  "foo"
}

When I run pen build

Then the exit status should be 0.

Use equality operators

Given a file named "Foo.pen" with:

f = \() boolean {
  "" == ""
}

g = \() boolean {
  "" != ""
}

When I run pen build

Then the exit status should be 0.

Concatenate strings

Given a file named "Foo.pen" with:

f = \() string {
  "foo" + "bar"
}

When I run pen build

Then the exit status should be 0.

Concatenate 3 strings

Given a file named "Foo.pen" with:

f = \() string {
  "foo" + "bar" + "baz"
}

When I run pen build

Then the exit status should be 0.