diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-08-18 21:09:27 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-08-18 21:09:27 -0700 |
commit | a621ef95f4728d15bdf0b1828ac7dd6ac5af2795 (patch) | |
tree | 55e215014e53dfd5327dbd6eefb8d072b5b08a08 /087file.cc | |
parent | 47219d0b2b41096547a02b506d7413fe9a3d308a (diff) | |
download | mu-a621ef95f4728d15bdf0b1828ac7dd6ac5af2795.tar.gz |
3225 - testable interface for writing files
For example usage of file operations, see filesystem.mu. Is it ugly that we don't actually write to disk unless we wait for the writing routine to exit? Maybe there's a nice way to wrap it. At any rate, all buffering is explicit, which seems a win compared to *nix.
Diffstat (limited to '087file.cc')
-rw-r--r-- | 087file.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/087file.cc b/087file.cc index 6109fe26..ebb90689 100644 --- a/087file.cc +++ b/087file.cc @@ -125,8 +125,8 @@ case _WRITE_TO_FILE: { raise << maybe(get(Recipe, r).name) << "first ingredient of '$write-to-file' should be a number, but got '" << to_string(inst.ingredients.at(0)) << "'\n" << end(); break; } - if (!is_mu_number(inst.ingredients.at(1))) { - raise << maybe(get(Recipe, r).name) << "second ingredient of '$write-to-file' should be a number, but got '" << to_string(inst.ingredients.at(0)) << "'\n" << end(); + if (!is_mu_character(inst.ingredients.at(1))) { + raise << maybe(get(Recipe, r).name) << "second ingredient of '$write-to-file' should be a character, but got '" << to_string(inst.ingredients.at(0)) << "'\n" << end(); break; } break; |