freebsd-src/unit-tests/modmisc.exp
Simon J. Gerraty 1a2b743f6b Import bmake-20200704
from ChangeLog:

    (most of this by rillig@)
    o lots of style and white-space cleanup
    o lots more unit tests for variable modifiers
    o simplified description of some functions
    o str.c: refactor Str_Match
    o var.c: debugging output for :@
      constify VarModify parameter
      fix :hash modifier on 16-bit platforms
      remove unnecessary forward declarations
      refactor ApplyModifier_SysV to have less indentation
      simplify code for :E and :R
      clean up code for :H and :T
      refactor ApplyModifiers

    * var.c: we need stdint.h on some platforms to get uint32_t
    * unit-test/Makefile: we need to supress the specific error
    for RE substitution error in modmisc, since it varies accross
    different OS.
2020-07-08 18:32:15 +00:00

36 lines
998 B
Plaintext

path=':/bin:/tmp::/:.:/no/such/dir:.'
path='/bin:/tmp:/:/no/such/dir'
path='/bin:/tmp:/:/no/such/dir'
path='/bin':'/tmp':'/':'/no/such/dir'
path='/bin':'/tmp':'/':'/no/such/dir'
path_/usr/xbin=/opt/xbin/
paths=/bin /tmp / /no/such/dir /opt/xbin
PATHS=/BIN /TMP / /NO/SUCH/DIR /OPT/XBIN
The answer is 42
dirname of 'a/b/c def a.b.c a.b/c a a.a .gitignore a a.a' is 'a/b . . a.b . . . . .'
basename of 'a/b/c def a.b.c a.b/c a a.a .gitignore a a.a' is 'c def a.b.c c a a.a .gitignore a a.a'
suffix of 'a/b/c def a.b.c a.b/c a a.a .gitignore a a.a' is 'c b/c a gitignore a'
root of 'a/b/c def a.b.c a.b/c a a.a .gitignore a a.a' is 'a/b/c def a.b a a a a a'
S:
C:
@:
S:empty
C:empty
@:
:a b b c:
:a b b c:
: b c:
:a c:
:x__ 3 x__ 3:
:a b b c:
:a b b c:
: b c:
make: RE substitution error: details omitted
make: Unclosed substitution for (, missing)
:C,word,____,:Q}:
:a c:
:x__ 3 x__ 3:
:+one+ +two+ +three+:
mod-at-resolve:w1d2d3w w2i3w w1i2d3 2i${RES3}w w1d2d3 2i${RES3} 1i${RES2}w:
exit status 0