jm

Odin for scripts: small packages and a runner, on core: only
Log | Files | Refs | README

sh_windows_test.odin (503B)


      1 #+build windows
      2 package sh
      3 
      4 import "core:testing"
      5 
      6 @(test)
      7 quote_cmd :: proc(t: ^testing.T) {
      8 	testing.expect_value(t, quote("plain", context.temp_allocator), "plain")
      9 	testing.expect_value(t, quote("has space", context.temp_allocator), `"has space"`)
     10 	testing.expect_value(t, quote(`say "hi"`, context.temp_allocator), `"say \"hi\""`)
     11 	testing.expect_value(t, quote(`C:\dir\`, context.temp_allocator), `C:\dir\`)
     12 	testing.expect_value(t, quote(`C:\my dir\`, context.temp_allocator), `"C:\my dir\\"`)
     13 }