fixed some inconsistency in moo_fmt_object_().

changed to handle a symbol with a c-style escape sequences enclosed in #""
This commit is contained in:
hyunghwan.chung
2019-05-30 15:44:24 +00:00
parent 5bf79fb4b5
commit a4c13608ef
7 changed files with 113 additions and 87 deletions

View File

@ -90,7 +90,11 @@ class MyObject(Object)
0 priorTo: limit by: 1 do: [ :idx |
| tb |
tb := tc at: idx.
System log(System.Log.INFO, idx asString, (if (tb value) { ' PASS' } else { ' FAIL' }), S'\n').
System log(System.Log.INFO, idx asString, (if (tb value) { ' PASS' } else { ' FAIL' }), "\n").
].
## TODO:
String format('%s', " 나 는\\\"") dump.
#"a b\nc" dump.
}
}

View File

@ -39,7 +39,7 @@ class MyObject(Object)
sg addSemaphore: s3.
s1 signalOnInput: 0.
s2 signalOnInput: 0. ## this should raise an exception.
s2 signalOnInput: 0. ## this should raise an exception as the same file descriptor is added to a different semaphore
s3 signalOnInput: 0.
[ sg wait. ] fork.
@ -69,7 +69,7 @@ sg removeSemaphore: s1.
tb := tc at: idx.
System log(System.Log.INFO, idx asString, (if (tb value) { ' PASS' } else { ' FAIL' }), S'\n').
].
'********** END OF MAIN PROGRAM *************' dump.
}
}