nixir/tests/fixtures/indented_string.nix
NotAShelf ae505188fc
tests: move fixtures to dedicated dir
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I9d6ce6a264780f215b1b57d947b5264c6a6a6964
2026-02-23 02:26:46 +03:00

31 lines
533 B
Nix

# Test indented strings (multi-line strings with '' delimiters)
let
# Simple indented string
simple = ''
Hello
World
'';
# Indented string with interpolation
name = "Nix";
greeting = ''
Welcome to ${name}!
This is indented.
'';
# Escape sequences
escapes = ''
Literal dollar: ''$
Literal quotes: '''
Regular text
'';
# Shell script example (common use case)
script = ''
#!/bin/bash
echo "Running script"
ls -la
'';
in {
inherit simple greeting escapes script;
}