11cb0ef41Sopenharmony_ci'use strict'; 21cb0ef41Sopenharmony_cirequire('../common'); 31cb0ef41Sopenharmony_ciconst assert = require('assert'); 41cb0ef41Sopenharmony_ci 51cb0ef41Sopenharmony_ciconst { Writable } = require('stream'); 61cb0ef41Sopenharmony_ci 71cb0ef41Sopenharmony_ci{ 81cb0ef41Sopenharmony_ci const w = new Writable(); 91cb0ef41Sopenharmony_ci assert.strictEqual(w.writableCorked, 0); 101cb0ef41Sopenharmony_ci w.uncork(); 111cb0ef41Sopenharmony_ci assert.strictEqual(w.writableCorked, 0); 121cb0ef41Sopenharmony_ci w.cork(); 131cb0ef41Sopenharmony_ci assert.strictEqual(w.writableCorked, 1); 141cb0ef41Sopenharmony_ci w.cork(); 151cb0ef41Sopenharmony_ci assert.strictEqual(w.writableCorked, 2); 161cb0ef41Sopenharmony_ci w.uncork(); 171cb0ef41Sopenharmony_ci assert.strictEqual(w.writableCorked, 1); 181cb0ef41Sopenharmony_ci w.uncork(); 191cb0ef41Sopenharmony_ci assert.strictEqual(w.writableCorked, 0); 201cb0ef41Sopenharmony_ci w.uncork(); 211cb0ef41Sopenharmony_ci assert.strictEqual(w.writableCorked, 0); 221cb0ef41Sopenharmony_ci} 23