Changeset 34657 in project


Ignore:
Timestamp:
10/01/17 00:37:16 (3 months ago)
Author:
kon
Message:

sep syntax & proc, sep (& fix) utf8

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

Legend:

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

    r34655 r34657  
    1919  "unicode-utils.scm"
    2020  "memoized-string.scm"
     21  "string-interpolation-syntax.scm"
     22  "string-interpolation.scm" "utf8-string-interpolation.scm" "string-interpolation-body.scm"
    2123  "tests/run.scm") )
  • release/4/string-utils/trunk/string-utils.scm

    r34414 r34657  
    44(module string-utils ()
    55
    6 (import scheme chicken)
     6(import scheme)
     7
     8(import chicken)
    79
    810(reexport
  • release/4/string-utils/trunk/string-utils.setup

    r34655 r34657  
    55(verify-extension-name "string-utils")
    66
    7 (setup-shared-extension-module 'unicode-utils (extension-version "1.4.0")
    8   #:inline? #t
     7(setup-shared-extension-module 'string-interpolation-syntax (extension-version "1.4.0")
     8  ;#:inline? #t
    99  #:types? #t
    1010  #:compile-options '(
    1111    -scrutinize
    12     -fixnum-arithmetic
    1312    -O3 -d1
    1413    -no-procedure-checks))
     
    1918  #:compile-options '(
    2019    -scrutinize
     20    -O3 -d1
     21    -no-procedure-checks))
     22
     23(setup-shared-extension-module 'utf8-string-interpolation (extension-version "1.4.0")
     24  ;#:inline? #t
     25  #:types? #t
     26  #:compile-options '(
     27    -scrutinize
     28    -O3 -d1
     29    -no-procedure-checks))
     30
     31(setup-shared-extension-module 'unicode-utils (extension-version "1.4.0")
     32  #:inline? #t
     33  #:types? #t
     34  #:compile-options '(
     35    -scrutinize
     36    -fixnum-arithmetic
    2137    -O3 -d1
    2238    -no-procedure-checks))
  • release/4/string-utils/trunk/tests/run.scm

    r34655 r34657  
    6060
    6161(use string-interpolation)
     62(import (prefix utf8-string-interpolation utf8::))
     63(require-library utf8-string-interpolation)
     64(use string-interpolation-syntax)
    6265
    6366(test-group "String Interpolation"
     
    6669        (test "foo 3 bar" (string-interpolate "foo ${(+ 1 2)} bar" eval-tag: #\$))
    6770        (test "foo 3 bar" (string-interpolate "foo $(+ 1 2) bar" eval-tag: #\$ eval-env: (scheme-report-environment 5)))
     71
     72        (test "听诎䞊海的 3 䞜西埈莵" (utf8::string-interpolate "听诎䞊海的 #(+ 1 2) 䞜西埈莵"))
     73        (test "听诎䞊海的 3 䞜西埈莵" (utf8::string-interpolate "听诎䞊海的 #(+ 1 2) 䞜西埈莵" eval-env: (scheme-report-environment 5)))
     74        (test "听诎䞊海的 3 䞜西埈莵" (utf8::string-interpolate "听诎䞊海的 ${(+ 1 2)} 䞜西埈莵" eval-tag: #\$))
     75        (test "听诎䞊海的 3 䞜西埈莵" (utf8::string-interpolate "听诎䞊海的 $(+ 1 2) 䞜西埈莵" eval-tag: #\$ eval-env: (scheme-report-environment 5)))
    6876)
    6977
    7078;must be "top level"
    71 (set-sharp-string-interpolation-syntax)
     79(set-sharp-string-interpolation-syntax string-interpolate)
    7280(test '("foo 3 bar") (list #"foo #{(+ 1 2)} bar"))
    73 (set-sharp-string-interpolation-syntax clear?: #t)
     81(set-sharp-string-interpolation-syntax #f)
    7482
    75 (set-sharp-string-interpolation-syntax eval-tag: #\$ eval-env: (scheme-report-environment 5))
     83(set-sharp-string-interpolation-syntax
     84  (cute string-interpolate <> eval-tag: #\$ eval-env: (scheme-report-environment 5)))
    7685(test '("foo 3 bar") (list #"foo ${(+ 1 2)} bar"))
    77 (set-sharp-string-interpolation-syntax clear?: #t)
     86(set-sharp-string-interpolation-syntax #f)
    7887
    7988(test-end)
Note: See TracChangeset for help on using the changeset viewer.