eturn_wat_ _ACRTIMP errno_t __cdecl wcsncpy_s( _Out_writes_z_(_SizeInWords) wchar_t* _Destination, _In_ rsize_t _SizeInWords, _In_reads_or_z_(_MaxCount) wchar_t const* _Source, _In_ rsize_t _MaxCount )440000034009ca9ef5737
1:wcstok_s_ACRTIMP wchar_t* __cdecl wcstok_s( _Inout_opt_z_ wchar_t* _String, _In_z_ wchar_t const* _Delimiter, _Inout_ _Deref_prepost_opt_z_ wchar_t** _Context )44000003c009ca9ef573e
1:_wcsdup_ACRTIMP _CRTALLOCATOR wchar_t* __cdecl _wcsdup( _In_z_ wchar_t const* _String )44000003c009ca9ef5751
1:wcscat_s:< ><size_t _Size>4400002680004009ca9ef5759
1:wcscat_sinline errno_t __CRTDECL wcscat_s(wchar_t (&_Destination)[_Size], wchar_t const* _Source) _CRT_SECURE_CPP_NOTHROW{...}4400000380104009ca9ef5759
1:__insecure_wcscat__inline wchar_t* __CRTDECL __insecure_wcscat( wchar_t *_Destination, _In_z_ wchar_t const* _Source){...}4400000310c009ca9ef5764
1:wcscat:< ><typename _T>440000268000c009ca9ef5764
1:wcscatinline _CRT_INSECURE_DEPRECATE(wcscat_s) wchar_t* __CRTDECL wcscat(_T &_Destination, _In_z_ wchar_t const* _Source) _CRT_SECURE_CPP_NOTHROW{...}440000038010c009ca9ef5764
1:wcscat:< ><typename _T>440000268000c009ca9ef5764
1:wcscatinline _CRT_INSECURE_DEPRECATE(wcscat_s) wchar_t* __CRTDECL wcscat(const _T &_Destination, _In_z_ wchar_t const* _Source) _CRT_SECURE_CPP_NOTHROW{...}440000038010c009ca9ef5764
1:wcscatinline _CRT_INSECURE_DEPRECATE(wcscat_s) wchar_t* __CRTDECL wcscat( wchar_t * &_Destination, _In_z_ wchar_t const* _Source) _CRT_SECURE_CPP_NOTHROW{...}4400000310c009ca9ef5764
1:wcscat:< ><size_t _Size>440000268000c009ca9ef5764
1:wcscatinline wchar_t* __CRTDECL wcscat(wchar_t (&_Destination)[_Size], _In_z_ wchar_t const* _Source) _CRT_SECURE_CPP_NOTHROW{...}440000038010c009ca9ef5764
1:wcscat1inline _CRT_INSECURE_DEPRECATE(wcscat_s) wchar_t* __CRTDECL wcscat1(wchar_t (&_Destination)[1], _In_z_ wchar_t const* _Source) _CRT_SECURE_CPP_NOTHROW{...}4400000310c009ca9ef5764
1:wcscmp_ACRTIMP int __cdecl wcscmp( _In_z_ wchar_t const* _String1, _In_z_ wchar_t const* _String2 )440000034009ca9ef5770
1:wcscpy_s:< ><size_t _Size>4400002680004009ca9ef5772
1:wcscpy_sinline errno_t __CRTDECL wcscpy_s(wchar_t (&_Destination)[_Size], wchar_t const* _Source) _CRT_SECURE_CPP_NOTHROW{...}4400000380104009ca9ef5772
1:__insecure_wcscpy__inline wchar_t* __CRTDECL __insecure_wcscpy( wchar_t *_Destination, _In_z_ wchar_t const* _Source){...}4400000310c009ca9ef577b
1:wcscpy:< ><typename _T>440000268000c009ca9ef577b
1:wcscpyinline _CRT_INSECURE_DEPRECATE(wcscpy_s) wchar_t* __CRTDECL wcscpy(_T &_Destination, _In_z_ wchar_t const* _Source) _CRT_SECURE_CPP_NOTHROW{...}440000038010c009ca9ef577b
1:wcscpy:< ><typename _T>440000268000c009ca9ef577b
1:wcscpyinline _CRT_INSECURE_DEPRECATE(wcscpy_s) wchar_t* __CRTDECL wcscpy(const _T &_Destination, _In_z_ wchar_t const* _Source) _CRT_SECURE_CPP_NOTHROW{...}440000038010c009ca9ef577b
1:wcscpyinline _CRT_INSECURE_DEPRECATE(wcscpy_s) wchar_t* __CRTDECL wcscpvar tape = require('tape')
var through = require('through2')
var stream = require('stream')
var shift = require('./')

tape('shifts next', function (t) {
  var passthrough = through()

  passthrough.write('hello')
  passthrough.write('world')

  t.same(shift(passthrough), Buffer('hello'))
  t.same(shift(passthrough), Buffer('world'))
  t.end()
})

tape('shifts next with core', function (t) {
  var passthrough = stream.PassThrough()

  passthrough.write('hello')
  passthrough.write('world')

  t.same(shift(passthrough), Buffer('hello'))
  t.same(shift(passthrough), Buffer('world'))
  t.end()
})

tape('shifts next with object mode', function (t) {
  var passthrough = through({objectMode: true})

  passthrough.write({hello: 1})
  passthrough.write({world: 1})

  t.same(shift(passthrough), {hello: 1})
  t.same(shift(passthrough), {world: 1})
  t.end()
})

tape('shifts next with object mode with core', function (t) {
  var passthrough = stream.PassThrough({objectMode: true})

  passthrough.write({hello: 1})
  passthrough.write({world: 1})

  t.same(shift(passthrough), {hello: 1})
  t.same(shift(passthrough), {world: 1})
  t.end()
})
