brewery
notashelf /
775bb42c63250b3ee17c160d78dd492b50a1c9eb

nixir

public

Import-resolving Nix IR plugin

Star0tarball
clone
ssh://git@git.notashelf.dev:33/notashelf/nixir.git
tests/string_interp.nixNix22 lines373 B
1
# Test string interpolation
2
let
3
  name = "world";
4
  x = 42;
5
  bool_val = true;
6
in {
7
  # Simple interpolation
8
  greeting = "Hello ${name}!";
9
10
  # Multiple interpolations
11
  multi = "x is ${x} and name is ${name}";
12
13
  # Nested expression
14
  nested = "Result: ${
15
    if bool_val
16
    then "yes"
17
    else "no"
18
  }";
19
20
  # Just a string (no interpolation)
21
  plain = "plain text";
22
}