GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: add flag scenario in test-fs-write-file-sync · nodejs/node@e17dbd2

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/parallel
    • test-fs-write-file-sync.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/parallel/test-fs-write-file-sync.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-fs-write-file-sync.js
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,12 @@ function closeSync() {
9696
openCount--;
9797
return fs._closeSync.apply(fs, arguments);
9898
}
99+
100+
// Test writeFileSync with flags
101+
const file4 = path.join(tmpdir.path, 'testWriteFileSyncFlags.txt');
102+
103+
fs.writeFileSync(file4, 'hello ', { encoding: 'utf8', flag: 'a' });
104+
fs.writeFileSync(file4, 'world!', { encoding: 'utf8', flag: 'a' });
105+
106+
content = fs.readFileSync(file4, { encoding: 'utf8' });
107+
assert.strictEqual(content, 'hello world!');

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.