Changeset 34655 in project


Ignore:
Timestamp:
09/30/17 22:35:53 (3 months ago)
Author:
kon
Message:

add string-interpolation syntax & proc (need to sep default & utf8 support)

Location:
release/4/string-utils/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • release/4/string-utils/trunk/string-utils.meta

    r34123 r34655  
    1010        (setup-helper "1.5.2")
    1111        (miscmacros "2.9")
    12         (check-errors "1.12.1"))
     12        (check-errors "1.12.1")
     13        (utf8 "3.4.4"))
    1314 (test-depends test)
    14  (files "string-utils.release-info" "string-utils.scm" "string-utils.setup" "to-hex.scm" "string-hexadecimal.scm" "unicode-utils.scm" "tests/run.scm" "memoized-string.scm" "string-utils.meta") )
     15 (files
     16  "string-utils.release-info" "string-utils.setup" "string-utils.meta"
     17  "string-utils.scm"
     18  "to-hex.scm" "string-hexadecimal.scm"
     19  "unicode-utils.scm"
     20  "memoized-string.scm"
     21  "tests/run.scm") )
  • release/4/string-utils/trunk/string-utils.setup

    r34450 r34655  
    55(verify-extension-name "string-utils")
    66
    7 (setup-shared-extension-module 'unicode-utils (extension-version "1.3.1")
     7(setup-shared-extension-module 'unicode-utils (extension-version "1.4.0")
    88  #:inline? #t
    99  #:types? #t
     
    1414    -no-procedure-checks))
    1515
    16 (setup-shared-extension-module 'memoized-string (extension-version "1.3.1")
     16(setup-shared-extension-module 'string-interpolation (extension-version "1.4.0")
     17  ;#:inline? #t
     18  #:types? #t
     19  #:compile-options '(
     20    -scrutinize
     21    -O3 -d1
     22    -no-procedure-checks))
     23
     24(setup-shared-extension-module 'memoized-string (extension-version "1.4.0")
    1725  #:inline? #t
    1826  #:types? #t
     
    2432    -no-procedure-checks))
    2533
    26 (setup-shared-extension-module 'to-hex (extension-version "1.3.1"))
     34(setup-shared-extension-module 'to-hex (extension-version "1.4.0"))
    2735
    28 (setup-shared-extension-module 'string-hexadecimal (extension-version "1.3.1")
     36(setup-shared-extension-module 'string-hexadecimal (extension-version "1.4.0")
    2937  #:inline? #t
    3038  #:types? #t
     
    3543    -no-procedure-checks))
    3644
    37 (setup-shared-extension-module 'string-utils (extension-version "1.3.1")
     45(setup-shared-extension-module 'string-utils (extension-version "1.4.0")
    3846  #:inline? #t
    3947  #:types? #t
  • release/4/string-utils/trunk/tests/run.scm

    r34441 r34655  
    5757)
    5858
     59;;
     60
     61(use string-interpolation)
     62
     63(test-group "String Interpolation"
     64        (test "foo 3 bar" (string-interpolate "foo #(+ 1 2) bar"))
     65        (test "foo 3 bar" (string-interpolate "foo #(+ 1 2) bar" eval-env: (scheme-report-environment 5)))
     66        (test "foo 3 bar" (string-interpolate "foo ${(+ 1 2)} bar" eval-tag: #\$))
     67        (test "foo 3 bar" (string-interpolate "foo $(+ 1 2) bar" eval-tag: #\$ eval-env: (scheme-report-environment 5)))
     68)
     69
     70;must be "top level"
     71(set-sharp-string-interpolation-syntax)
     72(test '("foo 3 bar") (list #"foo #{(+ 1 2)} bar"))
     73(set-sharp-string-interpolation-syntax clear?: #t)
     74
     75(set-sharp-string-interpolation-syntax eval-tag: #\$ eval-env: (scheme-report-environment 5))
     76(test '("foo 3 bar") (list #"foo ${(+ 1 2)} bar"))
     77(set-sharp-string-interpolation-syntax clear?: #t)
     78
    5979(test-end)
    6080
Note: See TracChangeset for help on using the changeset viewer.